Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Timed-out Queries.

Author  Topic 

krajdba
Starting Member

43 Posts

Posted - 2008-10-08 : 02:59:54
Hi,

Could you please let me know how to track timed out queries in SQL Server 2005 without using profiler. Apparently I would like to know "how often a query has timed out waiting for the necessary resources".

I need a query to track such timed out queries.



Raj.

lepeniotis
Yak Posting Veteran

75 Posts

Posted - 2008-10-08 : 04:54:12
Activity monitor I supose!

MSc Advanced Computing Science
MSc Database Professional
Sheffield Hallam University
MCP (70-229, 70-228)
Industrial IT Engineer
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-10-08 : 08:08:15
quote:
Originally posted by lepeniotis

Activity monitor I supose!

MSc Advanced Computing Science
MSc Database Professional
Sheffield Hallam University
MCP (70-229, 70-228)
Industrial IT Engineer




Activity monitor doesn't log that info. Time-out could be caused by various issues like deadlocking, low memory... It is better to trace with profiler unless you see information in Query analyzer.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-10-08 : 10:20:55
see if any of the events used in event notifications could help you:
http://msdn.microsoft.com/en-us/library/ms190655.aspx

_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.1 out!
Go to Top of Page

krajdba
Starting Member

43 Posts

Posted - 2008-10-10 : 03:57:15
Hi,


how to trace timed-out queries using profiler.



Raj.
Go to Top of Page

SimpleSQL
Yak Posting Veteran

85 Posts

Posted - 2008-10-10 : 12:36:31
Profiler is a way to trace timeouts. You can trace "Attention" events.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-10-10 : 12:38:46
Trace Lock:Timeout
Go to Top of Page

SimpleSQL
Yak Posting Veteran

85 Posts

Posted - 2008-10-10 : 12:42:29
Lock:Timeout occurs when a lock request times out. This is not equivalent to Query timeout (assumption here that we are looking for request/query timeout). Attention event is fired when a request times out from the client/request is cancelled from client.

Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-10-10 : 12:55:18
quote:
Originally posted by SimpleSQL

Lock:Timeout occurs when a lock request times out. This is not equivalent to Query timeout (assumption here that we are looking for request/query timeout). Attention event is fired when a request times out from the client/request is cancelled from client.





Thats right!. You can also use Execution Warning event.
Go to Top of Page
   

- Advertisement -