This documentation is archived and is not being maintained.

Using Visual SourceSafe in Microsoft SQL Server

Visual Studio 2005

Microsoft SQL Server 7.0 integrates Visual SourceSafe in the form of a source control package to facilitate team activities and enable parallel development. Visual SourceSafe functionality is used to lock up and version original SQL Server stored procedures that go with an SQL application built using Visual Studio.

About Visual SourceSafe for SQL Server

When integrated Visual SourceSafe functionality is enabled, the SQL Server will log into Visual SourceSafe and enable source control operations using the Visual SourceSafe database. The Srcsafe.ini file representing the database location is relative to the SQL Server database, not to the local computer. You can place your stored procedures under source control and then view, check out, and check in the procedures using the familiar Visual SourceSafe methods.

Installation of Visual SourceSafe for SQL Server

To be integrated with SQL Server as a source control feature, Visual SourceSafe must be installed on any client machines and the computer containing the SQL Server software.

Use of Visual SourceSafe for SQL Server requires appropriate permissions for actions on the database. It is recommended to reduce security problems by setting the MSSQLServer service to run as a logged-on user. So that Visual SourceSafe can be used with stored procedures, the MSSQLServer service must also be set up with an account that has access to the server where the Visual SourceSafe software is installed. For details of installation and setup, see the SQL Server documentation.

Working with Stored Procedures Under Source Control

Visual SourceSafe for SQL Server allows you to work with stored procedures as described in the SQL Server documentation. Basically, you can place a stored procedure under source control using a Data View window and an Add to Source Control command.

You can check out a stored procedure using a Check Out command. Both the source control version and the database version are retrieved during a checkout, and then the versions are compared. A View Differences button is available and presents a window displaying the different text for the source control and database versions of the stored procedure.

You can place a stored procedure back in the database using a Check In command. When you check in a file, the latest database version goes into source control. You can also undo a checkout if you decide you don't want to save changes to the stored procedure. In this case, Visual SourceSafe for SQL Server attempts to resynchronize the source control library and the database by replacing the version you have been modifying with the source control version.

See Also