11.18
Update: SQL Source Control was released a while back! See my article on Simple-Talk for more information.
At work we maintain a few SQL Server Management Studio (SSMS) solutions for our SQL views, stored procedures and functions. We also use TortoiseSVN for source control. Unfortunately, there are no SVN add-ins for SSMS and the ones for Visual Studio don’t work (VisualSVN, AnkhSVN). Its a bit frustrating that SSMS is built on the same technology as Visual Studio, but lacks so many of the features that I’ve grown accustomed to, such as the Add-in Manager.
Red Gate, however, is currently working on a add-in called SQL Source Control with a planned release in 2010. But what to do until then? Well, there is one officially supported point of extensibility in SSMS: External Tools. Here are a few that I’ve been using with TortoiseSVN lately:
Title: SVN Commit
Command: C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe
Arguments: /Command:commit /path:”$(SolutionDir)
Initial directory: $(SolutionDir)
Title: SVN Update
Command: C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe
Arguments: /Command:update /path:”$(SolutionDir)”
Initial directory: $(SolutionDir)
Title: SVN Log (Solution)
Command: C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe
Arguments: /Command:log /path:”$(SolutionDir)”
Initial directory: $(SolutionDir)
Title: SVN Log (Current Item)
Command: C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe
Arguments: /Command:log /path:”$(ItemFileName)$(ItemExt)”
Initial directory: $(ItemDir)
Title: SVN Diff
Command: C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe
Arguments: /Command:diff /path:”$(ItemFileName)$(ItemExt)”
Initial directory: $(ItemDir)
"Unfortunately, there are no SVN add-ins for SSMS and the ones for Visual Studio don’t work."
Can you expand on this? Is this as relates the VS SQL tools, or are you saying they don’t work with VS at all? (If the latter, that’s news to me.)
~James
James, what I meant was that the Subversion addins for Visual Studio don’t work in Management Studio. They will work just fine with a VS SQL project.
Hi there!
I did this:
Title: SVN Commit
Command: C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe
Arguments: /Command:commit /path:”$(SolutionDir)”
Initial directory: $(SolutionDir)
But i always get the same “problem”: When i click the “SVN Commit” option, a new dialog opens asking me to save the current file. Saving the file with the proper name of the object that i’ve changed in the SVN’s directory, i get the SVN’s commit dialog with the message:
“Can’t open file ‘C:\Windows\System32\””\.svn\entries”: The file’s name or directory’s name sintax is wrong.
you have any idea that how I can fix this?
Regards,
Johann
It looks like svn can’t find your working copy. Is your solution in a working copy?
I just realize something.. I need to use a sql project to use this functionality? Cause i don’t have the sql’s that i’ve tested within a project.
I just have the procedures, tables, functions and so on as .sql files versioned in a svn repository… then I open this files from the SMSS and try to use the functionalities that you expose with the external tools…
Yes, in order for the external tools to work, you must have your scripts in a SSMS project.