SQL 2008日志无法收缩解决方法

       SQL 2008的库做了镜像,日志传送和做了同步复制,发现日志很大,而且无法收缩。

   原因:       

     日志卡死,可能有日志未完整提交   

     DBCC OPENTRAN 查看未提交的事务日志
     EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0, @time = 0, @reset = 1
     干掉所有不完全提交的事务

   如果出现下列提示,说明有未提交事务: 

Replicated Transaction Information:
        Oldest distributed LSN     : (778563:4206:16)
        Oldest non-distributed LSN : (778563:4870:1)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

     该命令能帮助我们找出遗漏了COMMIT或ROLLBACK的事务

原文地址:https://www.cnblogs.com/zping/p/2731347.html