2

For a particular row in a table how can I determine the number of reads done to it such as

SELECT * FROM MyTable WHERE ID = <something>

and when and where the read query executed?

I'm investigating a product that was "LOST" in a small company. So I wanted to see if anybody looked it up before it disappeared.

2
  • If you use Enterprise Edition you can also implement Change Data Capture to track all changes made to your data. – RLF Dec 23 '14 at 20:23
  • 2
    Unless you already had some kind of fine-grained auditing in place, you're not going to be able to find that information now, sorry. – Aaron Bertrand Dec 23 '14 at 20:25
3

There is nothing native in SQL Server that is going to track that level of information. Based on what version of SQL Server you are using there is SQL Server Audit (SQL Server 2008 or higher) that can track database level access, but it does require Enterprise Edition.

You could also roll out your own method of logging using Profiler or Extended Events that just capture object access for a given database. As long as you are not trying to capture the query and all it should be pretty low overhead, but it would be based on how active your system is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.