Data Compate: SVN-to-SVN via command line
nbrown@sygnia.co.za
Posts: 4
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
Mapping
Comparing databases
Creating Migration SQL & Saving Script
Finished
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)
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
Mapping
Comparing databases
Creating Migration SQL & Saving Script
Finished
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)
Comments
I have opened a support incident regarding your post and will communicate with you using that channel.
Thank you,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
I'm facing exactly the same issue with "Redgate SQL Data Compare Command Line Utility V11.6.3.1926"
Is a solution available?
Thank you
This is caused by a bug in the tool that hasn't been resolved yet (bug reference SDC-1997).
The fix, when it is out, will be announced in the release notes:
https://documentation.red-gate.com/disp ... r+versions
Thank you,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools