Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find timed out statements in SQL 2005 profiler

I'm trying to find SQL statements that timed out using the SQL 2005 profiler. Is there a way to set such a filter?

like image 258
Ron Harlev Avatar asked Nov 10 '08 20:11

Ron Harlev


2 Answers

In Profiler, you can add the event "Attention" under "Errors and Warnings". It's definition is

Collects all attention events, such as client interrupt request or when a client connection is broken.

As far as other errors (deadlocks, contraints, etc), try "Execution Warning" (reports warning that occurred during the execution of SQL statement or procedure) or "User Error Message" (the error message displayed to the user in the case of an error or exception).

like image 108
jons911 Avatar answered Oct 16 '22 15:10

jons911


Yes.

  • Check "All Events"
  • Go to the lock section
  • Specify the "lock: Timeout" events

Lock event in Books Online

Now, this works with server side locks (@@LOCK_TIMEOUT <> 0). I don't know if a client side timeout will be trapped.

like image 25
gbn Avatar answered Oct 16 '22 16:10

gbn