11.3 Full Backup
11.3.1 the process of full backup
A full backup contains all the data in the database and enough logs to recover that data (to restore to the end of the backup).
The process of backing up involves roughly the following steps:
(1) Lock the database and block all transactions.
(2) Place a flag 1 in the transaction log.
(3) Release the database lock.
(4) Extract all data pages containing data from the data file and write them to the backup device. Data pages that do not contain data are skipped, so the file size of the backup will never be larger than the data file for that database.
(5) Lock the database and block all transactions.
(6) Place a flag 2 in the transaction log.
(7) Release the database lock.
(8) Extract all the transactions between Flag 1 and flag 2 and append them to the backup.
To improve performance, when initiating a backup, the backup engine gets the data page from the data file as quickly as it could, regardless of the order of the pages. Based on this mechanism, multiple threads can be used to write data pages to the backup device.
11.3.2 the principle of full backup
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7A/1C/wKiom1aiIaSweQdgAAB2kunOwz8034.png "title=" Full backup. png "alt=" Wkiom1aiiasweqdgaab2kunowz8034.png "/>
11.3.3 transaction logs in a full backup
This is because "dirty pages" may still be generated during the backup process, and they need to be "redo" ("dirty pages" back to the data page of the disk) at the time of recovery so that they can be restored to the point at which the backup was completed.
This article is from the "SQL Server Administrator's Guide" blog, declined reprint!
11.3 Full Backup