Is it possible to instrument a SQL Server 2012 database?

I want to be able to look at things like how often certain tables and columns are accessed and the date of the last access.

有帮助吗?

解决方案 2

Use sql audit with Enterprise edition, or Extended Events with all editions (sql audit is based on Extended Events), both have less impact on performance than Sql Trace or Sql profiler and more programmable (Sql profiler is based on Sql Trace). There is a project on codeplex (an addin for Sql manament studio) that show you all properties and event accessible from extended event (documentation is scarce) here: 1

Note that with SqlTrace you will not be able to filter on object or column

其他提示

You can query sys.dm_db_index_usage_stats to see when tables have been accessed - not sure how you'll get individual column access without parsing trace logs (and accounting for * access).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top