What is the replacement for deprecated /sourcecontrol1 ?

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

What is the replacement for deprecated /sourcecontrol1 ?

Postby mishaluba » Thu Jan 17, 2013 9:41 pm

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: [url]http://www.red-gate.com/supportcenter/content/SQL_Compare/help/10.2/sc_cl_Switches_in_the_cl[/url] I see that /Sourcecontrol1 is depricated. How am I supposed to revise my process to avoid issues with the future versions?

Thank you!
mishaluba
 
Posts: 5
Joined: Wed Dec 26, 2012 7:38 pm

Postby Brian Donahue » Mon Jan 21, 2013 12:26 pm

Hello,

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.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby mishaluba » Mon Jan 21, 2013 8:02 pm

Thank you, Brian! I hope this is correct, but just want to confirm. Please go to this URL: http://www.red-gate.com/supportcenter/c ... _in_the_cl

Scroll to the bottom and view this text (pasted below):

Deprecated Options

[b]/Sourcecontrol1[/b]
Allows a folder of scripts to be used as the source.

/Sourcecontrol2
Allows a folder of scripts to be used as the target.
mishaluba
 
Posts: 5
Joined: Wed Dec 26, 2012 7:38 pm

Postby Brian Donahue » Tue Jan 22, 2013 11:55 am

Sure enough... sorry about that. I am still using this switch on my command line. I suppose it just has no effect when used with scriptsfolderxml.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby Brian Donahue » Fri Jan 25, 2013 5:51 pm

I'm told that /sourceontrol1 was for when you want to get a particular revision of a live database from source control. So it would basically examine the database for the "RG" extended properties to work out which repository to check the database out from.

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.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 3 guests