Quantcast
Viewing latest article 19
Browse Latest Browse All 131

_CT records with identical __$seqval

There is a CDC enabled table of the following form:

create table dbo.foo (    id int not null primary key,    a char(1),     b char(1),     c char(1),     d char(1),     e char(1),    updated datetime not null default getdate(),    active bit not null default 1);go

When querying cdc.dbo_foo_CT, I see the paired records of the following form:

__$start_lsn__$end_lsn__$seqval__$operation__$update_maskidabcdeupdatedactive__$command_id
0x02NULL0x0110xFF1abcNULLNULL12:00:0011
0x02NULL0x0120xFF1xbcNULLNULL13:00:0012

Given operations 1 & 2 are delete & insert respectively, I might otherwise expect this to be a full-row delete-then-reinsert pattern from an app; but there are identical values in both__$start_lsn& __$seqval. When attempting to repro a delete/re-insert in a transaction, the __$seqval still increments AFAICT. Notably a merge command produces the delete/re-insert CDC pattern but still increments the __$seqval as expected.

CDC was only recently enabled, and every record in cdc.dbo_foo_CT is a paired record of this form although other CDC enabled tables in the same database do not show this pattern.

What could be causing this behavior?


Viewing latest article 19
Browse Latest Browse All 131

Trending Articles