SQL Server database full backup not only backup data but also logs

Source: Internet
Author: User

Previously thoughtSqlserverA full backup only backs up database data and does not contain logs. In fact, this is an error. UseRestoreheaderonlyCan help us verify (MSDB.DBO.Backupset also contains the corresponding information).

 

Restore headeronlyReturns the result set that contains all backup header information 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 data reading, 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 ):
http://technet.microsoft.com/zh-cn/library/ms178536 (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.