SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 copying SQL2000 DB
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

nicolo
Starting Member

20 Posts

Posted - 04/08/2005 :  15:28:04  Show Profile  Reply with Quote
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)

USA
7020 Posts

Posted - 04/08/2005 :  16:09:37  Show Profile  Reply with Quote
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

Edited by - Michael Valentine Jones on 04/08/2005 16:10:08
Go to Top of Page

nicolo
Starting Member

20 Posts

Posted - 04/13/2005 :  14:18:18  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000