Full backup of the SQL Server database is not just a backup of data and logs

Source: Internet
Author: User
I used to think that the full backup of SQL Server only backs up the data in the database and does not contain logs. In fact, this is an error. Using RESTOREHEADERONLY can help us verify (msdb. db

I used to think that the full backup of SQL Server only backs up the data in the database and does not contain logs. In fact, this is an error. Using RESTOREHEADERONLY can help us verify (msdb. db

I used to think that the full backup of SQL Server only backs up the data in the database and does not contain logs. In fact, this is an error. Using RESTOREHEADERONLY can help us verify (msdb. dbo. backupset also contains the relevant information ).

Restore headeronly returns the result set that contains all the backup headers of all backup sets on a specific backup device. The query result contains three columns:

FirstLSN

Numeric (25, 0)

The log serial number of the first log record in the backup set.

NULL

LastLSN

Numeric (25, 0)

The log serial number of the next log record after the backup set.

NULL

CheckpointLSN

Numeric (25, 0)

Log number of the last checkpoint when the backup is created.

NULL

The database starts to read data after the CHECKPOINT. Some PAGE data may have been changed during the data reading process, but the SQL SERVER does not read the data again. In this way, the LSN of the changed PAGE needs to be included, in this way, the log operation is re-applied to the database (REDO/UNDO) during restoration ).

RESTOREHEADERONLY (Transact-SQL): (v = SQL .90). aspx

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.