Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pull stored procedures from sql server to database project

I have a sql server database which has a number of stored procedures. I would like to add these stored procedures to TFS source control in to database project.

It would be a difficult and time consuming task to copy all these over one by one. Is there any automated way or tool that pulls all stored procedures from a database and adds to visual studio database project?

like image 745
amateur Avatar asked May 18 '26 16:05

amateur


1 Answers

It will depend on the version of SQL Server and Visual Studio, but assuming SQL Server 2012 and Visual Studio Premium 2012 or higher

If you have a database project in Visual Studio, you should be able to do a schema compare to the database and pull in all of the objects from the database including stored procedures.

There are some others who have asked similar questions.
For example: http://forums.asp.net/t/1847000.aspx/1 which links to http://msdn.microsoft.com/en-us/data/hh297028 for a SSDT guide.

like image 139
wilsjd Avatar answered May 20 '26 07:05

wilsjd