Returns a result set showing the changes that are waiting to be replicated. This stored procedure is executed at the Publisher on the publication database and at the Subscriber on the subscription database.
This procedure provides an approximation of the number of changes and the rows that are involved in those changes. For example, the procedure retrieves information from either the Publisher or Subscriber, but not both at the same time. Information that is stored at the other node might result in a smaller set of changes to synchronize than the procedure estimates.
The name of the server to which the changes are being replicated.
The name of the publication.
The name of the database to which the changes are being replicated.
Indicates of the changes are being replicated to a Subscriber. A value of 1 indicates that the changes are being replicated to a Subscriber. 0 means that changes are being replicated to a Publisher.
The name of the article for the table where changes originated.
The number of deletes waiting to be replicated.
The number of inserts and updates waiting to be replicated.
Indicates whether the pending change is a delete. A value of 1 indicates that the change is a delete. Requires a value of 1 for @show_rows.
The GUID that identifies the row that changed. Requires a value of 1 for @show_rows.
sp_showpendingchanges is used in merge replication.
sp_showpendingchanges is used when troubleshooting merge replication.
The result of sp_showpendingchanges does not include rows in generation 0.
When an article specified for article does not belong to the publication specified for publication, a count of 0 is returned for pending_deletes and pending_ins_and_upd.