What is the replacement for deprecated /sourcecontrol1 ?

mishalubamishaluba Posts: 10
edited January 25, 2013 11:51AM in SQL Compare Previous Versions
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!

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    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.
  • 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

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

    /Sourcecontrol2
    Allows a folder of scripts to be used as the target.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    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 DonahueBrian Donahue Posts: 6,590 Bronze 1
    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.
Sign In or Register to comment.