What is the replacement for deprecated /sourcecontrol1 ?
mishaluba
Posts: 10
Hello,
I am just getting started with "SQL Compare 10" and I wrote a small batch file to automate the CI process. There are just two commands. First one compares the latest version in the source control to my target databse and generates the upgrade script:
sqlcompare.exe /sourcecontrol1 /revision1:HEAD /scriptsfolderxml:"c:\temp\SVNConfig.txt" /s2:MyDestSvr /db2:MyDestDb /ScriptFile:"c:\temp\SynchScript.sql" /force
second line runs the upgrade script:
sqlcmd.exe -E -S DestSvr -d DestDb -i :"c:\temp\SynchScript.sql"
Evertyhing seems to work just fine and I am pretty happy, however, at the bottom of this page: http://www.red-gate.com/supportcenter/content/SQL_Compare/help/10.2/sc_cl_Switches_in_the_cl I see that /Sourcecontrol1 is depricated. How am I supposed to revise my process to avoid issues with the future versions?
Thank you!
I am just getting started with "SQL Compare 10" and I wrote a small batch file to automate the CI process. There are just two commands. First one compares the latest version in the source control to my target databse and generates the upgrade script:
sqlcompare.exe /sourcecontrol1 /revision1:HEAD /scriptsfolderxml:"c:\temp\SVNConfig.txt" /s2:MyDestSvr /db2:MyDestDb /ScriptFile:"c:\temp\SynchScript.sql" /force
second line runs the upgrade script:
sqlcmd.exe -E -S DestSvr -d DestDb -i :"c:\temp\SynchScript.sql"
Evertyhing seems to work just fine and I am pretty happy, however, at the bottom of this page: http://www.red-gate.com/supportcenter/content/SQL_Compare/help/10.2/sc_cl_Switches_in_the_cl I see that /Sourcecontrol1 is depricated. How am I supposed to revise my process to avoid issues with the future versions?
Thank you!
Comments
Thanks for your post. I don't believe the /sourcecontrol1 switch is deprecated, and it does not say this on the help page.
Your script should work fine... if you are getting a warning or anything, please let us know so we can look into it.
Scroll to the bottom and view this text (pasted below):
Deprecated Options
/Sourcecontrol1
Allows a folder of scripts to be used as the source.
/Sourcecontrol2
Allows a folder of scripts to be used as the target.
I suppose what they are saying is that they may not be supporting that particular use case in the future.
Hoewever, I've tested it out in a scenario where I am not using a live database and it doesn't seem to hurt anything. /scriptsfolderxml would be the logical replacement for the old method when you want to just connect to source control to get the database scripts without having to go via a live database.