Recover full backup, differential backup, and transaction log backup
The questions are as follows:
A database administrator designs a backup policy for the database: Make a full backup of the database at every Monday; make a differential backup for the database at every day from Tuesday to Sunday; A transaction log backup is performed on the database every day at an interval of 30 minutes (the start time is and the end time is). If the database crashes at on a certain Wednesday, please write down the steps for restoring the database.
The answer is as follows:
-- 1. Restore the last full backup
Restore database dbtest from fullbackup with norecovery
-- 2. Restore the last differential backup
Restore database dbtest from diffbackup with norecovery
-- 3. Resume transaction logs from the last differential backup
Restore log dbtest from logbackup with norecovery, file = 1 -- if all logs use the logbackup Device
Restore log dbtest from logbackup with norecovery, file = 2
Restore log dbtest from logbackup with norecovery, file = 3
....
Restore log dbtest from logbackup with file = n -- the last one cannot be added with norecovery.
Http://topic.csdn.net/u/20100702/20/534b9600-bc88-45ba-85c3-58b6608210ff.html? Seed = 1849987175 & R = 66686874 # r_66686874