tags:

views:

143

answers:

3

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?

+12  A: 

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

Canavar
+3  A: 

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

mika
I tried this one just recently for a SQL express installation and it does the job very well i must say.
Fontanka16
+1  A: 

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.

DBAndrew