[英]'The Transaction Log for database is full due to 'Active Transaction' - Unable to Backup, Enlarge, Truncate, or Shrink
I have a SQL Server database that keeps giving me the following error:我有一个 SQL Server 数据库,它不断给我以下错误:
Msg 9002, Level 17, State 4, Line 30 Msg 9002, Level 17, State 4, Line 30
The transaction log for database 'DSC_DW_Summary' is full due to 'ACTIVE_TRANSACTION'.由于“ACTIVE_TRANSACTION”,数据库“DSC_DW_Summary”的事务日志已满。
I can see that the log file is at 100% of "Log Space Used" despite my using Simple Recovery and 1 minute recovery time.尽管我使用了简单恢复和 1 分钟的恢复时间,但我可以看到日志文件处于“已使用日志空间”的 100%。 When I try do any of the following (suggested online as potential solutions) I get the error listed above.当我尝试执行以下任何操作(在线建议作为潜在解决方案)时,我收到上面列出的错误。
I also don't see any running transactions when I run:我在运行时也没有看到任何正在运行的事务:
SELECT * FROM sys.dm_tran_database_transactions
or:或者:
DBCC OPENTRAN
Which gives me the result:这给了我结果:
No active open transactions.没有活动的未结交易。
DBCC execution completed. DBCC 执行完成。 If DBCC printed error messages, contact your system administrator.如果 DBCC 打印错误消息,请联系您的系统管理员。
So I'm baffled.所以我很困惑。 Somehow I'm being prevented from resolving the issue because of an "Active Transaction" but I can't find any active transactions.不知何故,由于“活动交易”,我无法解决问题,但我找不到任何活动交易。
Start with checking what is preventing your log reuse:首先检查是什么阻止了您的日志重用:
SELECT [name], [log_reuse_wait_desc] FROM [sys].[databases];
Then also issue a CHECKPOINT to try and flush the log然后也发出一个 CHECKPOINT 来尝试刷新日志
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.