Home > SQL Server Tips > Database Administration > Pointers for SQL Server parallel upgrades
SQL Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DATABASE ADMINISTRATION

Pointers for SQL Server parallel upgrades


Serdar Yegulalp
10.31.2007
Rating: --- (out of 5)


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


When moving from one installation of SQL Server to another, whether it's the same iteration of SQL Server or a higher revision, it helps to do things in parallel. A parallel upgrade means installing the new database product side by side -- either on the same system or on a different one -- with your existing database, and moving or copying data between the two. This sort of operation seems easy enough, but there are a couple of caveats involved, especially when doing a parallel upgrade on the same system.

First, some context. One of the nicer features of SQL Server is that it supports multiple instances of the program on the same computer. This allows you to have one (or more) copies of, say, SQL Server 2000 running side by side. If you're upgrading to SQL Server 2005 or 2008 on the same box, you can install the newer version of SQL Server along with them and simply run it as a separate instance.

It's the exact process of migrating that can often be sticky, and there are three basic ways you can accomplish a SQL Server migration:

Each approach works best in specific scenarios. The first two tend to work best with a relatively small database (a couple of gigs or less). They also work well when you plan on moving the database to another storage device, especially if you're also planning to repartition the database's physical file structure. Backup and restore is handy since it has the added side bonus of creating a backup copy before the migration that you can stash somewhere. For really big databases, however, it might not be practical. The third option, detach and reattach, is the best overall option. It works no matter what size database you're using. It's also the best way to work if you're hosting the data structures on an external storage device like a SAN, since the files don't have to be copied or recreated anywhere.

In each case, be aware of how parallel installations on the same machine will impact performance. Main


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


RELATED CONTENT
SQL Server Migration Strategies and Planning
Using Microsoft Hyper-V for SQL Server consolidation
Migrating to SQL Server 2008 and leveraging new features
The challenges of SQL Server consolidation
Testing a SQL Server environment before an upgrade
SQL Server Consolidation Fast Guide
SQL Server consolidation strategies and best practices
Does upgrading to SQL Server 2008 fit your business?
A guide to advanced new features in SQL Server Management Studio 2008, part 2
A guide to basic new features in SQL Server Management Studio 2008, part 1
SQL Server virtualization pros and cons: Weigh the performance impact

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

Database Administration
Top load balancing methods for SQL Server
Performance implications of transaction log autogrowth in SQL Server
The keys to database backup protection for SQL Server
Understanding transparent data encryption in SQL Server 2008
Working with sparse columns in SQL Server 2008
Determining the source of full transaction logs in SQL Server
Implementing SQL Server 2008 FILESTREAM functionality
Improving SQL Server full-text search performance
Using the OPENROWSET function in SQL Server
New replication features in SQL Server 2008 and what they mean to you

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
application server  (SearchSQLServer.com)
Yukon  (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


ly, this manifests in two ways:

1) whether or not you're taking the original installation offline for the sake of the migration, and 2) if you're not, how disk operations for the migration are going to affect usability. On the whole, you're probably best off setting up a formal window of downtime and performing the migration in single-user mode (i.e., nobody's using the database except you) whenever possible.

If you're required to keep things running while performing this migration, detach and reattach are almost certainly going to be out of the picture. You'll most likely have to use direct migration or backup/restore. You'll get the best results if you're backing up to and restoring from a physical drive that does not actually host the database tables themselves. The process will unfold that much faster, and you won't interfere as much with existing database operations.

When you are moving between instances of SQL Server 2005 and higher, one option for the sp_detach_db stored procedure (which is used to perform the detach operation) that isn't available in earlier versions of SQL Server is the KeepFulltextIndexFile option. It preserves any full-text indexes that have already been created on that database. If you rely on full-text indexing and don't want to recreate those indexes from scratch -- which, again, reduces disk activity if you have other database instances running -- this method comes in handy.

Incidentally, the sp_attach_db stored procedure has been used in the past for reattaching a database, but it's being phased out. Get into the habit of using CREATE DATABASE with the FOR ATTACH clause instead. Among other things, sp_attach_db is limited by the number of physical files used by the database -- and I doubt that most production-level databases are all in one physical file by now. Be sure to make the character set, sort order and Unicode collation the same on both instances of SQL Server when you perform a detach/reattach operation. One final bit of cleanup you may need to perform when migrating is repairing any orphaned user entries in the database. But, as you'll see, this isn't too difficult a situation to deal with.


[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