Thursday, June 28, 2007

Version Controlling SQL Server 2000: Real World Experience

Finally, thanks to the MSDN document ("How to add SQL Server 2000 Stored Procedures to Visual SourceSafe by using Visual Studio .NET"), I successfully version controlled the staging database for the production SQL Server. Here's some of the experience that I gained along the way:

- Pay extra attention when entering the Source Control Project (Directory) Name for the database. DO NOT put $/ in the beginning, or otherwise you got tons of freaky error. So like if you want to put stuff in $/Staging_Database , just put "Staging_Database"

- The version control is done within VS.Net 2003 IDE, under Server Explorer-> Servers-> [whatever SQL Server you registred]. If things goes right, you can see the menu item "Add To SourceControl" will show up when you right click on the Store Procedure, or in each Store Procedure item.

- To version control your SQL Server, you HAVE to have VS.NET Control Server components installed on your SQL Server. Otherwise, you won't see the "Add To SourceControl" menu item showing up.

- I am a bit puzzled about why they only allow us to version control Stored Procedure. There are other objects in database that are worthy of version controlling, like table structure and such. Oh well.

- When a stored proc is version controlled, you will see a tiny lock in the SErver Explorer view.

0 Comments:

Post a Comment

<< Home