Introduction to SQL Server log chain

Source: Internet
Author: User
Tags backup

Let's talk about these concepts first.

SQL Server only log chain, backup records (some people also called backup chain) I think it's more appropriate to call backup records.

Here are three things that say the same thing.

Backup set = Backup record = Backup chain

Backup set: For example, a collection of backups, such as a complete 1 of a database, the standby, daily standby 1, complete 2, daily standby 2, the backup of these databases is a collection of backup sets

But I prefer to call backup records.

Backup records actually refer to SELECT * from [msdb]. [dbo]. [Backupset]

Truncate log and log chain break is it the same thing?

Truncation log and log chain fracture not the same thing.

What is a log chain

In fact, we can understand the Bak file as a compressed package, full backup and differential backup will be the data and log into the compressed package,

and log Backups will only bring the log into the compressed package

Let's start with an experiment.

Test environment: SQLSERVER2012 Development version

Script

In order not to generate additional log, so the script does not have a SELECT INTO statement, would like to select into the temporary table and then sort the temporary table

However, because select into generates additional logs, only the Fn_dblog are sorted directly

Creating a Database

Use master   
Go   
-Creates database create DB   
logchaintest;   
Go   
--Change to Full recovery model   
ALTER DATABASE logchaintest SET RECOVERY;   
Go

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.