advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Partners & Affiliates
advertisement
advertisement
Average Rating: 5/5 | Rate this item | 2 users have rated this item.
 Print Print
 
An Automated Solution for Migrating Database Structures
Migrating database changes from the development database to the testing, staging, and live databases poses plenty of challenges. Learn why using an automated tool is the best way to deal with these challenges. 

advertisement
anaging the design and creation of database objects such as tables, stored procedures, and views is a fact of life for database developers. Because applications grow and change continually, additions and changes to database structures (or schemas) are a constant part of the development process.

Developers generally create the requisite database objects using a graphical user interface (GUI)-based tool such as Microsoft's SQL Enterprise Manager for MS SQL Server. GUI-based tools offer a powerful, rapid way to create database objects because they automate the details of the work, allowing the developer to focus on improving performance. However, they also hide the SQL commands they use to create the new objects from the developer, which can cause problems when a developer needs to migrate structures between different databases.

The few developers who use a SQL editor to hand code every database object change can use the resulting scripts to make any future database migrations—if (and it is a very big if) in these shared common scripts they save every change in the correct order. When using this process, even one omitted statement can cause chaos.

I believe that using an automated migration tool for database structures is a superior solution to both using the standard GUI-based tools, a process based on paper lists and manual changes, and storing hand-coded statements.

This article details the challenges of pushing database changes from the development database to the testing, staging, and live databases that are used during the development process. It also explains why using an automated tool is the best way to deal with these challenges.

Database Structure Migration Between Development Stages
Many organizations use a range of databases for different stages of their development processes. They might have a development database, a test database, a staging database, and a live production database. Once an iteration of the application is finished and moved onto the next stage, the accompanying database structure needs to be migrated (from a staging database to a live database, for example). Organizations can make this migration in the following three ways:

  1. Delete the target database and replace it with the new one. The advantage of this approach is that it is simple. The major drawback is that any data in the replaced database will be lost. This could be a disaster in a live database, but even a test database contains lots of data for the required range of test scenarios, which would be tedious and time-consuming to replace.
  2. Using SQL Enterprise Manager (or a similar program) to migrate changes from the old database to the new one. In this scenario, a developer or DBA manually adds and modifies database objects via a tool such as SQL Enterprise Manager's user interface. The major problem with this approach is that it is not a documented, repeatable process.
  3. Create a script to convert one database's structure to match that of another. This involves creating batches of SQL statements. These statements contain commands to make the database schema of the live database the same as that of the staging database.
  Next Page: Creating Migration Scripts
Page 1: IntroductionPage 3: Automation Makes Life Easy
Page 2: Creating Migration Scripts 
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
IBM eBook: Planning a Service Oriented Architecture
IBM eBook: Choosing the Right Architecture--What It Means for You and Your Business
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Avaya Article: Using Intelligent Presence to Create Smarter Business Applications
Intel Go Parallel Article: Getting Started with TBB on Windows
Microsoft Article: 7.0, Microsoft's Lucky Version?
Avaya Article: How to Feed Data into the Avaya Event Processor
IBM Article: Developing a Software Policy for Your Organization
Microsoft Article: Managing Virtual Machines with Microsoft System Center
Intel Go Parallel Article: Intel Threading Tools and OpenMP
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
HP Video: StorageWorks EVA4400 and Oracle
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Red Gate Download: SQL Toolbelt and free High-Performance SQL Code eBook
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
Silverlight 2 App and Walkthrough: Leverage Silverlight 2 with SQL Server and XML
IBM Article: Enterprise Search--Do You Know What's Out There?
HP Demo: StorageWorks EVA4400
Microsoft Article: The Progress and Promise of Deep Zoom
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES