February 18, 2009 at 12:54 am
Hi,
Could you give some simple Restore script. I found some on this forum, but I need some to understand.
1.to restore full backups to different drives
2.to restore diff backups
3.to restore log backup
4.to restore full,diff and log (single restore script for all backups)
regards
Kln
February 18, 2009 at 6:55 am
Restore basics: How to restore using T-SQL commands
http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1173442,00.html#
MJ
February 19, 2009 at 7:45 am
klnsuddu (2/18/2009)
Hi,Could you give some simple Restore script. I found some on this forum, but I need some to understand.
1.to restore full backups to different drives
2.to restore diff backups
3.to restore log backup
4.to restore full,diff and log (single restore script for all backups)
regards
Kln
Hi,
1. you can use the "with move" option to restore to different drives.
-----------------------------------
To find logical file names use :
---------------------------------
RESTORE FILELISTONLY
FROM DISK = 'D:BackUpYourBaackUpFile.bak'
GO
RESTORE DATABASE
FROM DISK = 'D:\BackUpYourBaackUpFile.bak'
WITH MOVE 'YourMDFLogicalName' TO 'D:\DataYourMDFFile.mdf',
MOVE 'YourLDFLogicalName' TO 'D:\DataYourLDFFile.ldf'
For 2, 3 and 4 reffer to BOL: http://msdn.microsoft.com/en-us/library/aa238405(SQL.80).aspx
Hope this helps,
\\K 🙂
______________________________________________________________________________________________________________________________________________________________________________________
HTH !
Kin
MCTS : 2005, 2008
Active SQL Server Community Contributor 🙂
February 19, 2009 at 2:25 pm
klnsuddu (2/18/2009)
Hi,Could you give some simple Restore script. I found some on this forum, but I need some to understand.
1.to restore full backups to different drives
2.to restore diff backups
3.to restore log backup
4.to restore full,diff and log (single restore script for all backups)
regards
Kln
hey....check out this BOL link
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/877ecd57-3f2e-4237-890a-08f16e944ef1.htm
It will help u understand the restore process...and then u can write scripts as per your needs....
Regards,
[font="Verdana"]Sqlfrenzy[/font]
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply