Home > SQL Server Tips > Microsoft SQL Server > Working with multiple versions of SQL Server
SQL Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

MICROSOFT SQL SERVER

Working with multiple versions of SQL Server


Hilary Cotter, Contributor
12.26.2005
Rating: --- (out of 5)


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


As a SQL Server DBA, you most likely have to support a range of SQL Server versions, from SQL Server 7.0 to 2005. While it may be rare to come across version 6.5 still in production, I discover it at client sites more frequently than I am willing to admit. So how can you work effectively in such an environment? This tip outlines considerations to keep in mind when running different versions of SQL Server.

TABLE OF CONTENTS
   Shelf life of SQL Server 7.0 support
   SQL Server community support
   Testing SQL Server functionality

  Shelf life of SQL Server 7.0 support Return to Table of Contents

Microsoft's mainstream support of SQL Server 7.0 will cease on Dec. 31, 2005. This includes all the options and programs customers currently receive, such as no-charge and paid incident support, hourly charge support, warranty claim support and hotfix support. After mainstream support ends, extended support will be offered for business and development software.

Extended support will end on Dec. 31, 2007. This includes all paid support options, as well as no-charge security-related hotfix support. Hotfix support that is not security related requires a separate extended hotfix support contract to be purchased within 90 days after mainstream support ends. Microsoft will not accept requests for warranty support, design changes or new features during the extended support phase.

Since bugs are more likely to be fixed on current versions of SQL Server (as opposed to the deprecated versions) it is good business practice to migrate all applications to current supported versions of SQL Server, if not the most recent version.

Migrating to the next version is frequently hampered by poor design choices that have made the application dependent on older versions of SQL Server. For instance, the application could be reading version-specific registry keys or using undocumented features, reserved keywords or system tables that have changed from one version to another.

  SQL Server community support Return to Table of Contents

The industry trend is to migrate slowly to new versions of SQL Server, typically after the first service pack. The theory is that the product will be vetted by the community and the vendor will have fixed glaring bugs by then.

Many DBAs also feel there needs to be a critical mass of community support (books, newsgroups, Web sites, peers, etc). Once this level of support is established, most DBAs feel a degree of comfort moving to new versions. Management also feels more comfortable knowing there is an available talent pool to draw on to support the product.

  Testing SQL Server functionality Return to Table of Contents

The following are best practices to test functionality when running multiple versions of SQL Server.

Multiple versions on the same machine

When running multiple versions of SQL Server it is often necessary to test functionality across versions. For instance, you must test how an application written in SQL Server 7.0 will work on 2000, or how an application running on 2000 will perform on 2005. It is possible to run all three versions on the same machine. SQL Server 7.0 must be installed first and then instances 2000 or 2005 can be installed.

SQL Server 7.0 shipped with Program Group Item, which allows you to run SQL Server 6.5 on the same machine and toggle back and forth between versions. However, both versions can not run simultaneously nor can they share databases. You can use this switch on 7.0 to run 6.5 when named instances of 2000 and 2005 exist.

Database-compatibility levels

An alternative is to set the database-compatibility level by using the stored procedure sp_dbcmptlevel. This way you can test how an application written for 7.0 will run on 2000 by setting the application database on your 2000 server to 7.0 by using the following command (where pubs is your application database):

sp_dbcmptlevel 'pubs',70

Similarly, you can issue this command on a 2005 database, but keep in mind your application will have to use the SQL Native Client provider to access your 2005 server, so your connection string will have to be different as well.

Backup and restore

You may test functionality by backing up a database and restoring it to a SQL Server running a more recent version. Performance characteristics vary between versions and are typically better as you move toward a more recent version. In some cases you will have to rewrite stored procedures to improve performance or take advantage of new version features. The problem with the backup and restore method is that it only works moving up the version chain; you can't take a 2000 database backup and restore it on a 7.0 server. Some incompatibilities exist between databases of the same version at different service pack levels.

Documentation

It is advisable to keep Books Online installed for all versions of SQL Server you support installed on your desktop. When working on a problem you may need to refer to the version-specific documentation. Having it on hand, especially during high-pressure situations is a blessing.

  Summary Return to Table of Contents

Generally speaking, you should be using the most current versions of SQL Server to avoid functionality issues. Programmers should also be forward thinking and avoid the use of reserved keywords, system tables or any feature that may not be present in subsequent versions of the product.

While you can run multiple instances of SQL Server on the same box and thereby run SQL 6.5 to SQL 2005 on the same machine, a better approach is to use the sp_dbcmptlevel procedure to set your database to be compatible with the version of SQL Server you wish to test. You can restore database from a lower version to a higher version to test compatibility. However, you cannot restore a backup from a higher version of SQL Server to a lower version. It is also wise to keep all versions of the documentation installed on your desktop for quick reference.

About the author: Hilary Cotter has been involved in IT for more than 20 years as a Web and database consultant. Microsoft first awarded Cotter the Microsoft SQL Server MVP award in 2001. Cotter received his bachelor of applied science degree in mechanical engineering from the University of Toronto and studied economics at the University of Calgary and computer science at UC Berkeley. He is the author of a book on SQL Server transactional replication and is currently working on books on merge replication and Microsoft search technologies.


More information from SearchSQLServer.com

  • Article: Are single-platform databases in your future?
  • Learning Guide: SQL Server 2005
  • Topic: Get up to speed on integration and interoperability best practices


  • 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.




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


    RELATED CONTENT
    SQL Server integration/interoperability
    Top 10 SQL Server Integration Services (SSIS) and DTS tips
    Export SQL Server data to an Excel file using SSIS and Visual Studio
    Performance tuning for SQL Server 2005 and Exchange running on SBS
    Custom VB.Net scripting in SQL Server Integration Services
    Can SQL Server 2000 work on Windows 2003 platform?
    Query to search text in old DTS packages in SQL Server?
    Handle slowly changing dimensions with SSIS 2005 wizard
    Run DTS packages within SQL Server Integration Services
    SQL Server Blog Watch
    SQL Server Integration Services how-to

    SQL Server 2005 (Yukon)
    SQL Server data conversions from date/time values to character types
    Basics for working with DATETIME and SMALLDATETIME in SQL Server 2005
    How to configure Database Mail in SQL Server 2005 to send mail
    How to use rank function in SQL Server 2005
    Manage traces in SQL Server 2005 Analysis Services with XMLA commands
    Tutorial: SQL Server 2005 Analysis Services
    Create a computed column in SQL Server using XML data
    Open SSIS packages without validation using these SQL properties
    Using the OUTPUT clause for practical SQL Server applications
    Create DDL table in SQL Server 2005 to audit DDL trigger activity
    SQL Server 2005 (Yukon) Research

    SQL Server overview
    Should you upgrade to SQL Server 2005 or SQL Server 2008?
    SQL Server data conversions from date/time values to character types
    Using full-text search for symbols in SQL Server
    SQL and SQL Server Tutorial and Reference Guide
    How to use the SELECT statement in SQL
    Translating information requests into SQL SELECT statements
    SQL SELECT statement and SELECT query samples
    Using the ORDER BY clause of the SELECT query in SQL
    Using DISTINCT in SQL to eliminate duplicate rows
    Basics for working with DATETIME and SMALLDATETIME in SQL Server 2005
    SQL Server overview Research

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    CORBA  (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

    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.

    HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




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