473,322 Members | 1,496 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Monitor Object Access


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)

Apr 25 '07 #1
3 1714
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
Apr 26 '07 #2

That is PERFECT!! Thank you so much!
On Apr 26, 12:25 am, "Plamen Ratchev" <Pla...@SQLStudio.comwrote:
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

Apr 26 '07 #3

PERFECT!! Thank you so much!!
On Apr 26, 12:25 am, "Plamen Ratchev" <Pla...@SQLStudio.comwrote:
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

Apr 26 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Vinay C | last post by:
Hi, Can anyone clear me that, when should we use go for mutex, and in which situation should we opt for monitor, lock, semaphone and other objects, in a multithreaded application for synchronization...
1
by: Rohit Raghuwanshi | last post by:
Hello all, we are running a delphi application with DB2 V8.01 which is causing deadlocks when rows are being inserted into a table. Attaching the Event Monitor Log (DEADLOCKS WITH DETAILS) here....
12
by: Brett Robichaud | last post by:
I need to make access to a reference object threadsafe. My natural instinct was to simply use Monitor.Enter() and Exit(). The problem is that the object behind the reference changes frequently,...
2
by: Fernando Rodríguez | last post by:
Hi, I've been reading the multithreading tutorial at http://www.yoda.arachsys.com/csharp/threads/locking.shtml (thanks Jon :-) and there's one thing I don't understand. Why do have to pass a...
1
by: Gery D. Dorazio | last post by:
Here is some code to open a file with exclusive access for the purpose of modifying it. FileStream fstrm = new FileStream(inputFileName, FileMode.OpenOrCreate, FileAccess.ReadWrite,...
4
by: Charles Law | last post by:
I've been using monitors a bit lately (some of you may have heard ;-) ) and then up pop Manual and AutoResetEvents , and they look for all the world like the same thing. Are they...
6
by: Clark Sann | last post by:
Can someone help me understand what object should be used as the lock object? I've seen some programs that use Monitor.Enter(Me). Then, in those same programs, they sometimes use another object. ...
2
by: www.brook | last post by:
I have a VC++.net code. Two threads are created, one thread keeps appending elements to the queue, another keeps deleting an element from the queue. I tried to use monitor, but it seems that the...
12
by: Perecli Manole | last post by:
I am having some strange thread synchronization problems that require me to better understand the intricacies of Monitor.Wait/Pulse. I have 3 threads. Thread 1 does a Monitor.Wait in a SyncLock...
2
by: Ian | last post by:
Monitor::Enter and Monitor::Exit must be called in pairs. Is there a way to determine if Monitor::Exit has been called so that it does not get called a second time? The psuedocode below...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.