Red Gate forums :: View topic - Column name or number of supplied values does not match
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare Previous Versions
SQL Compare Previous Versions forum

Column name or number of supplied values does not match

Search in SQL Compare Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
37stars



Joined: 21 Aug 2009
Posts: 5

PostPosted: Wed Dec 22, 2010 7:49 pm    Post subject: Column name or number of supplied values does not match Reply with quote

We are using the SQL Source Control product to keep our database schemas in Team Foundation Server. Every night an automated process builds the main project and deploys to our test environment. Part of that process is to automatically update the test database using SQLCompare. This has been running perfectly for the last month.

Yesterday we started getting this error message:

Column name or number of supplied values does not match table definition

What does this error message mean and where would I start to resolve the problem?

The full command line we are using plus the output is below:

"C:\Program Files (x86)\Red Gate\SQL Compare 8\sqlcompare" /scr1:"C:\Builds\1\Project\Nightly Build\Sources\Project.DataLayer\Database" /s2:192.168.114.14 /db2:Database /UserName2:user /p2:pw /o:Default /Report:"C:\Builds\1\Project\Nightly Build\SchemaDiffReport.html" /ReportType:Interactive /ScriptFile:"C:\Builds\1\Project\Nightly Build\SchemaSyncScript.sql" /sync /force
SQL Compare Command Line V8.50.12.18
==============================================================================
Copyright c Red Gate Software Ltd 1999-2010

Serial Number: xxxxxxxxxxxxxxxxxxx

Registering data sources
Creating mappings
Comparing
Applying Command Line Items
Creating SQL
Synchronizing databases (from DB1 to DB2)
Error: Synchronization of 'Scripts.Database' and
'192.168.114.14.Database' failed: Column name or number of supplied
values does not match table definition.
Back to top
View user's profile Send private message
peter.peart
Site Admin


Joined: 02 Sep 2008
Posts: 362
Location: Top floor, RG towers with the cool kids

PostPosted: Thu Dec 23, 2010 8:59 pm    Post subject: Reply with quote

Hi there,

Thanks for your post. We have seen this happen before when a sproc or something else is generating inserts into a table that doesn't have the correct amount of columns or doesn't contain the column being referenced in the sproc.

There's a couple of articles I've linked to below which contain some more info on this error:

http://www.sql-server-performance.com/faq/supplied_value_not_match_p1.aspx

http://www.sql-server-helper.com/error-messages/msg-213.aspx

You may however wish to take a look at SQL Prompt 5 as this will show you invalid objects in your DB, and should hopefully point you to the particular object that is referencing additional columns or is wrong in someway.

HTH!

Pete
_________________
Peter Peart
Red Gate Software Ltd
+44 (0)870 160 0037 ext. 8569
1 866 RED GATE ext. 8569
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group