1--Simulating a disaster when restoring a Adventurework database Example STOPAT 2 3 BACKUP database AdventureWorks 4 to disk= ' D:\MSSQL\Databackup\AdventureW Orks.bak ' 5 6 BACKUP LOG AdventureWorks 7 to DISK = ' D:\MSSQL\Databackup\AdventureWorks.trn ' 8 GO 9--an attempt to create a tail-log backup after a disaster BACKUP LOG AdventureWorks11 to disk= ' D:\MSSQL\Databackup\AdventureWorkstail.trn ', with norecovery;13 GO14--------- -----------------------------15--Use the interface to complete the two steps together 16--Restore a full backup from backup the Restore DATABASE AdventureWorks18 from DISK = ' D:\MSSQL \databackup\adventureworks.bak ' File=1,norecovery20 21--Restore a normal log backup from backup the restore log AdventureWorks23 from DISK = ' D:\MSSQL\Databackup\AdventureWorks.trn ' with norecovery;25-------------------------------------------- ------------------27 28-Restore tail-log backup with Stopat restore log AdventureWorks30 from disk= ' D:\MSSQL\Databackup\ Adventureworkstail.trn ' + stopat= ' 20:59:00 ', recovery;33 GO
Birch Note 4-Xu imitate disaster occurs when restoring Adventurework database example Stopat