Different manifestations of SQL Server CheckPoint in three recovery models

Source: Internet
Author: User
Tags truncated

The recovery model for SQL Server includes the simple recovery model, the bulk-logged mode, and the full recovery model

When we execute the checkpoint, we actually update the data page data in the cache to the data file.

And the change of log file is how to express, we together through the example look.

First we create a database (omitted from the Build library script)

Setting up a database add five records to the simple recovery model

ALTER DATABASE Dbtrain set recovery simple

INSERT into test values (1, ' wwww ')

Go 5

Then execute DBCC log (' Dbtrain ', 2) to see the current activity log information

If you re-execute

Checkpoint

DBCC log (' Dbtrain ', 2)

You will see that the log is truncated, leaving only the log records of the checkpoint operation

If you replace the full recovery model with the bulk-logged mode

ALTER DATABASE Dbtrain set recovery full/bulk_logged

Repeating the above action will find that the log is still truncated, which makes people very puzzled.

The reason is because we are the newly created database, without a full backup,

The restore mode is simple before you make a backup, no matter how you set it up.

It makes no sense to keep the transaction log if you do not make a full backup.

Different manifestations of SQL Server CheckPoint in three recovery models

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.