views:

34

answers:

2

Can you monitor SQL server to tell exactly what queries it is running?

We have an application that is exhausting the application pool. A server administrator has sent us a report from Debug Diag [http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en][1] which shows threads running for an hour which doesn't seem possible. If we could just see what queries the server was actually running we could trace them to our code.

A: 
SHOW PROCESSLIST;

or

SHOW FULL PROCESSLIST;
Duniyadnd
I believe you'll find that's a MySQL thing.
Dean Harding
Gah, my mistake.
Duniyadnd
+2  A: 

If you have the full version of SQL Server, it has the query profiler (from Management Studio, Tools menu, select "SQL Server Profiler").

Dean Harding