设为首页 加入收藏

TOP

SqlServer bug:sp_replqueuemonitor在SqlServer2008(RTM)执行无结果
2015-11-21 01:49:50 来源: 作者: 【 】 浏览:0
Tags:SqlServer bug sp_replqueuemonitor SqlServer2008 RTM 执行 结果

当前版本: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.

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

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇在Oracleclient端进行SQL*Nettrac.. 下一篇12-SQLite之事务

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: