TFS compare command line
MikeM
Posts: 6 New member
in SQL Compare
I see in the SQL Compare UI, you can easily compare a local db to a tfs db in source control. The XML shows it nicely and it works exactly as i want....but I cannot figure out how to do that in the command line.
Version:13.8.0.12703 pro
-ScriptFolderDescription-$/companyname/Databases/dbname on https://companyname.visualstudio.com/
how do I translate that to command line using the switches available?
Version:13.8.0.12703 pro
ServerUrl>https://company.visualstudio.com/</ServerUrl>
SourceControlFolder>$/company/Databases/dbname</SourceControlFolder>-ScriptFolderDescription-$/companyname/Databases/dbname on https://companyname.visualstudio.com/
how do I translate that to command line using the switches available?
Tagged:
Answers
The example below should work
sqlcompare.exe /s1:LiveSQLServer /db1:LocalDB /SourceControl2 /Revision2:HEAD /ScriptsFolderXML:xml.xml
You can get the text needed to create xml.xml from SQL Source Control (more specifically on the Under the Hood section in the Setup tab for the SQL Source Control database)
https://documentation.red-gate.com/sc/using-the-command-line/switches-used-in-the-command-line#Switchesusedinthecommandline-/ScriptsFolderXML:%3Cfilepath%3E
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
I see the option in the UI to connect to a remote tfs, but it just is not available for command line...?
I am trying to automate a report to show the differences between prod/dev and prod/tfs. The trick is that we have single-tenant databases and lots of clients. I have the first part working through tsql creating the bat file with the appropriate commands, run the bat to create output, which then are read through a second sproc to give me a meaningful output.
If I could do the same thing with tfs/prod...then I'd be set.
I think downloading the latest version will work, I will try that one out this week.
Thanks again!
I got the /Scripts1 switch working (thanks!), but I can't figure out how to identify which directory is for which database. The names are obfuscated and I can't find a mapping anywhere. Is that available for me to use?