I have Change Data Capture (CDC) activated on my MS SQL 2008 database and use the following code to add a new tabel to the data capture:
EXEC sys.sp_cdc_enable_table
@source_schema ='ordering',
@source_name ='Fields',
@role_name = NULL,
@supports_net_changes = 0;
However, whenever I try to select the changes from the tracking tables using the sys.fn_cdc_get_min_lsn(@TableName)
function
SET @Begin_LSN = sys.fn_cdc_get_min_lsn('Fields')
I always get the zero value.
I tried adding the schema name using the following spelling:
SET @Begin_LSN = sys.fn_cdc_get_min_lsn('ordering.Fields')
but this didn't help.