30.06.2013 Views

SQL Server Backup and Restore - Simple Talk

SQL Server Backup and Restore - Simple Talk

SQL Server Backup and Restore - Simple Talk

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 5-1: A transaction log with 8 VLFs.<br />

Chapter 5: Log <strong>Backup</strong>s<br />

The concept of the active log is an important one. A VLF can either be "active," if it<br />

contains any part of what is termed the active log, or "inactive," if it doesn't. Any log<br />

record relating to an open transaction is required for possible rollback <strong>and</strong> so must<br />

be part of the active log. In addition, there are various other activities in the database,<br />

including replication, mirroring <strong>and</strong> CDC (Change Data Capture) that use the transaction<br />

log <strong>and</strong> need transaction log records to remain in the log until they have been processed.<br />

These records will also be part of the active log.<br />

The log record with the MinLSN, shown in Figure 5-1, is defined as the "oldest log record<br />

that is required for a successful database-wide rollback or by another activity or operation in<br />

the database." This record marks the start of the active log <strong>and</strong> is sometimes referred to as<br />

the "head" of the log. Any more recent log record, regardless of whether it is still open or<br />

required, is also part of the active log; this is an important point as it explains why it's a<br />

misconception to think of the active portion of the log as containing only records relating<br />

to uncommitted transactions. The log record with the highest LSN (i.e. the most recent<br />

record added) marks the end of the active log.<br />

146

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!