sys.fn_cdc_map_lsn_to_time(StartLsn) returning null

  • I have the following values in a table . This table is stores CDC data ( as it was captured) from the original CDC table in the incremental order.

    StartLSN  , TransactionOperation
    0x00001016000045D6001A , 2   
    0x00001016000046170016  ,3
    0x00001016000046170016  ,4

    But when I run  the following query I get the null value

    sys.fn_cdc_map_lsn_to_time(StartLsn)

    How do I fix the problem?

  • Guras - Monday, March 5, 2018 12:45 PM

    I have the following values in a table . This table is stores CDC data ( as it was captured) from the original CDC table in the incremental order.

    StartLSN  , TransactionOperation
    0x00001016000045D6001A , 2   
    0x00001016000046170016  ,3
    0x00001016000046170016  ,4

    But when I run  the following query I get the null value

    sys.fn_cdc_map_lsn_to_time(StartLsn)

    How do I fix the problem?

    Doesn't tell us much as we don't know the query you are running, what you are using for StartLSN.
    I can run this and it works fine:
    SELECT sys.fn_cdc_map_lsn_to_time(__$start_lsn) as ChangeTime, *
    FROM cdc.dbo_TableWithChangeTracking_CT

    Sue

  • {Check job cdc.SCPRD_cleanup. May be it doesn't work properly  and doesn't  clean old data.  If data is too old in the table  cdc.dbo_TableName_CT function  sys.fn_cdc_map_lsn_to_time(StartLsn) returns NULL.}

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply