SQL Server Scripts 2012 Project into Team Foundation Server 2012

▼魔方 西西 提交于 2020-01-04 01:51:49

问题


I have a SQL Server Scripts 2012 Project with multiple SQL queries and stored procedures.

We use Team Foundation Server 2012 to manage our source code for our Visual Studio Solutions.

How can I check in a SQL Server Scripts 2012 Project into TFS? If it is not possible how can I manage source control on this and allow multiple developers access to it?


回答1:


You have a few options, here are two that I have used.

1: Download the TFS 2012 MSSCCI Provider:
This plugin allows you to access TFS from Microsoft SQL Server Management Studio. So you can easily add and check in\out those ssmssln and ssmsproj files from TFS.

64bit Download - 32bit Download

Once installed, in SSMS go to Tools-> Options -> Source Control to select the plugin.
If you don't see it then you probably need to install the other bit version.

After you have selected the plugin in the options window of SSMS, you will have a new menu option under "File" that will allow you to Add\Open\Change items in TFS from Sql Management Studio.

To add your Scripts solution using the MSSCCI plugin:
Open the project in SSMS, go to File -> Source Control -> Add Solution to Source Control

2. Add through VS using the "Add files to Source Control"
See here: To add a file that is not in a solution to version control




回答2:


I'm not quite sure why it would be a challenge to add the sql server scripts to TFS just as any other file in your visual studio solution. I've done this in a lot of projects with great success.

What is a challenge with databases though is to find a good strategy to handle branches and database versioning. I recommend that you have a look at Entity Framework Code First Migrations which handles this very nicely. Another approach is to use Chuck Norris Round house which is a more script based solution:

RoundHouse https://code.google.com/p/roundhouse/

Code First Migrations. http://msdn.microsoft.com/en-us/data/jj591621.aspx

If you start from scratch I would recommend the Code First Migrations approach, but if you allready have a lot of .sql files the second can work very well.




回答3:


The latest versions of MSSCCI still don't seem to work with SSMS 2012 - you'll need an older 32 bit version, here: http://visualstudiogallery.msdn.microsoft.com/en-us/bce06506-be38-47a1-9f29-d3937d3d88d6

Once this is installed you'll be able to see the "Team Foundation Server MSSCCI Provider" in the SSMS Source Control Plug-In selection.



来源:https://stackoverflow.com/questions/20338264/sql-server-scripts-2012-project-into-team-foundation-server-2012

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!