Oct 31 2008

Integrating SourceSafe / VSS with SQL Server 2008

Published by Kevin Gao at 2:08 pm under SourceSafe

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

Links:
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

4 responses so far

4 Responses to “Integrating SourceSafe / VSS with SQL Server 2008”

  1. Sue Masseyon 31 Oct 2008 at 2:30 pm

    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.

    Thanks..

  2. kevinon 03 Apr 2009 at 8:25 pm

    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

  3. Josee Sevignyon 29 Apr 2009 at 10:40 am

    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)?

  4. Joeon 18 Sep 2009 at 7:42 am

    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?

Trackback URI | Comments RSS

Leave a Reply

Version Control Software/System | Source Control Software/System | Software Configuration Management | SCM Hosting Solution | Bug Tracking System
SourceSafe (VSS) Replacement/Alternative | SourceSafe (VSS) Hosting | SourceSafe (VSS) Remote/Web/Internet Access | Scanner COM
Customer Service Software | Live Chat | Live Help | Forum Software | Knowledge Base Software | Newsletter Email Marketing Software