未加星标

Learn Uses of log_reuse_wait_desc In SQL Server

字体大小 | |
[数据库(mssql) 所属分类 数据库(mssql) | 发布者 店小二04 | 时间 2016 | 作者 红领巾 ] 0人收藏点击收藏
Overview

Many times, while working on SQL Server, the transaction log files frequently grow due to various reasons. Out of which, one such reason is that there is, already existing assigned space of the file in the SQL Server. This can be happened due to increment in the utilization of database. In a way to overcome from such an issue behind the transaction log file for a specific database for not reusing the log space, the log_reuse_wait_desc column that gives a text-based explanation of the blockage in reusing of the transaction log. In the following section, we will discuss the values of log reuse in SQL Server.

Where to use Log_Reuse_Wait_Desc?

SQL Server utilizes an information that is captured in the transaction log for this rollback procedure. Therefore, it cannot be reutilized virtual log files, which covers the all the records of log transactions, which are active. Server will return the value of log_reuse_wait_desc of the Active_Transcation if it is run out of the virtual log. To overcome from this, users have to rollback all the transactions. The safe and secure way is to wait until the transaction is completed. There are various reasons due to which normal transaction can turn into long running transaction . Users may kill its session if the user is unable to afford extra time for long running transaction. However, it will cause a transaction to roll back. Therefore, it is important to keep all the transaction as short as possible. There are some values where log reuse can be utilized as mentioned below:

Log Backup: This is one of the most common values to check whether, you are in the full or bulk logged recovery model and a log backup has not happened. In all these recovery models, backup log makes log truncation. Even you can also backup and restore the active log. It means that there is backup of data running or any other restoration is running. The log cannot be truncated at the time of restore, and is essential for backups of data so that it cannot be truncated.

Database Mirroring: This means that the mirroring database has more or less latency in it and there are some logs records on the principal of mirroring that has not been yet sent to the mirroring mirror. This can occur if the mirror is configured for operation of asynchronous, where the transactions can be committed on the principal before their log records have been sent. It can also happen in mode of synchronous, if the mirror becomes disconnected or the mirroring session is suspended

Replication: This value displays when there is a committed transactions that have not been yet scanned by the transaction replication. Log Reader Agent job for sending to the distributor of replication them for Changing the Data Capture.

Conclusion

There are numerous of reasons due to which the server gives a message to truncate the transaction log due to the growing of log files. In the above discussion, various uses of log_reuse_wait_desc in SQL server are described along with it the proper values of log discussion are mentioned. It helps to give a text-based description of the blockage in reusing the transaction log.

本文数据库(mssql)相关术语:熊片数据库 mssql数据库 oracle数据库 pubmed数据库 access数据库 万方数据库

主题: SQLSQL Server
分页:12
转载请注明
本文标题:Learn Uses of log_reuse_wait_desc In SQL Server
本站链接:http://www.codesec.net/view/483565.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 数据库(mssql) | 评论(0) | 阅读(27)