Using Visual SourceSafe – Integrating VSS with SQL Server 2008

This article is a part of SourceSafe / VSS Tutorial

Visual SourceSafe can be integrated with SQL Server Management Studio 2008 to facilitate team activities and enable parallel development. We can version control Table, Stored Procedure, Trigger, Rule, etc. in SQL Server 2008.

We cannot directly version control the SQL objects, such as stored procedures and tables, in SQL Server Management Studio. However, SQL Server Management Studio (SSMS) does provide a mechanism to create scripts for most object types. We could create scripts for the database and all its objects via Management Studio, save them to a solution and then add the solution to source control.


In this article, we will see how to add solution/project into source control in SSMS. Here are the steps we can follow:

1. We need to install Visual SourceSafe on the machine hosting SQL Server SSMS.

2. Open SQL Server Management Studio 2008, and click menu Tools -> Options -> Source Control. In the Source Control page, we can select Microsoft Visual SourceSafe as the current source control plug-in.


3. Open an existing project/solution or create a new one through the SQL Server Management Studio menu File. We can open the solution explorer by click menu View -> Solution Explorer.

4. Next, we need to add the solution/project into source control by right-click the solution/project file and clicking Add Solution to Source Control menu. The following dialog box will prompt out:


5. In the Log On to SourceSafe Database dialog box, please enter the credentials and click OK. Then we need to choose a location in the VSS project tree:


6. Now we can add new item/ existing item/ new connection/ new query by right-clicking the project file and click Add. These items will be in the Pending Checkins window. After checking in, the items will be under source control by VSS.


In the following articles, I will talk about VSS integration with SQL Server 2000 and 2005.


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 <<<<: Integrating SourceSafe / VSS with Access 2003
Next article >>>>: Integrating SourceSafe / VSS with SQL Server 2005
SourceSafe How To series home page: VSS / SourceSafe Tutorial

13 thoughts on “Using Visual SourceSafe – Integrating VSS with SQL Server 2008

  1. I remember being able to get true check-out capability of the stored procedure from the Server Explorer Window in Visual Studio, back in VS2005. I remember it being difficult to get to work. I know Red Gate has a product for better source repository integration. Saving scripts is not real source control.

  2. I have a several large Visual Sourcesafe (VSS) databases with scripts of all objects of several large SQL server databases with several thousand objects and years of history in.
    They are organized in a tree-structure with one VSS database containing one VSS project for each SQL database. Each of theese with VSS subprojects for Functions, Tables, Stored Procedures etc.

    Is it possible to create a new SSMS project and connect it to one of the *existing* VSS databases to make it possible to view/check in/check out all the procedures, functions, tables etc. already stored in VSS from within SSMS. Now I have to open each object separately from VSS with the edit command, and save an check in using VSS. (Meaning no integration).

  3. I habve the same problem as Joe. How can we set up sourcesafe be be truly multiuser so any user can check out any version controlled script?

  4. Great article to integrate VSS with Sql server 2008 ide.

    Can you also show the steps to “Get latest version” from sourcesafe?

    If multiple developers add files and check them in sourcesafe, what are the steps for getting the added files in the SQL Server 2008 IDE?

    For example, develper A created a file and check it in sourcesafe, how would developer B get that file in SQL Server 2008 ide?

  5. Great article. Nonetheless, I would like to clarification on SourceSafing SQL objects in a multi-developer environment.
    As a single developer I would be tempted to generate the scripts to a local file that would get SourceSafe’d, but if we are a team of developers potentially working on the same database… We have a networked VSS implementation. It looks like we need to:

    Install VSS client on the SQL Server box (in order to enable the above options)?

    The DBA would then create the above solution on the SQL Server?

    Set the option to always keep checked-out after checking-in?

    Create an SSIS job to Generate Script on all objects?

    Automate(?) a check-in process (if that’s at all possible)?

  6. Hi,

    Nice article. It is a nice idea to have all your scripts in a source controlled project, but this doesn’t really enforce any change control. It would be nice if we could easily sync up between the database objects and project scripts.

    Any advice on achieving something like that?

    Only thing I can think is to write an ssis app to script the whole database out to a .sql file on a routine schedule. Then I could at least always have a solid backup of scripts. I guess I should be looking more into CDC

  7. Hi there,

    I looked over your blog and it looks really good. Do you ever do link exchanges on your blog roll? If you do, I’d like to exchange links with you.

    Let me know if you’re interested.


Comments are closed.