views:

723

answers:

4

I am trying to follow the steps on the following site

http://msdn.microsoft.com/en-us/library/ms181089(VS.80).aspx

But I couldn't find the "Data View window and an Add to Source Control command" in the SQL Managment Studio. Then I tried to Modify a stored procedure and then I clicked on the "Change Source Control" button at the "Source Control Toolbar". Besides the SQL Server machine's Visual Source Safe client connects to my Visual Source Safe repository, I couldn't change the bindings of the stored procedure because of the following error message:

Cannot change source control bindings. Ensure that each project has a valid binding.

I don't know what to do anymore. Any idea?

+2  A: 

Write your stored procedures in script files and commit those. When you make a change, edit that file and commit it just like normal source code. Writing your stored procedures as scripts will also save you time later if you want to script out your database.

Nathan Ridley
+2  A: 

Personally, I don't use Source Safe directly with SQL Server to keep track of my database artifacts, I create a Database project and link it to the Source Control.

Doing it this way you keep the Source Safe integration with Visual Studio and SQL Server too.

Paulo Santos
A: 

Check out this site: VBScript with SQLDMO basically what we do in-house is we wrote a vbscript file that uses SQLDMO to output the contents of all of the SQL objects out to a directory, then we use the SourceSafe object thru vbscript to manage the version control. Unfortunately I cannot post the code since my boss also frequents this site ocassionally ;)

We have recently switched from VSS to TFS and wrote a process to manage that in .NET, handles alot cleaner.

SomeMiscGuy
+1  A: 

Have you checked the source control settings in SQL Management Studio? Tools>Options then Source Control. Make sure that SourceSafe is set as the current source control plug-in. I think for your scripts, you could create a script project (File>New>Project>SQL Server Scripts) and then start adding scripts. If you right click on the script project, you should see 'Add Solution to Source Control'.

Mehmet Aras