Question

I'm trying to debug a deadlock with SQL Server Profiler 2008. I know how to get a graph of the deadlock in the profiler, but when I hover over one of the two statements in shown in the graph, the "Statement" tooltip that appears only contains the query with parameter names, not values.

In other words I get tooltips like this:

DELETE FROM users WHERE id = @id

How can I see the corresponding parameter values? This screenshot:

enter image description here shows what I would like to see, so there must be a way.

Was it helpful?

Solution

Your best bet is probably to also include "SQL:StatementStarting" in your profile and then just scroll up the list looking for the SPIDs that were part of the deadlock. That's not an easy way to do it, but SQL Profiler records the statements differently if they were parameterized SQL vs. a regular statement. In your photo, it looks like it's showing a non-parameterized statement, but your question seems to be about one that's parameterized.

I've had this problem before with trying to figure out exactly what an application was sending to SQL Server - all I could see was the parameterized query, and that wasn't helping me at all.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top