Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 copying SQL2000 DB

Author  Topic 

nicolo
Starting Member

20 Posts

Posted - 2005-04-08 : 15:28:04
I have an old server that is in the process of getting phased out for a faster more powerful server. I want to copy a specific database on the old server to the new server however, the machines are dissimilar in terms of hardware, partitions, disks, etc. The first machine only has 3 drives with raw data volumes on E: and F: partitions while the new machine has a huge E: paritition sitting on a RAID-5 volume.

What is the best approach towards copying this specific database (and all it's tables, structures,etc) to the new machine with minimal downtime? I don't want to move the database, rather copy it over and get it working on the new machine before deactivating the old machine.
Do the partitions HAVE to the be the same? What about detach/attach? Does that move the database off from the old machine forever or does it merely mean it will take it offline to allow me to copy MDF/LOG files?

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-04-08 : 16:09:37
I usually do it something like this:

"This procedure can be used to move a live production database from one server to another with minimal downtime and no data loss. The new database server should already be setup with the same version and service pack as the old server and be setup to production standards, including tape backups.

1. Make sure the old database is in full recovery mode and is running transaction log backups about every 15 minutes.

2. Setup all the logons on the new server that are in the database on the old server.

3. Make a full backup of the old database, and restore it onto the new server WITH NORECOVERY. Use the WITH MOVE option to place the database files in the correct directories

4. Restore the transaction logs from the old database to the new database in order WITH NORECOVERY.

5. Set the old database to DBO ONLY, and get all of the users out of the database.

6. After you are sure there is no one in the old database and all work is complete, make one last transaction log backup and then set the old database to READ ONLY.

7. Restore the last transaction log backup to the new database WITH RECOVERY and RESTRICTED_USER.

8. Setup a backup job for the new database, and run it.

9. Setup a transaction log backup job for the new database and start it running.

10. Turn off the DBO ONLY on the new database.

11. Point the applications at the new database."





CODO ERGO SUM
Go to Top of Page

nicolo
Starting Member

20 Posts

Posted - 2005-04-13 : 14:18:18
Thanks Michael but if I just did a full backup of the old database and restored it into the new machine, would that do that same thing?
I tried that already and it does work, but there is a slight lag when pulling or querying records...even though this machine is dual CPU
Go to Top of Page
   

- Advertisement -