문제

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