Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

Change Data Capture - Questions on Retrieving LSN's with CDC Functions

$
0
0

Hi,

Why does the function to retrieve the minimum LSN allow you to specify a capture instance, but not the function to retrieve the maximum LSN?

If I wanted to find out the last change made to a row in a tracked table, I would want to use the max LSN for a table rather than for everything that is being tracked (i.e. same reasoning as for retrieving the min LSN).

I don't know enough about LSN's to know whether they increase numerically as they are created - for instance, if I query for the MAX(LSN) in the tracking table, does that give me the most recent row added?

I am also looking at determining the last update that was made to a particular column in a tracked table (to retrieve its previous value), so understanding how to work with max LSN values will be very useful!

I do understand that I can use the time mapping functions to convert to and from LSN values, but I am wondering if I can be more direct in the querying by using the LSN itself.

Thanks in advance!

Dan


Viewing all articles
Browse latest Browse all 4054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>