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
 General SQL Server Forums
 New to SQL Server Administration
 How to restore Full backup & multiple log backup

Author  Topic 

Ravikumarc
Yak Posting Veteran

51 Posts

Posted - 2009-09-23 : 12:39:02
Hi All,
Pls help me out in this issue...

I have server A and B.here i want to restore full backup and multiple logbackup from server A to B. Server A contains n no of logfiles.

were as Server A is a repository which contains the backup & log files.
Im not using logshipping..so pls assist me in scripts...

Thanks
Ravi

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2009-09-23 : 15:19:53
Copy the backups to Server B

Restore the full backup WITH NORECOVERY
restore database databasename from disk = 'backup file' with norecovery


Restore the Log backups WITH NORECOVERY
restore log databasename from disk = 'backup file' with norecovery


when the last log has been restored, issue the following command:
restore database databasename with recovery
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2009-09-23 : 16:31:32
Note that you need to restore all of the log backups, in sequence.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

Ravikumarc
Yak Posting Veteran

51 Posts

Posted - 2009-09-23 : 18:33:16
Thanks for yr help...
I have another query..

Pls find the below script which i have used to restore full backup.

1) In server A the folder Test contains old backups so how to take Current backupfile ???
2) DB test contains 2 MDF files so How to restore full backup of two data files ???

RESTORE DATABASE Mytest
FROM DISK = '\\Server A\c$\Documents and Settings\test\Testbackup.bak'
WITH
MOVE 'Mytest_data' TO 'C:\test\mytest_data.mdf',
MOVE 'Mytest_log' TO 'C:\test\mytest_log.ldf'


quote:
Originally posted by mcrowley

Copy the backups to Server B

Restore the full backup WITH NORECOVERY
restore database databasename from disk = 'backup file' with norecovery


Restore the Log backups WITH NORECOVERY
restore log databasename from disk = 'backup file' with norecovery


when the last log has been restored, issue the following command:
restore database databasename with recovery


Go to Top of Page
   

- Advertisement -