Find no of rows inserted/updated/deleted from a table of SQLServer

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)?

  • 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?

    – 

  • Query your change tables. SQL Server does not track the number of inserts, deletes or updates.

    – 

  • 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?

    – 

Leave a Comment