Red Gate forums :: View topic - What is the replacement for deprecated /sourcecontrol1 ?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

What is the replacement for deprecated /sourcecontrol1 ?

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
mishaluba



Joined: 26 Dec 2012
Posts: 5

PostPosted: Thu Jan 17, 2013 9:41 pm    Post subject: What is the replacement for deprecated /sourcecontrol1 ? Reply with quote

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!
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6643

PostPosted: Mon Jan 21, 2013 12:26 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
mishaluba



Joined: 26 Dec 2012
Posts: 5

PostPosted: Mon Jan 21, 2013 8:02 pm    Post subject: Reply with quote

Thank you, Brian! I hope this is correct, but just want to confirm. Please go to this URL: http://www.red-gate.com/supportcenter/content/SQL_Compare/help/10.2/sc_cl_Switches_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.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6643

PostPosted: Tue Jan 22, 2013 11:55 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6643

PostPosted: Fri Jan 25, 2013 5:51 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group