简体   繁体   English

SQL Server数据库事务日志文件的大小急剧增加

[英]SQL Server Database Transaction Log File size increased dramatically

After a backup, I noticed size of SQL Server Database Transaction Log File increased dramatically. 备份后,我注意到SQL Server数据库事务日志文件的大小急剧增加。 We were having 10 GB free space, now I could see only 9 MB. 我们有10 GB的可用空间,现在我只能看到9 MB。

Where should I check to find the root cause of this issue ? 我应该在哪里检查以找到此问题的根本原因?

The first thing I would check is if there is an open transaction in the database. 我要检查的第一件事是数据库中是否有未完成的事务。 A transaction log backup only truncates to the oldest open transaction. 事务日志备份只会截断到最早的打开的事务。

I use Adam Machanic's sp_WhoIsActive with the @get_transaction_info = 1 switch. 我使用@get_transaction_info = 1开关使用Adam Machanic的sp_WhoIsActive。 http://sqlblog.com/ http://sqlblog.com/

you could also use: 您还可以使用:

SELECT  * FROM sys.dm_tran_active_transactions tat
INNER JOIN sys.dm_exec_requests er ON tat.transaction_id = er.transaction_id
CROSS APPLY sys.dm_exec_sql_text(er.sql_handle);

DBCC OPENTRAN() does not always show me all the open transactions. DBCC OPENTRAN()并不总是向我显示所有未清事务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM