dbTalk Databases Forums  

Monitor Object Access

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Monitor Object Access in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
traceable1
 
Posts: n/a

Default Monitor Object Access - 04-25-2007 , 10:52 AM







I would like to remove an index from my database, but I need to verify
that it is not being accessed before I do that.

I tried running Profiler, but it doesn't seem to be giving me the
information I need. I put in a filter for ObjectName, but it seems to
be ignoring it - i get several entries in the profile trace, but no
value in the ObjectName column.

Is there an easy way to monitor for object access?

Thanks so much!

SQL Servef 2000 SP4
(I also have 2005, SP2, if there's a better way to do this with 2005)


Reply With Quote
  #2  
Old   
Plamen Ratchev
 
Posts: n/a

Default Re: Monitor Object Access - 04-26-2007 , 12:25 AM






In SQL Server 2005 I have used the sys.dm_db_index_usage_stats dynamic
management view to check for index usage. Essentially a new row is added for
the index when it is used. The catch is that the info in
sys.dm_db_index_usage_stats is reset when the SQL Server service is
restarted.

HTH,

Plamen Ratchev
http://www.SQLStudio.com



Reply With Quote
  #3  
Old   
traceable1
 
Posts: n/a

Default Re: Monitor Object Access - 04-26-2007 , 10:41 AM




That is PERFECT!! Thank you so much!


On Apr 26, 12:25 am, "Plamen Ratchev" <Pla... (AT) SQLStudio (DOT) com> wrote:
Quote:
In SQL Server 2005 I have used the sys.dm_db_index_usage_stats dynamic
management view to check for index usage. Essentially a new row is added for
the index when it is used. The catch is that the info in
sys.dm_db_index_usage_stats is reset when the SQL Server service is
restarted.

HTH,

Plamen Ratchevhttp://www.SQLStudio.com



Reply With Quote
  #4  
Old   
traceable1
 
Posts: n/a

Default Re: Monitor Object Access - 04-26-2007 , 10:42 AM




PERFECT!! Thank you so much!!


On Apr 26, 12:25 am, "Plamen Ratchev" <Pla... (AT) SQLStudio (DOT) com> wrote:
Quote:
In SQL Server 2005 I have used the sys.dm_db_index_usage_stats dynamic
management view to check for index usage. Essentially a new row is added for
the index when it is used. The catch is that the info in
sys.dm_db_index_usage_stats is reset when the SQL Server service is
restarted.

HTH,

Plamen Ratchevhttp://www.SQLStudio.com



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.