Fontanka16
Fontanka16

Reputation: 1323

How can i see the SQL Server queries coming from my program?

I have this c# web app that relies heavily on two dll files that i can't see nor edit. The rest of the app is visible and editable.

The app generates SQL exceptions, and i would like to see the queries sent from the DLLs. Is there a way to do that?

Upvotes: 3

Views: 803

Answers (3)

DBAndrew
DBAndrew

Reputation: 6958

Another way to see what is running is SP_WHO2 'active' combined with DBCC INPUTBUFFER(SPID) or query the [sys.dm_exec_requests].

The SQL Profiler mentioned above is the preferred method.

Upvotes: 1

mika
mika

Reputation: 6972

For SQL Server 2005/2008 Express you can try AnjLab's SQL Profiler.

Upvotes: 3

Canavar
Canavar

Reputation: 48108

You can use SQL Profiler to see the queries that goes to your database.

Upvotes: 13

Related Questions