I have a SQL Server box with some CDC-enabled databases. I'd like to somehow make the rows from a source table to be automatcally imported again into the respective CDC table, so that they can be further shipped into a DW database. The rows from the CDC table have been purged because its retention period expired. Any idea how can it be done? Thanks in advance
Asked
Active
Viewed 111 times
0
-
It cannot be done – Remus Rusanu Jun 14 '19 at 09:21
-
Are you unable to consume the CDC data from the source database before the retention period expires? – Ben Thul Jun 14 '19 at 10:45
-
I am able to consume the data - however due to certain technical reasons I wasn't able to do that for a certain scope of the data, which eventually fell out of the retention period. Nevertheless, I managed to find the way - see below :) – Timbalero Jun 17 '19 at 07:04
1 Answers
0
I managed to force the CDC to reimport data by updating rows in the source table to some dummy values, then updating them back to the original values. This way the CDC picked up new transaction log entries. Of course for each original row 4 rows were generated in the CDC table, so this workaround may not be suitable for everyone, but it's just a matter of clearing out the redundant rows in a staging area - so it's OK.

Timbalero
- 1
- 1