May 1, 2009 at 9:01 am
I read all posts at SQL ServerCentral regarding
long running queries on SQL 2005.
I particularly tried queries described here:
http://www.sqlservercentral.com/Forums/Topic619606-360-1.aspx
None of them ever returned me any records.
May 1, 2009 at 9:13 am
The queries Chris Harshman posted should work on your sql 2005 server as long as compatibility level is set to 90 or greater (cross apply is an 05 feature).
Did you try the query in all of your databases?
May 1, 2009 at 9:49 am
I tried it with
"use master"
so I assume it should pick up all long running queries
regardless which database it was?
I checked compatibility level is 9.0
May 1, 2009 at 10:00 am
One thing I'm confused about.
All these DMV's.
Will they show me the historical data or it's just to
look at the current state?
I mean what if we had some long running queries yesterday
would it be possible to find them today?
May 1, 2009 at 12:48 pm
Try running this under different databases. Also make sure there's some activity on the database.
The data is state data not historical, I believe since the last reboot.
May 1, 2009 at 1:11 pm
From Chris Hedgate:
The information returned by the DMOs is collected by the engine itself from lots of different sources and the DMOs make it easy for you to use it by simply querying them using SELECT statements. Since the information shows the current state of the server this means that when the server is restarted the information collected is lost and the engine starts collecting a fresh set.
http://www.sqlservercentral.com/articles/Administration/dynamicmanagementobjects/2235/
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply