码迷,mamicode.com
首页 > 数据库 > 详细

SqlServer bug:sp_replqueuemonitor 在SqlServer 2008(RTM) 执行无结果

时间:2015-05-07 18:49:19      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:

当前版本:windows server 2008 r2 sp1 + SqlServer 2008 (RTM)


sp_replqueuemonitor


此存储过程列出 MicrosoftSQL Server 队列或 Microsoft 消息队列中指定发布的排队更新订阅的队列消息。
(在订阅数据库中,查看队列正在执行(或堵塞)的命令——即正在从订阅同步回到发布的命令)


然而该存储过程在windows server 2008 r2 sp1 + SqlServer 2008 (RTM) 执行无任何结果返回(队列中的大事务还在)

而之前在 windows 2003 r2 sp2 + SqlServer 2008 (RTM)  中,是正常执行的。


存储过程参数获取:

SELECT TOP 5 tranid,COUNT(*)  CMD
FROM [Platform].[dbo].[MSreplication_queue] (NOLOCK)
GROUP BY tranid ORDER BY CMD DESC

select publisher, publisher_db, publication from dbo.MSsubscription_agents

存储过程在订阅数据库执行:

exec sys.sp_replqueuemonitor 'publisher','publisher_db','publication','tranid',0




最后确认为SqlServer中的bug:

FIX: No rows are returned when you use the sp_replqueuemonitor stored procedure to list the queued messages for a queue-updating subscription in SQL Server


原因;

问题发生的原因是,存储过程sp_replqueuemonitor的内部查询语句对于列queue_id使用了不正确的值.


在存储过程sp_replqueuemonitor中,一些查询使用了queue_id的值作为查询条件.
然而,定义了不正确的值mssqlqueue替换了正确的值mssqlqueuev2


需要安装累计更新包sp1.

Cumulative update package 1 for SQL Server 2008



不过本人当前直接升级到sp4(Service Pack 4)

SQL Server 2008 Service Pack 4 :Download





SqlServer bug:sp_replqueuemonitor 在SqlServer 2008(RTM) 执行无结果

标签:

原文地址:http://blog.csdn.net/kk185800961/article/details/45564577

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!