日志读取器失败:使用错误数量的参数调用 sp_replcmds 过程

问题描述 投票:0回答:1

将发行版升级到 2022 版本后,结果发现,第一个发行版数据库复制无法正常工作,而第二个发行版一切正常,日志读取器失败并显示:

sp_replcmds procedure was called with the wrong number of parameters.

使用日志阅读器的 -Outputverboselevel 3 时,作业历史记录中有很多重试:

2023-04-13 11:30:56.960 Publisher: {call sp_replcmds (500, 0, 0, , 0, 500000)}
2023-04-13 11:30:56.976 Status: 0, code: 20011, text: 'The process could not execute 'sp_replcmds' on 'PUBLISHER'.'.
2023-04-13 11:30:56.976 The process could not execute 'sp_replcmds' on 'PUBLISHER'.
2023-04-13 11:30:56.976 Status: 0, code: 18751, text: 'sp_replcmds procedure was called with the wrong number of parameters.'.

在发布者上运行跟踪后,发现日志读取器尝试使用一个附加参数运行 sp_replcmds - 发布者 AG 的侦听器名称:

exec sp_replcmds 500,0,-1,0x,1000,0,500000, N'LISTENERNAME'

解决方案是将发布者重定向到NULL,这样发布者就不会记录任何有关侦听器的记录。但是如果主要发布者发生问题怎么办? 如何解决此问题并与重定向发布者进行复制?

sql-server replication high-availability sql-agent-job transactional-replication
1个回答
0
投票

在此提供一些额外的见解,此问题是 SQL Server 2022 中的一个 Bug,最终在 2023 年 6 月 15 日发布的 CU5 中修复。将此 CU 应用于我的系统立即解决了问题。

具体来说 KB2357336 是 KB。

© www.soinside.com 2019 - 2024. All rights reserved.