문제

I created the CDC on many related tables, and then I move it to a permanent storage tables. but I need to query those tables to get all the records that were updated in the same transaction, say I have Person->Worker. When I update an entity 2 records will be added to each table, if many updates were done on those tables, I will end up with many rows

how I can connect the same record in the person to the record that was updated with it in the worker....

Thanks

도움이 되었습니까?

해결책

I found the problem.....

__$Start_lsn is a unique value between all the tables that have been updated with the same transaction, so it can be used as a primary-foreign key relation to connect tables.

the problem with my tables was that the main table and the subtables were updated in two different transactions.

Thanks

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top