Microsoft KB Archive/818368

= How to add SQL Server 2000 Stored Procedures to Visual SourceSafe by using Visual Studio .NET =

Article ID: 818368

Article Last Modified on 11/26/2007

-

APPLIES TO


 * Microsoft Visual SourceSafe 6.0C
 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2003 Academic Edition
 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 2000 64-bit Edition

-



IN THIS TASK

 * SUMMARY
 * Install Visual SourceSafe on the computer running SQL Server
 * Install Visual SourceSafe client components
 * Run the MSSQLServer service under a domain account
 * Install Visual Studio .NET Version Control server components on the computer running SQL Server
 * Add a user to Visual SourceSafe Administrator on the computer running SQL Server
 * Enable Version Control for Stored Procedures on the computer running SQL Server
 * Add Stored Procedures to Visual SourceSafe
 * REFERENCES



SUMMARY
This step-by-step article discusses how to add Microsoft SQL Server 2000 Stored Procedures to Visual SourceSafe (VSS) by using the Source Control feature in Microsoft Visual Studio .NET. There are two types of configuration for adding Stored Procedures by using Source Control:
 * The VSS database is installed on the same computer as SQL Server.
 * The VSS database is installed on a remote computer.

back to the top

Install Visual SourceSafe on the computer running SQL Server
To install VSS on the computer running SQL Server, follow these steps:
 * 1) Run the Setup.exe file that is located on the VSS installation CD-ROM.
 * 2) Change the Log On account of the MSSQLServer service to run under a user account that has Read and Write user rights for the VSS database folder.
 * 3) In the VSS Administration tool, add the user name and password from step 2 for the VSS database. SQL Server uses this account to carry out checkout and check-in operations in VSS.

back to the top

Install Visual SourceSafe client components
If the VSS database is installed on a remote computer other than the computer running SQL Server, you must install VSS client components on the computer running SQL Server. To do this, follow these steps:
 * 1) Run Netsetup.exe from the folder of the remote computer where the VSS database is installed.
 * 2) Change the Log On account of the MSSQLServer service to run under a user account that has Read and Write user rights for the VSS database folder that is located on the remote computer.
 * 3) In the VSS Administration tool, add the user name and password from step 2 to the VSS database that is located on the remote computer. SQL Server uses this account to log on to the remote computer to carry out checkout and check-in operations in VSS.

back to the top

Run the MSSQLServer service under a domain account

 * 1) On the computer running SQL Server, open SQL Server Enterprise Manager.
 * 2) Under SQL Server Group, right-click (LOCAL), and then click Properties.
 * 3) Click the Security tab. Under Startup service account, click This account.
 * 4) Type the User ID and Password.
 * 5) Click OK.

back to the top

Install Visual Studio .NET Version Control server components on the computer running SQL Server

 * 1) Run Visual Studio .NET Setup.
 * 2) Under Server Components, select VS 6 Stored Procedure Version Control.
 * 3) Click Update now or Install to install the required components.

back to the top

Add a user to Visual SourceSafe Administrator on the computer running SQL Server

 * 1) Start the Visual SourceSafe 6.0 Administrator tool.
 * 2) On the Users menu, click Add User.
 * 3) In the Add User dialog box, type the User Name and Password.
 * 4) Click OK.

back to the top

Enable version control for Stored Procedures on the computer running SQL Server
By default, version control is not enabled for Stored Procedures. To enable the version control for Stored Procedures, follow these steps:
 * 1) Start Visual Studio .NET.
 * 2) On the Tools menu, click Options.
 * 3) In the left pane, expand Database Tools, and then click Server Explorer.
 * 4) Under Stored Procedure, click to select the check box for Enable version control.
 * 5) Click OK.

back to the top

Add Stored Procedures to Visual SourceSafe
To add the Stored Procedures to Visual SourceSafe, follow these steps:  On the computer running SQL Server, verify that SQL Server is running under a domain account. Use the VSS Administration tool, to verify that the domain account has been added to the VSS database. Run Setup for Visual Studio .NET. On the Options Page, expand Server Components, and then click to select the check box for VS 6 Stored Procedure Version Control. Verify that only VS 6 Stored Procedure Version Control is selected. Start Visual Studio .NET, and then enable Version Control for Stored Procedure (see the &quot;Enable Version Control for Stored Procedures&quot; section). In Server Explorer, expand Data Connections, and then expand the relevant Database Reference. Right-click the Stored Procedures folder, and then click Add to Source Control. In the Enable Source Control dialog box, type the Source Control Database Location.

Note The Source Control Database Location is the path of the VSS database. <ul> If the VSS database is located on the computer running SQL Server, type the local path relative to the computer running SQL Server (for example, C:\VSS\srcsafe.ini ).</li> If the VSS database is located on a remote computer, type the location of the remote computer as a universal naming convention (UNC) path (for example, \\ProjectServer\VSS\srcsafe.ini ).</li></ul> </li> In the Source Control Project Name text box, type the VSS project name.

Note Do not use the &quot;$/&quot; prefix in the Source Control Project Name text box. Visual Studio ,NET adds this prefix automatically.</li> In the Source Control Login dialog box, type the VSS Login ID and the Password, and then click OK.</li> In Server Explorer, expand the Stored Procedures folder, right-click the Stored Procedure name, and then click Add to Source Control.

Note In Server Explorer, a lock icon appears next to the name of each Stored Procedure that has been successfully added to Source Control.

In Server Explorer, you can right-click the Stored Procedure name to perform typical VSS actions such as Check Out, Check In, and Undo Checkout.</li> You can add more than one Stored Procedure at the same time to VSS. To select more than one Stored Procedure, follow these steps: <ol style="list-style-type: lower-alpha;"> Hold down CTRL, and then click each Stored Procedure that you want to add.</li> When you have selected the Stored Procedures, right-click any selected Stored Procedure, and then click Add to Source Control.</li></ol> </li></ol>

back to the top

<div class="references_section">