Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add SQL Server database objects to TFS?

We don't currently have our SQL Server objects in any form of source control. We recently installed TFS 2008 and I'd like to get our SQL server code added. I think I could script all of the database and create script files for each object, but I'm hoping there is a way to point to a database in SSMS and create a project that can be added to TFS or something similar. Basically, I'm look for the simplest way to get from point A to point B. I've installed the TFS MSSCCI Provider and I see TFS in the source control provider options in SSMS. The SQL Server instance is SS2005.

like image 457
Paul G Avatar asked Oct 09 '08 15:10

Paul G


People also ask

How do I connect SQL Server data Tools to TFS?

In the Team Explorer toolbar, select the plus icon highlighted below to open the Connect to Team Project dialog and then select Servers to show you the Add/Remove Team Foundation Server dialog. Finally, click the Add button to create the connection to the appropriate TFS 2010 Server.

How do I create a database project in TFS?

Create SQL Server Database Project In TFS. Let's start by creating the Database Project in Visual Studio. Launch Visual Studio 2015 and create the database project as shown in the image below, using File->New ->Project. Enter a name and click on OK.

What is TFS in SQL?

Team Foundation Server (commonly abbreviated to TFS) is a Microsoft product that provides source code management (either via Team Foundation Version Control or Git), reporting, requirements management, project management (for both agile software development and waterfall teams), automated builds and lab management, ...


3 Answers

If you have a visual studio Team Developer license you can download the Database edition. It has a project type that can bring your tables, sprocs, triggers, etc under source control and check it into TFS.

update:
Redgate has a product called SQL Source Control. Which ties back into several source control systems like TFS, SVN, etc.

like image 149
NotMe Avatar answered Oct 07 '22 23:10

NotMe


You could also try ApexSQL Version, a SSMS add-in for versioning databases and db objects directly in SSMS.

We're in the process of constant improvement and you can also see our roadmap for future improvements in this article: Redesigning ApexSQL Version – The road map

Disclaimer: I work for ApexSQL

Hope this helps

like image 42
Milica Medic Kiralj Avatar answered Oct 07 '22 23:10

Milica Medic Kiralj


I think generating your own scripts is the best way to do it, as described in this excellent series of articles:

http://odetocode.com/Blogs/scott/archive/2008/01/31/11710.aspx

like image 20
Joe Avatar answered Oct 07 '22 23:10

Joe