Current, SqlServerConnection provides getMaxTransactionLsn and getMaxLsn method. However, as shown in
https://stackoverflow.com/questions/77639528/whats-the-difference-between-sys-fn-cdc-get-max-lsn-and-max-value-of-cdc-lsn, both methods seem no difference.
Both get the MAX value of start_lsn from cdc.lsn_time_mapping.
However, because the capture process extracts change data from the transaction log, there is a built in latency between the time that a change is committed to a source table and the time that the change appears within its associated change table.
I wonder how to get the the latest LSN of whole sqlserver database rather than CDC table's LSN?
Looking forward to hear from you.
Best,
Hongshun Wang