BugZero found this defect 648 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
5/12/2023
SQL Server 2019 on Windows
SQL Server 2022 on Linux (all editions)
SQL Server 2022 on Windows (all editions)
build lower than 15.0.4249.2
15.0.4249.2
The sp_replmonitorsubscriptionpendingcmds stored procedure is not compatible with peer-to-peer (P2P) replication. It returns an incorrect number of pending commands. After you apply this fix, sp_replmonitorsubscriptionpendingcmds will be compatible with P2P replication. Note The "Undistributed Commands" tab of a Replication Monitor invokes sp_replmonitorsubscriptionpendingcmds behind the scenes.
Cumulative update information This problem is fixed in the following cumulative updates for SQL Server: Cumulative Update 2 for SQL Server 2022 Cumulative Update 17 for SQL Server 2019 Note After you apply this cumulative update, sp_replmonitorsubscriptionpendingcmds might still report an incorrect number of pending commands for P2P replication if the MSrepl_originators table contains stale entries. If the MSrepl_originators table contains stale entries, running sp_replmonitorsubscriptionpendingcmds will generate the following warning message in the SQL Server error log: Warning: Unable to get database version for the subscription database '<database_name>'. The sp_replmonitorsubscriptionpendingcmdsmay report the incorrect number of pending commands for P2P replication. To resolve this problem, either delete the stale entries from MSrepl_originators or pass the correct "dbversion" of a subscription database as a subdb_version argument when you run sp_replmonitorsubscriptionpendingcmds. Tips: You can select either of the following methods to find the "dbversion" of a subscription database: Run the following query on a distribution database: select dbversion from MSrepl_originatorswhere publisher_database_id = <Publisher_Database_ID>and srvname = <Subscriber_Server>and dbname = <Subscriber_Database>Note You need to substitute appropriate values for <Publisher_Database_ID> , <Subscriber_Server> and <Subscriber_Database>. Run the following query on a subscription database: declare @current_version int , @currentGuid uniqueidentifierselect @currentGuid = recovery_fork_guid from sys.database_recovery_statuswhere database_id = db_id()select @current_version = substring(convert(binary(16), isnull(@currentGuid, 0x0)),1,6)print @current_version
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Learn about the terminology that Microsoft uses to describe software updates.