Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 DB Version Control Tools (sps and tables)

Author  Topic 

sherpa99
Starting Member

20 Posts

Posted - 2006-03-23 : 10:32:17
I currently work with 5 web developers and we are experiencing frustration with tracking changes to our database tables and stored procedures. At the current time we have no source control implemented over our databases and we are thinking it's to time to begin.

A routine problem surrounds recognizing changes. I may work on an enhancement over the course of a month and when it comes time to move my changes to our production machine, it's a very tenuous process -- I'm pretty consciousness about recording changes to stored produces and tables in notepad, but it's very susceptible to human error. We need to know who changed what object and when -- both sps and tables.

What do people use? We do use VSS to our code -- we don't love it but we are sort of resigned to working with it. We currently work on SQL 2000 and are soon to upgrade to SQL 2005. Similarly, we are currently coding with VS.NET 2003, soon to upgrade to VS 2005.

Thoughts?

TimS
Posting Yak Master

198 Posts

Posted - 2006-03-23 : 20:44:07
Might look at this thread http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61248

I currently use visual source safe 2005 to stored my code in.
I store each stored procedure and view as a single file.
I store all the after triggers for a single table in a single file.
( I don't use before triggers.)

I am looking into using DBGhost
http://www.innovartis.co.uk/compare_sql_evaluation.aspx

Tim S
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-03-24 : 00:22:06
We store each Sproc and Trigger in a separate file.

We store all other DDL changes in a "PATCH" file. These are numbered sequentially. They also include any data manipulation statements to get the database from "old version" to "new version".

If we use Enterprise Manager's "Design Table" mode we use the Icon to "Create change script" rather than letting E.M. make the changes

All these files are store in SubVersion for version control.

We have an Sproc that "logs" the execution of a file. So each script starts with:

EXEC dbo.usp_LogScript 'ThisScriptName', '20060304'

the last is a version number - usually today's date.

At rollout we product a list of all scripts that have been run since "last time". We then create a single concatenated file of all these scripts (using DOS/CommandLine to append them)

If you want to automate scripting the whole of the database (e.g. into your Version Control system so you can compare versions over time) have a look at
http://www.nigelrivett.net/DMO/DMOScripting.html

Kristen
Go to Top of Page
   

- Advertisement -