SQL Server Migration restore backup vs copy data and log files

Posted on

Question :

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.

Answer :

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.

Leave a Reply

Your email address will not be published. Required fields are marked *