Congratulations to all the winners of April 2013, they have won INR 3400 cash and INR 20147 worth prizes !
Go to DotNetFunda.com
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 9788 |  Welcome, Guest!   Register  Login
Home > Articles > Sql Server > Using the TFS as a source control repository for SSMS projects.

Using the TFS as a source control repository for SSMS projects.

Article posted by Vishvvas on 9/3/2012 | Views: 3361 | Category: Sql Server | Level: Advance | Points: 250 red flag


This article explores the feature (of SQL server tools) of adding the projects into source control repository like TFS.

Introduction and background

TFS is one stop solution for source code repository, issue tracker, agile and CMMI implementation. Source control options for DB and database objects has been a challenge for quite some time now though there are many options available.

As TFS is mostly the choice for .NET projects, it becomes obvious that for DB too TFS needs to be used so as to have all source code in one environment and there is consistent way of making changes to such source code.

VS 2010 offers a type of project called “Database project” which includes

  1. Data Generation Plans
  2. Schema Comparisons
  3. Schema Objects
  4. Scripts

This kind of project can be put into source control as other project like website, class library etc. We would see this in different article.

Another option available is to create projects in SSMS (SQL Server Management Studio) and add to source control. We would discuss this option in details in this article.

This write-up includes the TFS plugin for SSMS (SQL Server Management Studio) and its consequent usage as addition into real project in NASCO environment would create a lot of issues, the further part is not explored.

Description

Let’s follow 2 step action where firstly we would set the plugin and configuration settings and then create a project in SSMS and see the simple menu to put into the TFS repository.

Setting the Plugin and configuration

The plugin available for SSMS is called as “Team Foundation Server MSSCCI Provider” which is available at http://www.microsoft.com/en-us/download/details.aspx?id=12128. This needs to downloaded and installed on the developer machine. Once it is downloaded and installed, it would need to be configured.

Once the plugin is selected as shown above then the environment and Plug in Settings sub option needs to be provided under “Source Control”.

Clicking on “Environment” sub option for “Source Control” pops up following screen. Different options like “Visual SourceSafe”, “Independent Vendor” and “Custom” are available. Pl. choose “Independent Vendor” for our exercise.

Choosing the TFS in “Plugin Settings” and enter login id as demonstrated below.

Setting Up the project
 

We are done with setting up the source control for SSMS projects. Next step is to create such project and put such project in chosen repository i.e. TFS for this exercise.

The source control operations can be seen once we create project and add such project to source control. Create a SQL server scripts project executing the following steps.

Different templates like “SQL Server Scripts”, “Analysis Service Scripts”, “SQL Server Compact Edition Scripts” are available and we would explore “SQL Server Scripts”.

Such project can be added to source control as shown below.

Click “Add Solution to Source Control” and following prompt appears where in the location of TFS server and TFS Project needs to be provided.

Once the TFS server details are provided, the credentials for TFS needs to be supplied in following prompt.

Once the authentication is accomplished, the details of projects on TFS server are seen as following and the target location is chosen the SSMS projects is added into TFS.

Yes, we are done with addition of SSMS project into TFS and we would be able to perform the operations like commit, shelve etc.

Summary

The SQL projects in SSMS can be configured to reside in source control repository. For TFS the, the plug in tool can be employed for SSMS which helps to connect to TFS and store, change the source code for the same. Through SSMS the database project which is created through visual studio can’t be opened and hence as of now with professional edition, one can use SQL Server Script through SSMS.This looks like better option than database project if only the source control mechanism is considered.

Red Gate’s offering SQL source control actually is a connector for different repositories like TFS, SVN.

This can really be helpful for versioning of scripts when database is in production. Such versions can be synergized with the front end code version or it can carry its own version. This would definitely solve the challenges
in maintaining the different scripts and versioning thereof.Red Gate’s offering SQL source control actually is a
connector for different repositories like TFS, SVN.

If you like this article, subscribe to our RSS Feed. You can also subscribe via email to our Interview Questions, Codes and Forums section.

Page copy protected against web site content infringement by Copyscape
Found interesting? Add this to:



Please Sign In to vote for this post.

Experience:18 year(s)
Home page:http://www.dotnetfunda.com
Member since:Monday, May 30, 2011
Level:Bronze
Status: [Member]
Biography:Over 16 years of experience, worked across different technologies and programming languages like PB,VB, ASP. C++, C#, VB.NET
>> Write Response - Respond to this post and get points
Related Posts

In this article we will figure out as how to extract values from XML Attributes and present in comma separated values using XQuery

This is part 34 of the series of article on SSIS. In this article we are going to see on how to use an Aggregate (COUNT) data flow transformation control in SSIS packaging.

This article explains about how we can call an SSIS package from another.

In this tutorial, we will see as how to use Row_Number function with lots of practicals.

This artical describes the very basics of joins.

More ...
About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/18/2013 2:41:47 PM