Column name or number of supplied values does not match

Forum for users of SQL Compare schema synchronization utility

Moderators: JonathanWatts, Chris Auckland, David Atkinson

Column name or number of supplied values does not match

Postby 37stars » Wed Dec 22, 2010 7:49 pm

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.
37stars
 
Posts: 5
Joined: Fri Aug 21, 2009 10:51 pm

Postby peter.peart » Thu Dec 23, 2010 8:59 pm

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/f ... ch_p1.aspx

http://www.sql-server-helper.com/error- ... g-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
peter.peart
Site Admin
 
Posts: 362
Joined: Tue Sep 02, 2008 9:58 am
Location: Top floor, RG towers with the cool kids


Return to SQL Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 1 guest