Forum Discussion

Debasis2023's avatar
Debasis2023
Copper Contributor
Aug 31, 2023

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

I have database in sqlserver.there are many tables present.database is CDC activated.Huge transactions happen in multiple tables in a day.I would like to see how many rows are inserted/updated/deleted into the table/tables in a day.
Is there any system table/tables present which keep tracks of these update and we can query from there(without causing any performance issue in db)?

2 Replies

  • Hi Debasis2023 

     

    in CDC you cannot keep track of the "when" rows got inserted/deleted/updated . it is just focuded on the values that were changed

    what is change data capture (CDC) ?

     

    In order to do what you need , you have to take a look to SQL Temporal Tables

     

    "Temporal tables (also known as system-versioned temporal tables) are a database feature that brings built-in support for providing information about data stored in the table at any point in time, rather than only the data that is correct at the current moment in time."

     

    Temporal Tables

     

    Hope it helps

     

    Regards

    Javier

     

    • Debasis2023's avatar
      Debasis2023
      Copper Contributor
      Sure.Thanks for your response. I am checking on it

Resources