SQL Server 2005 version control - Only for experts
Well assuming that a 3 tiered architecture of a program written in non object oriented language like visual basic 6.0, it has user interface files, logical files that support functions or functionalities, we will have the final tier…the database tier where sometimes we have all our data stored, some stored procedures and functions, that also contribute to the logical tier.
So the question is: how do I make control version with TFS in Sql server 2005 database?
To those who didn’t understand what I mean, here is a more complete version of the problem:
Our company has a ERP software based on visual basic 6.0 and sql server 2005.
It’s a very large application, and we need to have control version in all development to reduce maintenance costs.
Our product is sold by components (financial component, administrative component, etc).
Each component has several files in asp code, code in the sql database (stored procedures, functions and reports) and finally we have database tables. To each component there are hundreds of asp files, stored procedures, functions, reports and database tables. The database installed in each client is huge.
We need to control the code written and that is assured by TFS (stored procedures, asps, functions and reports) but how in the world do I do control version in SQL Database with TFS? Is it possible?
Your database objects (stored procedures, functions, table definitions, etc) need to be stored in files. The easiest way to do this is with Visual Studio Database Projects.
Click File->New->Project. Choose "Other Project Types"->"Database"->"Database Project". Type in your server connection info.
Once the project has been created, use Server Explorer to connect to your database again. Highlight each database object (you can multi-select), right click, and choose "Generate Create Script To Project".
Once you've finished that exercise, you can bind the database project to version control just like you would an ordinary C# project. If you want to keep your database objects closer to your ASP files, create a project for each and put them in the same solution.
Justin Pinnix
SDE - Version Control Server
Any suggestions on how to do this when you have an existing database with a large # of objects.
For example, we have an existing database with 1000+ stored procedures. Right clicking on each individually and doing the create command is not going to be practical.
If there was a way to assign a function key to this so i could just move down the list and keep typing CTRL-L for example might work but going thru the menu to select the create script option is very slow.
That's the problem. It just lumps them. Tried holding Ctrl or Shift or both and it didn't do a thing. Not very friendly. So working on an existing DB with Team Foundation appears to be a non-starter.
There is another tool called "MSSCCI Provider". I was hoping I could use that from SQL Management Studio. Unfortunately, the support is limited to "use the forums". There is no example page such as, here is how you can get Pubs into Team Foundation. So even starting to figure it out is a pain.
Good luck