Data Compate: SVN-to-SVN via command line

edited July 28, 2016 6:26AM in SQL Data Compare 11
We are evaluating SQL Source Control 4 and SC 11 as an upgrade to our existing SSC 3 / SC 10. The main issue we have is a bug in SQL Data Compare 10 where SVN-to-SVN comparisons do not include new tables with new static data. It seems that because the table did not exist at the Start revision, the data cannot be compared and the new static rows are not included in the emitted SQL data delta script (the table schema is of course included in the SC delta script). At the next release, the table exists at both the Start and End revisions, as does the data - and so the new rows are once again excluded. Updates to the static data work perfectly after this, of course.

There seems to be no elegant workaround to this other than to write the initial rows to a manual working script.

I noted that a new Option was added to the command line tool in 11.1.0, as a workaround to the above problem:

• /options:MissingFrom2AsInclude
You can use this option if you need to create a package that upgrades a database, and if as part of the upgrade you're adding a new table containing data. When you create the data script to package, the new table won't yet exist, so you need to use this option to specify that the table will exist by the time the data script is run.

I have a trial version of SSC 4 and SDC 11 running on my PC. I tried committing a table and it's static data in one SVN revision, say 2 and then comparing from an earlier revision to a later revision e.g 1 v Head. I know this will only work on the command line, so I tried this:

SQLDataCompare /sourcecontrol1 /r1:Head /sourcecontrol2 /r2:1 /ScriptFile:"C:lahDataDelta.sql" /scriptsfolderxml:"C:ScriptFolderLocation.xml"

The command line tool finds the source control repository and correctly connects and generates output. However, the revision number /r2 seems to be completely ignored. It assumes that DB2 is empty?

Copyright Copyright c 1999 - 2015 Red Gate Software Ltd

Registering databases
Comparing databases
Creating Migration SQL & Saving Script

Summary Information
DB1 = x2vw143z.gtp
DB2 = Empty

Any idea how I can get this to work?

I also noted that in SSC 5 the capabilities look more mature, which is encouraging:

EAP due December 2015. Full release due Q2 2016.
Improvements to migrations, that will allow you to:
• Create data-only migration scripts (scripts that aren't linked to specific schema changes)


Sign In or Register to comment.