I have database in SQL Server. there are many tables present. The database is CDC activated. I would like to see how many rows are inserted/updated/deleted into the table/tables in a day.
Are there any system table/tables present that keep track of these changes and we can query from there (without causing any performance issues)?
Asked
Active
Viewed 26 times
-1

Thom A
- 88,727
- 11
- 45
- 75

Deba2115126
- 11
- 8
-
What kind of CDC is set up? When you looked at your change tables, what did you find? Please share the code you wrote to solve this problem? – dfundako Aug 31 '23 at 14:14
-
Query your change tables. SQL Server does not track the number of inserts, deletes or updates. – Sean Lange Aug 31 '23 at 14:28
-
I can query the change tables. But the cdc retention is 1 day for all the tables. so before the cdc clean job runs I need to query the cdc tables? How to know when to run? – Deba2115126 Aug 31 '23 at 17:48