CDC: how to read history records of master->detail tables?
I have 2 tables T1(master), T2(detail). CDC works on these both tables.
I’d like to restore history tables to th new 2 tables T11->T21 using stored procedure.
The question is: how to process the history tables correctly?
If I get and process all T1 history records and after it all T2 there is can be referential integrity conflict.
For example: my SP processes all master rows: D, I, D, I and then details from the start to end of the history.
What is the best way?
I have 2 tables T1(master), T2(detail). CDC works on these both tables.I’d like to restore history tables to th new 2 tables T11->T21 using stored procedure.The question is: how to process the history tables correctly?If I get and process all T1 history records and after it all T2 there is can be referential integrity conflict.For example: my SP processes all master rows: D, I, D, I and then details from the start to end of the history.What is the best way? Read More