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: /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
Applying Command Line Items
Creating SQL
Synchronizing databases (from DB1 to DB2)
Error: Synchronization of 'Scripts.Database' and
'' failed: Column name or number of supplied
values does not match table definition.
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: ... ch_p1.aspx ... 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.


Peter Peart
Red Gate Software Ltd
+44 (0)870 160 0037 ext. 8569
1 866 RED GATE ext. 8569
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 0 guests