Friday, March 30, 2012

If I want to restore a backup on a different computer?

Hi,
Please guide which options are important and should be selected if I
plan to restore the backup being taken to be eventually restored on a
computer which is not on the LAN.
Also, once the backup is done, will I be able to restore the backup if I
only have the MDF file or do i also need the LOG file?
Thanks.
Hi,
There are 2 options for you.
1. MDF and LDF files to destination
2. Backup the database copy the .BAK files to destination
1.
a. SP_detach_db to detach the database from source server
b. Copy the MDF and LDF to a new location and then execute sp_attach_db
to attach the database in source server
c. Send the file to destination server
d. Execute sp_attach_db to attach the database
2.
a. Backup the datbase using BACKUP DATABASE comand in source server
b. copy the .BAK file to destination
c. restore the database using RESTORE DATABASE comamnd
Note:
It is always safe to have MDF and LDF in first approach.
Refer books online for command usage.
Thanks
Hari
MCDBA
"Learner" <wantnospam@.email.com> wrote in message
news:MPG.1af64861bf5b817c9896fa@.msnews.microsoft.c om...
> Hi,
> Please guide which options are important and should be selected if I
> plan to restore the backup being taken to be eventually restored on a
> computer which is not on the LAN.
> Also, once the backup is done, will I be able to restore the backup if I
> only have the MDF file or do i also need the LOG file?
> Thanks.

No comments:

Post a Comment