Database Change Management
Database Change Management
Home | Profile | Register | Active Topics | Active Polls | Members | Private Messages | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?




 All Forums
 Managing Changes To SQL Server Code
 General SQL Change Management Discussions Forum
 Please clarify db dev process
 New Topic  New Poll New Poll
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

TuanMinhChau


3 Posts

Posted - 11/21/2006 :  17:29:14  Show Profile Send TuanMinhChau a Private Message  Reply with Quote
Could you clarify the following (taken from your web page)

-Check out the table in your Source Management System
-Add a column (or foreign key, index, constraint etc.)
-Make the changes to your dev database
-Do your unit testing/bug fixing
-Run DB Ghost to verify that nothing in the schema or data has been broken by the change
-Check the table back into your Source Management System


The process you describe above is confusing to me. You say "Add a Column", then "Make the changes to your dev database". Do I have to make the change in two places?

Or...

When I make a change to the schema, am I doing this offline, or do I first need to deploy a database? If the former, can I use dbghost to deploy the modified scripts to a new database so I can unit test to check my schema change? If the latter, can dbghost synch my database back to the scripts? After this I would check back in any changed files? Is there a preferred or recommended process?

Thanks for clarifying it!

Tuan

Tuan Minh Chau

Google AdSense

USA
Mountain View


leachm



125 Posts

Posted - 11/22/2006 :  14:22:36  Show Profile  Click to see leachm's MSN Messenger address Send leachm a Private Message  Reply with Quote
Hi Tuan,

Actually we could do with updating that list on our website in light of your comments. A better sequence would be:

1. Check out table
2. Make amendments to that table wherever (central or local database) and however (Enterprise Manager, Query Analyzer, 3rd party tool etc.) you wish.
3. When you're done with making the changes script out the table CREATE script over the top of the one originally checked out
4. Run a DB Ghost build of all the CREATE scripts to make sure that there are no syntax errors and all dependencies are OK.
4. Check the table script back in to source control along with all your other code.

Basically you can regard the set of CREATE scripts under source control as the "source database" which means that you get a full audit trail of changes if developers make changes in the manner described above.

How each developer codes those changes is entirely up to them - just so long as they check in the changes they want propagated up to the test and production databases.

I hope this clarifies things :)


regards,

Malcolm Leach
You must be logged in to see this link.
DB Ghost Build, Compare and Synchronize = Change Management for SQL Server
Go to Top of Page

TuanMinhChau



3 Posts

Posted - 11/23/2006 :  06:46:43  Show Profile Send TuanMinhChau a Private Message  Reply with Quote
Thanks Malcolm,

It's a little clearer. So the recommended process after the check-out, is to modify the object on a real database, rather than to edit the object file from source control (ie, off-line)? I guess that I can do it off-line too, and build a database with the scripts to validate it?

Assuming I modifiy the object on the database, which is how I like to work, should I script the object out using your Script tool, or Enterprise Manager, or doesn't it matter as long as I replace the existing one with the new one? ie, does DBGhost care what app has scripted out the changes.

Thanks!

Tuan
Go to Top of Page

leachm



125 Posts

Posted - 12/19/2006 :  03:10:47  Show Profile  Click to see leachm's MSN Messenger address Send leachm a Private Message  Reply with Quote
You're right, it doesn't matter whether or not you use the Scripter tool or Enterprise Manager/Management Studio.


regards,

Malcolm Leach
You must be logged in to see this link.
DB Ghost Build, Compare and Synchronize = Change Management for SQL Server

Edited by - leachm on 12/19/2006 03:11:25
Go to Top of Page

Dave



7 Posts

Posted - 02/15/2008 :  09:32:44  Show Profile Send Dave a Private Message  Reply with Quote
This reply probably comes a bit late, but the process as I see it in my environment is as follows.

1. Retrieve scripts from source control
2. Developer manually modifies the script files for the objects they want to change
3. Apply those individual script files to their local or dev environment (where they are doing their active development.)
4. When development is complete, run dbghost to build a clean db to validity check the scripts
5. Check into source control
6. Use db ghost to compare and apply changes onto QA and above environments.

The key here to me is not having the developers edit their dev db but get them to actually edit the scripts and apply individual scripts to get their changes. My main reason for this is that it keeps some of the ancillary sql stuff (default names etc) from creating more updates than I would like, and also from developers slipping in "mess" that they haven't realised they created along the way. I only use the scripting out of the db to create my initial source code environment and totally drive them to use the db source files (generated by dbghost) as the definition for all databases.
Go to Top of Page

leachm



125 Posts

Posted - 02/15/2008 :  17:03:08  Show Profile  Click to see leachm's MSN Messenger address Send leachm a Private Message  Reply with Quote
Hi Dave,

Yes, that's perfect :)

regards,

Malcolm Leach
You must be logged in to see this link.
DB Ghost Build, Compare and Synchronize = Change Management for SQL Server
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  New Poll New Poll
 Reply to Topic
 Printer Friendly
Jump To:
Database Change Management © Copyright 2005 Innovartis Ltd. Go To Top Of Page
Snitz Forums 2000
RSS Feed 1 RSS Feed 2
Powered by ForumCo 2000-2008
TOS - AUP - URA - Privacy Policy
ForumCo Free Blogs and Galleries
Signup for a free forum or Go Banner Free