[SQL Server] restoring full backup, differential backup, and transaction log backup

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.