9. 7 Restoring a Database

Source: Internet
Author: User

9. 7 Restoring a Database
Many database administrators are surprised that their database backup plans always have problems during the recovery process. If
It is important to have an effective backup plan, it is even more important to have an effective restore plan. SQL Server allows different types of backups to be made at different times, but it is picky about how to restore these backups. Most restores
The key issue in the plan is the order of backups. This section describes the process of the restore, how to prepare the database for restore, to
And how to restore the database that was backed up using the policy described earlier.
9.7.1 Restore Process
The restore process consists of 3 phases: The data replication phase, in which the data pages are copied from the backup media to
In the data file; Redo phase, in which the submitted is restored from a log backup or a log portion of a database backup
The undo phase, in which the log part of the log backup or database backup is rolled back without mentioning
The business.
The data replication and redo phases can span multiple backups. For example, a database is backed up with a full backup first,

Then use a differential backup, and finally use a transaction log backup. To restore the database to its most recent state, you need to restore
Full backup, and then restore the differential backup as part of the data replication phase. The log portion of the differential backup will be a heavy
The shipowner of the stage begins, and then the transaction that is committed in the transaction log backup. All committed transactions are re-applied to the
In the database, the undo phase starts, all uncommitted transactions are rolled back, and the database is online.
Each phase is connected to the next phase. If any of the backups are lost in this sequence, the process will remain in the lost
The end of the backup before the sequence is lost. Figure 9-8 shows a missing or corrupted log backup. Although there are two other
Normal log backups, but they cannot be used because of the impact of transactions logged at 12:01 in the evening. Transaction log Backups
Unknown. The database can only be restored to the end of a 9:00 transaction log backup.

9.7.2 Deferred Recovery
When restoring a backup sequence (such as a full backup and a series of transaction log backups), the undo phase and data
Library recovery is going to be delayed so that every additional backup can be restored. After the database is restored, the attached backup is not
It can be applied. To delay recovery, you must specify the no recovery option in the RESTORE Database command.

9. 7 Restoring a Database

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.