Click here to Skip to main content
Licence CPOL
First Posted 4 May 2007
Views 16,201
Downloads 159
Bookmarked 20 times

Automated Database Change Management Process

By | 4 May 2007 | Article
The uploaded .NET solution includes the implementation of a database change management process that, if applied correctly, can dramatically reduce the time you spend synchronizing various versions of application databases in development, staging, and production environments.
 
Part of The SQL Zone sponsored by
See Also

Introduction

If you've arrived at this page, you've most likely come by way of the 2007 Austin .NET User Group (ADNUG) Code Camp. The attached software contains the software elements of a comprehensive Database Change Management process. It simplifies the process of keeping multiple database environments in synch (i.e., development, staging, and production). The process works by allowing developers to commit SQL scripts to the source code repository alongside their other code files. A NAnt build script is also included which will actually execute these scripts in order against a specified database. In addition to storing SQL schema change scripts, the Northwind.Database project in the solution stores database creation scripts. As a result, the included NAnt script can be used to easily create a new database instance or update any existing instance managed by the process.

Using the code

To begin using the attached solution, you must have either SQL Server 2005 or SQL Server 2005 Express. Simply follow these steps to set up the solution and watch the database change management process in action:

  1. Open solution trunk\source\Northwind.sln.
  2. Build the solution.
  3. Set Northwind.DatabaseUpdater as the Startup project.
  4. Run the solution (which will execute Northwind.DatabaseUpdater).
  5. Make sure the following five settings are selected on the form that appears, and click the Update button.
    • Action = Update
    • Type = SqlServer200x
    • Server = SQL Server 2005 instance name (.\SQLExpress by default)
    • Database = Northwind
    • Username and Password = Leave blank
    • SSPI (integrated security) = Checked

Note: if you change the server name to something other than .SQLExpress, you'll need to update TestingConnectionStringProvider accordingly.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Kevin Hurwitz



United States United States

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralA similar approach to the one I'm trying to promote PinmemberMaxGuernsey19:56 24 Feb '08  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 4 May 2007
Article Copyright 2007 by Kevin Hurwitz
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid