We are using Red Gate version control on our system with TFS as the repository. Is there a way to programatically (or use of command line) determine the version of a stored procedure in both source control, and on a target server?
Comments
7 comments
-
Hi @pporter,
Can you give us a bit more detail about what you mean by "version of a stored procedure". Would you be interested in knowing which revision/commit is on the target server? Or are you just interested in checking the differences between what you have in source control and the target server?
Thanks,
Diogo -
@Diogo, Thanks for your response.
I would be interested in checking the differences between what we have in source control and the target server. -
Hi @pporter
I think you can use the SQL Compare command line then. There is some documentation on this page http://https//documentation.red-gate.com/sc13/using-the-command-line
I think you may want something like
sqlcompare.exe /scr1:YourScriptsFolder /s2:YourDatabaseServer /db2:YourDatabaseName /u2:YourUsernameToConnectToTheDatabase /p2:YourPasswordToConnectToTheDatabase /Include:storedprocedure:\[YourStoredProcedureName\] /verbose
-
@Diogo, thanks again. This looks like the real deal, but I have one question: What, in this scenario, is the /scr1 folder switch used for? is this my repository folder on the source server? It doesn't explain it well (to my mind, at least) in the docs.
Thanks in advance -
-
thats kind of what i thought, but I keep getting a "Error: Invalid connection database connection parameter: "URI formats are not supported.Invalid connection database connection parameter: URI formats are not supported."
my command line look like this:
sqlcompare.exe /scr1:http://al-tfs:8080/tfs/afg /s2:GDC-DEV-1\SQLEXPRESS /db2:AFGWMS /u2:username /p2:password /Include:storedprocedure:Abattoir.HouseTagReserve_Select /verbose
-
NVM, i get it..."Local"
Add comment
Please sign in to leave a comment.