Home > SQL Server Tips > SQL Server Management > Upgrade to SQL Server 2005 and maintain older database
SQL Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

SQL SERVER MANAGEMENT

Upgrade to SQL Server 2005 and maintain older database


By Michelle Gutzait, Contributor
11.28.2006
Rating: -3.00- (out of 5)


Expert advice on database development
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


You are about to upgrade your databases from SQL Server 2000 to SQL Server 2005. You have tested everything before the upgrade and the applications have proven stable. But, you would still like to be sure that you can fall back to your old environment if any problems arise after the upgrade -- without losing any data modification.

This article highlights methods to keep databases in the old (SQL Server 2000) databases up to date until the new environment is proven to be robust.

Methods of keeping old SQL Server environment up-to-date:

In SQL Server, there are number of methods for duplicating data modifications to another database:

Let's discuss these methods:

Log shipping
Can we log ship between a SQL Server 2005 database (primary) to a SQL Server 2000 database (secondary)...?
I tried to dig up a positive answer to this question on the Internet and had no luck. Then I tried to be creative and find a solution by myself using the standard tools that are shipped with the product. No way, Jose…I was only able to log ship from SQL Server 2000 to SQL 2005 using the WITH NORECOVERY state in the secondary database, but not the other way around. So the answer is "No," using log shipping for that is not feasible.

Copy Database
Unfortunately, when starting the Copy Database Wizard, when the Source and Destination versions are different, you will get an error message and will not be able to proceed.

Replication
Transactional replication
Transactional replication is working between the two versions. There are two problems with this solution: Snapshot replication
This solution works but with few exceptions. For example, if there are User-Defined-Datatypes assigned to the table and have to be create


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Microsoft SQL Server Installation
Creating fault-tolerant SQL Server installations
SQL Server consolidation: Why it's an optimization technique
SSIS error message due to installation problem on SQL Server 2005
Get SQL Server log shipping functionality without Enterprise Edition
How to create a SQL Server linked server to DB2
Tutorial: Migrating to SANs from local SQL Server disk storage
How to restore SQL Server database to transition server during upgrade
SQL Server 2005 log shipping setup using the wizard
SQL Server tools don't appear in menu after SQL Server 2005 install
Troubleshoot SQL Server 2005 SP2 installation error
Microsoft SQL Server Installation Research

SQL Server Replication
Top load balancing methods for SQL Server
New replication features in SQL Server 2008 and what they mean to you
SQL Server database replication tutorial
Licensing a standby server for SQL Server replication
Upgrade live applications to SQL Server 2005 for high availability
Tool to synchronize two SQL Server databases
Simplify SQL Server replication
Replication techniques in SQL Server
Podcast: SQL Server high availability options
Managing identity columns with replication in SQL Server

Microsoft SQL Server 2005 (Yukon)
SQL Server Reporting Services Fast Guide
SQL Server Service Broker Tutorial and Reference Guide
Tips for tuning SQL Server 2005 to improve reporting performance
SQL Server consolidation: Why it's an optimization technique
Parent-child dimensions in SQL Server 2005 with Analysis Services MDX
Enforcing data integrity in a SQL Server database
SSIS error message due to installation problem on SQL Server 2005
Should you upgrade to SQL Server 2005 or SQL Server 2008?
Basics for working with DATETIME and SMALLDATETIME in SQL Server 2005
How to configure Database Mail in SQL Server 2005 to send mail
Microsoft SQL Server 2005 (Yukon) Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
replication  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


d before the table is created, this will fail because there is no CREATE TYPE command in SQL 2000.

SQL traces
The workload can be captured with the SQL Server Profiler or SQL Trace and exported to SQL script. The script can run against the secondary database.

Problems with this solution include the following:

Programming
If you have a small amount of migrated databases, you may think about programming database components to transfer data modifications.

Examples:

  • Using triggers – this may affect performance since triggers are part of the transaction.
  • Using DTS or BCP to transfer data – this method can be heavy depending on the data size.
  • Third-party tools
    You can use third-party tools, such as Log Readers to read the SQL commands from the transaction log, script and then execute them in the secondary database. Also, although I couldn't find such a tool myself, there might be a tool that can backup transaction logs in SQL Server 2005 and restore them in SQL Server 2000 without problems.

    Others
    You can also be creative…
    For example, in some cases you can log ship to a secondary SQL Server 2005 database, change its compatibility level to 80 and then backup and restore it to a third database.

    Conclusion
    For critical databases, it might be a good idea to keep the old version of an upgraded database with the latest data modifications in case there's need to fallback.

    But…There is no "best solution" for that matter. You must analyze your database characteristics and structure and decide the best solution for your needs. Personally, I prefer replication for fast and reliable solution.


    [TABLE]


    Rate this Tip
    To rate tips, you must be a member of SearchSQLServer.com.
    Register now to start rating these tips. Log in if you are already a member.




    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



    SQL Server Development - .NET, C#, T-SQL, Visual Basic
    HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts