SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 139 | Next

James Luetkehoelter

"Pro SQL Server Disaster Recovery"

After that, you can restore as many files as you want as long as you
have a sequential order:
CHAPTER 3 n RESTORING A DATABASE 60
RESTORE DATABASE AdventureWorks
FROM DISK='D:\SQLBackups\AWFull.bak'
WITH NORECOVERY -- We aren't done with our Restore process
RESTORE LOG AdventureWorks
FROM DISK='D:\SQLBackups\AWLog1.bak"
WITH NORECOVERY
RESTORE LOG AdventureWorks
FROM DISK='D:\SQLBackups\AWLog2.bak'
WITH RECOVERY, STOPAT 'Jan 10, 2006 3:10pm'
The previous example restores a full backup and two transaction logs and stops at
3:10 p.m. on January 10, 2006. Note that the STOPAT clause appears after the RECOVERY
clause.
LSN
If you know the exact LSN at which you want to stop the restore, you can stop at that particular
point. But how would you know what LSN to stop at? Well, you could have gotten
it from RESTORE HEADERONLY, by calling PSS, or by receiving a specific error. I??™ve seen this
technique used only once, and it can only be performed via T-SQL:
RESTORE DATABASE AdventureWorks
FROM DISK='D:\SQLBackups\AWFull.bak'
WITH NORECOVERY -- We aren't done with our Restore process
RESTORE LOG AdventureWorks
FROM DISK='D:\SQLBackups\AWLog1.


Pages:
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151