December 12, 2010 at 6:59 pm
What is the easiest/fastest way to restore a 20 GB database residing on one server to a different server?
Should I use backup/restore. Or detach/attach, or..?
I am new to this. I appreicate any advice..
December 13, 2010 at 6:58 am
Use backup/restore...
December 13, 2010 at 6:59 am
I believe this will grow to be a personal preference. We often use the backup/restore method as it doesn't create any downtime. However, you do have to have the extra space on the server to create the backup file.
The detach/attach method will be faster because you don't have to worry about the time to take a backup. In this case there will be downtime when you detach the database and copy the files over to the new server.
This will completely depend on your SLAs and your infrastructure. Just take a few minutes to test each scenario to see which one works best for you.
December 13, 2010 at 8:29 pm
Thanks for the feedback. Yes we can afford few hours of downtime
So possibly the detach/attach is the way to go. I am going to
Try.
December 15, 2010 at 8:25 am
I would use the backup/restore method...less risky...no chance of the file not re-attaching.
December 15, 2010 at 9:28 am
restore database mydb
from disk = 'd:\data\backup\mydb.bak' with replace
will overwite database at destination server..
December 15, 2010 at 9:38 am
Typically I would just give the answer, however, I think this is a good learning opportunity. Just checkout the RESTORE DATABASE syntax and the REPLACE option.
December 15, 2010 at 9:44 am
Try something like the following:
Use Master
Alter Database zReports
SET SINGLE_USER With ROLLBACK IMMEDIATE
RESTORE DATABASE mydb FROM DISK = 'x:\backup\mydb.bak'
WITH REPLACE
GO
Chris Powell
George: You're kidding.
Elroy: Nope.
George: Then lie to me and say you're kidding.
December 15, 2010 at 10:07 am
yes using "with replace " did the trick..
By the way, the speed I get answers that wrok at this forum is amazing..
Thanks everyone..
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply