I am polling CDC tables to synchronize data between SQL Server and MongoDB. The approach I have taken is below:
- Enabled cdc for
- Created an insert trigger for
cdc.dbo.table2_CT. Then the trigger will writes the changed table's name and schema to another table, say
- Then I have a service which polls
tbl_consolidated_tracksand then from that the service reads the changes and syncs to mongodb
What I am trying to do here is to avoid triggers and the usage of
Can I directly poll the changed tables from any cdc procedure or table?