How to know when a record has replicated to target location

DM 521 Reputation points
2022-02-09T17:41:36.897+00:00

How to know that a record which has current time stamp; is committed after what time gap to subscriber server; e.g. say a table has Itemcode, ItemNarration, Serialnumber, DateofEntry as column names; and say a record is saved at 11:05:02 am on publication database and after a minute it gets committed to target database through replication and there also DateOfEntry for this record will be same; 11:05:02 am; however it has hit target db at 11:06:02 (it took a minute to commit on target db); can one know how to arrive at 11:06:02 am; does replication saves this info.

Thanks in advance.

Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,582 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tom Phillips 17,716 Reputation points
    2022-02-09T17:52:01.81+00:00

    No. Replication does not track individual rows. That is not how transactional replication works.

    Transactional replication applies transactions in the order they ran on the publisher. It is not possible for it to skip transactions. So Transactional Replication is either working or not.

    If you are trying to monitor latency in the publisher to subscriber, I suggest you look at this:
    https://www.mssqltips.com/sqlservertip/3598/troubleshooting-transactional-replication-latency-issues-in-sql-server/


0 additional answers

Sort by: Most helpful