6

I'm tasked with doing a SQL Server 2000 to 2005 migration. I will be doing a side-by-side migration. I've read from a few different sources that I can either:

  • Perform a backup of the database on SQL Server 2000, ship that backup to the new hardware and restore the database in SQL Server 2005; or

  • Detach the database on SQL Server 2000, copy the data and log files to the new hardware and attach the files in SQL Server 2005.

Is there a difference between these methods? Which is the safest?

I've been through the pre-upgrade tasks of checking the database with Upgrade Advisior and I have no warnings to resolve before the migration.

Any comments would be greatly received.

1 Answer 1

8

For speed (eg less downtime) backup/restore. Backup/restore is quicker because of Instant File Initialisation (only for MDF). The actual backup file is a lot smaller then the MDF/LDF sizes so copies quicker.

It's arguably slighty less risky because there is no downtime on the SQL 2000 instance.

However, detach removes access to the old database. You'll have to take this offline with a backup/restore. If there is a risk of end users connecting, use this (or take offline as soon as backup is complete)

Basically, it's whatever suits you best. I've used both methods for a recent server migration.

2
  • It's possible that you don't want people accessing the database (for insert at least) once you've started the backup -- you'll be losing their changes when you restore it somewhere else. My point is this: sometimes downtime's unavoidable.
    – Roger Lipscombe
    Commented Sep 16, 2009 at 14:24
  • Are there any considerations to detach/attach since it is a version upgrade? Will that even work? I know with BACKUP/RESTORE the internal DB versions need to be upgraded when you restore to a higher version. I've never attempted a detach/attach, I always do backup/restore when moving up versions. Commented Dec 20, 2016 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.