Using Visual SourceSafe – How to version control SQL Server Stored Procedures with Visual Studio 2003

This article is a part of SourceSafe / VSS Tutorial

SQL Server stored procedures can be added to Visual SourceSafe (VSS) for version control by using the source control feature in Visual Studio .NET 2003.


To add SQL Server stored procedures to VSS, please follow the steps below:

1. Verify that SQL Server is running under a domain account and the current log on user of SQL Server has read & write rights to the VSS Database folder. We can check this by right-clicking My Computer, and then clicking Manage -> Services and Applications -> Services. In the service list, right-click MSSQLSEVER and click Properties -> Log On tab.

SQL Server Log On user
(SQL Server Log On user)


2. Install Visual SourceSafe on the SQL Server machine.

3. Install Visual Studio .NET server components on the computer running SQL Server. During the installation, please check the VS 6 Stored Procedure Version Control option under Server Components.

Visual Studio .net 2003 Setup
(Visual Studio .net 2003 Setup)


4. Start Visual Studio .NET, click menu Tools -> Options -> Database Tools -> Server Explorer, and check Enable version control under Stored Procedures.

Enable Version Control
(Enable Version Control)


5. Open the Server Explorer pane by clicking menu View -> Server Explorer, and then expand to the Stored Procedures folder.

6. Right-click the Stored Procedures folder, and click Add to Source Control.

Add to Source Control
(Add to Source Control)


7. The Enable Source Control dialog box prompts out. We need to input the VSS database location and project name here. Please note that we do not need to use the “$/” prefix in the Source Control Project Name text box. Visual Studio .NET adds “$/” automatically. For example, if the project name in VSS database is “sql_2000”, we should input “sql_2000” rather than “$/sql_2000”.

Enable Source Control
(Enable Source Control)


8. In the Source Control Login dialog box, type the VSS Login ID and the Password, and then click OK.

Source Control Login
(Source Control Login)


9. We can now add stored procedures into source control of SourceSafe by right-clicking on the stored procedure files and selecting Add to Source Control. There will be lock icons on the left side of the stored procedure files denoting the files are in source control, as shown in the following screenshot:

Lock Icon
(Lock Icon)


And we will see the stored procedure files in SourceSafe Explorer:

VSS Explorer
(VSS Explorer)


10. After all the steps above were done, we will be able to find the SourceSafe options by right-clicking the stored procedure files in the Server Explorer pane.

Source Control Operations
(Source Control Operations)


For information on how to source control SQL Server objects in SQL Server Management Studio 2005/2008, please refer to my other articles: Integrating SourceSafe / VSS with SQL Server 2005 and Integrating SourceSafe / VSS with SQL Server 2008.


SourceAnywhere - the SQL Server-based SourceSafe Replacement The SQL Server-based Source Control Software Designed to be a SourceSafe Replacement SourceAnywhere for VSS - the Fastest SourceSafe Remote Access Tool Recommended by Microsoft The Fastest SourceSafe Remote Access Tool Recommeded by Microsoft

Previous article <<<<:
Next article >>>>:
SourceSafe How To series home page: VSS / SourceSafe Tutorial

3 thoughts on “Using Visual SourceSafe – How to version control SQL Server Stored Procedures with Visual Studio 2003

  1. Hi,

    I can’t find Tools -> Options -> Database Tools -> Server Explorer in VS 2008. How do I achieve the same in VS 2008?

  2. Hi,
    can we integrate sqlserver 2000 with visual studio 2005 the same way.
    as in the 2005 configuration there is nothing related to versioning of stored procs.


Comments are closed.