Sample batch files Sample 5 - Restore a database transaction log up to a point in time
Sample 5 - Restore a database transaction log up to a point in time
This script is executed after the database is restored. The database will be restored to the specified point in time (Feb 16, 2006 at 2:03:00 PM), which precedes the date of the backup log (Feb 16, 2006 at 2:03:21 PM).
OPERATION RESTORE OBJECTTYPE TRXLOG STOPAT 20060216/14:03:00 DATABASE Northwind NBIMAGE cadoo.MSSQL7.CADOO.trx.Northwind.~.0.001of001.20060216140321..C MAXTRANSFERSIZE 0 BLOCKSIZE 0 SQLHOST "CADOO" SQLINSTANCE "SECOND" NBSERVER "CHISEL" BROWSECLIENT "CADOO" ENDOPER TRUE
Note: If STOPAT is not specified, then the database would be restored to the date of the backup log.
Note: You do not need to manually stage the restoration of the database backup and the associated log files. Create the script in the Restore Microsoft SQL Server Objects dialog box.
Note: Since RECOVEREDSTATE was not specified, the database will be restored to a recovered state following successful execution of this script.