May 15, 2014 at 1:56 am
Hi All,
I have a question. Let's say I have a table TABLE_1. Is it possible to know which sql statement has worked on my TABLE_1 thanks.
May 15, 2014 at 2:18 am
Not out of the box.
You should create an audit for that.
-- Gianluca Sartori
May 15, 2014 at 4:51 am
You can get some idea of what's accessing it by querying sys.dm_exec_query_stats and combining that with sys.dm_exec_sql_text and looking for your particular table. But, that's only going to show the queries that are currently in cache. It also only shows an aggregation, not the individual calls.
Auditing is one approach.
You can also set up extended events to capture all the queries against a given table.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 15, 2014 at 8:32 am
thanks for the tips
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply