replqueuemonitor 在SqlServer 2008(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(*) CMDFROM [Platform].[dbo].[MSreplication_queue] (NOLOCK)GROUP BY tranid ORDER BY CMD DESCselect 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

,家!甜蜜的家!天下最美好的莫过於家

replqueuemonitor 在SqlServer 2008(RTM) 执行无结果

相关文章:

你感兴趣的文章:

标签云: