症状
sp_replmonitorsubscriptionpendingcmds存储过程与对等 (P2P) 复制不兼容。 它返回错误数量的挂起命令。 应用此修补程序后, sp_replmonitorsubscriptionpendingcmds 将与 P2P 复制兼容。
注意 复制监视器的 “未分配的命令”选项卡在后台调用 sp_replmonitorsubscriptionpendingcmds 。
解决方法
累积更新信息
此问题在以下SQL Server累积更新中已修复:
备注 应用此累积更新后,如果MSrepl_originators表包含过时的条目,sp_replmonitorsubscriptionpendingcmds可能仍报告 P2P 复制的挂起命令数不正确。
如果MSrepl_originators表包含过时的条目,则运行sp_replmonitorsubscriptionpendingcmds将在SQL Server错误日志中生成以下警告消息:
警告:无法获取订阅数据库“<database_name>”的数据库版本。 sp_replmonitorsubscriptionpendingcmds可能会报告 P2P 复制的挂起命令数不正确。
若要解决此问题,请在运行 sp_replmonitorsubscriptionpendingcmds 时,从 MSrepl_originators 中删除过时的条目,或者将订阅数据库的正确“dbversion”作为subdb_version参数 传递。
提示: 可以选择以下方法之一来查找订阅数据库的“dbversion”:
-
对分发数据库运行以下查询: select dbversion from MSrepl_originators
where publisher_database_id = <Publisher_Database_ID>
and srvname = <Subscriber_Server>
and dbname = <Subscriber_Database>
注意 需要将适当的值替换为<Publisher_Database_ID> 、<Subscriber_Server> 和 <Subscriber_Database>。 -
对订阅数据库运行以下查询: declare @current_version int , @currentGuid uniqueidentifier
select @currentGuid = recovery_fork_guid
from sys.database_recovery_status
where database_id = db_id()
select @current_version = substring(convert(binary(16), isnull(@currentGuid, 0x0)),1,6)
print @current_version
SQL Server的每个新累积更新都包含上一版本中的所有修补程序和安全修补程序。 建议为 SQL Server 版本安装最新版本:
状态
Microsoft 已确认这是在“适用范围”部分中列出的 Microsoft 产品存在的问题。
参考
了解 Microsoft 用于描述软件更新 的术语 。