SQL SERVER � Factors that can delay log truncation. | Backup Server Tips

4:00:00 AM



The process of log truncation frees space in the log files for reuse by transaction log. Exists factors that can delay lo truncation of the active portion by shrinking or truncated the log.


To check what are the factors that delay the log truncation we can check the sys.databases view, look into the columns: log_reuse_wait and log_reuse_wait_desc.

select log_reuse_wait, log_reuse_wait_desc from sys.databases


The following table shows a brief description of log_reuse_wait and log_reuse_wait_desc columns of the sys.databases catalog view.

log_reuse_wait value
log_reuse_wait_desc value
Description
0 NOTHING Currently there are one or more reusable virtual log files.
1 CHECKPOINT No checkpoint has occurred since the last log truncation, or the head of the log has not yet moved beyond a virtual log file (all recovery models).
2 LOG_BACKUP A log backup is required to move the head of the log forward (full or bulk-logged recovery models only).
Note:
Log backups do not prevent truncation.
When the log backup is completed, the head of the log is moved forward, and some log space might become reusable. Is necessary to take a log frequently
3 ACTIVE_BACKUP_OR_RESTORE A data backup or a restore is in progress (all recovery models).
A data backup works like an active transaction, and, when running, the backup prevents truncation.
4 ACTIVE_TRANSACTION A transaction is active (all recovery models).
  • A long-running transaction might exist at the start of the log backup. In this case, freeing the space might require another log backup.
  • A transaction is deferred (SQL Server 2005 Enterprise Edition and later versions only). A deferred transaction is effectively an active transaction whose rollback is blocked because of some unavailable resource.
5 DATABASE_MIRRORING Database mirroring is paused, or under high-performance mode, the mirror database is significantly behind the principal database (full recovery model only).
.
6 REPLICATION During transactional replications, transactions relevant to the publications are still undelivered to the distribution database (full recovery model only).
7 DATABASE_SNAPSHOT_CREATION A database snapshot is being created (all recovery models).
This is a routine, and typically brief, cause of delayed log truncation.
8 LOG_SCAN A log scan is occurring (all recovery models).
This is a routine, and typically brief, cause of delayed log truncation.
9 OTHER_TRANSIENT This value is currently not used.

References.



backup server to cloud, backup server 2012 r2, xenserver vm backup, backup exec server 2012, backup gpo server 2012, backup server software, backup server 2012, barracuda backup server 690, backup server image, backup server service, backup server to onedrive, backup server, backup server linux, backup server veeam, yosemite server backup basic download, barracuda backup server 890, backup server cloud, backup server online, backup server hardware, backup server 2012 to nas, backup server software free, backup server vmware, backup server synology, backup exec server, backup server nas, data recovery raid, raid 5 data recovery, data recovery raid 1, recover data from raid, data recovery raid 5, data recovery raid 0, recover data raid 0, recover data from raid 0 hard drive, recover data raid 5, raid data recovery nyc, raid data recovery toronto, data recovery from raid, data recovery from raid 0, best raid data recovery software, raid data recovery london, raid data recovery cost, raid 5 data recovery tools, raid data recovery los angeles, data recovery from raid 5 disk, data recovery on raid 5, data recovery raid 5 array, recover data raid drive, data recovery raid software, raid data recovery free download,

Artikel Terkait

Previous
Next Post »