Track insert update delete in a table

  • Hi!

    Is there a way on how to check if there are insert update or delete done in a table since last year up to now?

    Thanks

  • BiboKid - Tuesday, February 7, 2017 12:03 AM

    Hi!

    Is there a way on how to check if there are insert update or delete done in a table since last year up to now?

    Thanks

    There is no reliable, built in way to do this if you haven't been capturing the actions during the past year. There are some script that check index usage or stats last updates but these wouldn't really be reliable.

    Sue

  • The data management view [sys.dm_db_index_usage_stats] aggregates statistics like total reads / writes, last read / write datetime, etc. However, the counters do get reset whenever the server is restarted. The article below describes the usage stats view and also the basics of how to setup an extended event trace.

    Tracking Table Usage and Identifying Unused Objects

    http://www.sqlservercentral.com/blogs/spaghettidba/2015/04/20/tracking-table-usage-and-identifying-unused-objects/

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply