dbTalk Databases Forums  

restore backup and roll forward versus detach/attach?

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss restore backup and roll forward versus detach/attach? in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
aj
 
Posts: n/a

Default restore backup and roll forward versus detach/attach? - 02-17-2010 , 02:53 PM






SQL Server 2005 SP2 9.0.3054

I would like to move my DB (with Full Recovery Model) onto a
/different/ server. I would like to do this w/o losing any
transactions.

My question relates to when it is appropriate to:

1. restore my last DB backup onto the destination server, then roll
forward any logs that were backed up subsequent to that backup

Versus

2. detach the database from the source server, then attach at the
destination server

Note that I want to move my database, so its alright if it disappears
from the source server. Note also that I might want to change the
location of MDF/LDF files.

I can see how if you have a really large database, and a short
maintenance window, it might make sense to restore a backup onto the
destination server beforehand, then roll forward logs onto it right
up until the maintenance window.

But whats if its a smaller database that can be easily detached and
then attached during a maintenance window? When would I pick one
approach over the other? Does one method do a more complete/thorough
job of placing the new database into the instance?

Any thoughts appreciated.

TIA

aj

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: restore backup and roll forward versus detach/attach? - 02-19-2010 , 11:47 AM






aj (ronald (AT) mcdonalds (DOT) com) writes:
Quote:
SQL Server 2005 SP2 9.0.3054

I would like to move my DB (with Full Recovery Model) onto a
/different/ server. I would like to do this w/o losing any
transactions.

My question relates to when it is appropriate to:

1. restore my last DB backup onto the destination server, then roll
forward any logs that were backed up subsequent to that backup

Versus

2. detach the database from the source server, then attach at the
destination server

Note that I want to move my database, so its alright if it disappears
from the source server. Note also that I might want to change the
location of MDF/LDF files.
Personally, I prefer BACKUP/RESTORE, because it is one less file to copy
around. In your case you could set the database into single-user more before
you back it up, so that on one strays there by mistake.

There is no problem with changing the location of the files with RESTORE,
use the WITH MOVE option.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.