当前位置:Gxlcms > 数据库问题 > Sql2008R2 日志无法收缩解决方案

Sql2008R2 日志无法收缩解决方案

时间:2021-07-01 10:21:17 帮助过:3人阅读

DBName go dbcc opentran --结果如下 /* 已复制的事务信息: 最早的分布式 LSN : (0:0:0) 最早的非分布式 LSN : (5067131:1370:2) DBCC 执行完毕。如果 DBCC 输出了错误信息,请与系统管理员联系。 */ DBCC loginfo() --全是2 木有 0 都是活动事务,断不了,更收缩不了。 -- 一个没有spid的东西。怎么杀啊? 查事务, select transaction_begin_time, case transaction_type when 1 then Read/Write transaction when 2 then Read-Only transaction when 3 then System transaction when 4 then Distributed transaction end tran_Type, case transaction_state when 0 then not been comoletely initaialiaed yet when 1 then initaialiaed but ha notstarted when 2 then active when 3 then ended (read-only transaction) when 4 then commit initiated for distributed transaction when 5 then transaction prepared and waiting resolution when 6 then commited when 7 then being rolled back when 0 then been rolled back end transaction_state from sys.dm_tran_active_transactions --没有发现异常的事务。没有做过复制,没有做过镜像。 --查看log状态 SELECT log_reuse_wait_desc FROM sys.databases WHERE NAME=DBName --REPLICATION 某做过复制,竟然出来个这。 use DBName checkpoint go sp_removedbreplication DBName DBCC SHRINKFILE(DBName_Log,100); DBCC loginfo() --还是全是活动的。 dbcc opentran 还有的那个没有spid的复制事务。

 

Sql2008R2 日志无法收缩解决方案

标签:prepare   tin   login   back   dbn   系统管   type   article   when   

人气教程排行