How to ONLY compare static data tables?

Compares and synchronizes SQL database content.

How to ONLY compare static data tables?

Postby rb13c » Thu Apr 10, 2014 8:47 pm

We're using SQL Source Control to link static data for a subset of tables in our database. Using the command line I can successfully run a SQL Data Compare from source control to a database. However, in order to filter on only the static tables, I have to list them all in the /include:table switch like:

/Include:table:\\[dbo\\]\\.\\[Table1\\]^|\\[dbo\\]\\.\\[Table2\\] etc.

This is less than ideal because now we have to link the table to source control and also maintain this second list. I likely am going to create a powershell script to generate this list from the scripts "Data" folder. This all seems very hackish, is there a better way?

I am aware of the /include:staticdata switch in SQL Compare but seems very limited. I can't get that to work to compare only staticdata without it comparing schema of all tables and security roles, etc. also.
Posts: 5
Joined: Tue Mar 25, 2014 11:04 pm

Postby Evan Moss » Thu Apr 10, 2014 10:38 pm


Thanks for your post.

You shouldn't have to use the /include switch at all.

I just tested, and using


should give you the appropriate behavior. It will generate a script that will only compare the tables with linked data in source control.

Here's a link to the descriptions of those switches: ... mmand+line

Please let me know if you're getting different behavior.

Evan Moss
Product Support
(866) 627-8107
Evan Moss
Posts: 112
Joined: Wed Jun 12, 2013 9:56 pm

Postby rb13c » Thu Apr 10, 2014 11:05 pm

Thanks! I got this to work now using that. Previously I actually was using /scripts1 rather than /sourcecontrol1 and /sfx.
Posts: 5
Joined: Tue Mar 25, 2014 11:04 pm

Return to SQL Data Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests