Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Capture SQL statement thrown by an application

Author  Topic 

wackoyacky
Starting Member

25 Posts

Posted - 2009-06-03 : 01:59:28
Hi guys,

I'm trying to debug an anomaly in one of our application and I'm trying to look at the actual sql statement being thrown by the .NET application. Previously I used to get this by using SQL Profiler, but since in my current company our access to db is restricted, I can't make use of profiler.

Do you have any other alternative for SQL Profiler which can do the same task? Is it possible to query any DMV to get the same results?

I've tried using dm_exec_requests together with dm_exec_sql_text, but it shows the stored procedure itself rather than showing the exact stored proc call (with the parameter value passed) made by the .NET application.

And also I can't find a way to get to the past logs in dm_exec_requests, it always have the current request.

Any inputs would be greatly appreciated.

Thanks,
Enzo

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-06-03 : 02:50:23
Do you have access to Service Broker?



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

wackoyacky
Starting Member

25 Posts

Posted - 2009-06-03 : 03:19:16
Sorry but don't know what service broker is
Go to Top of Page
   

- Advertisement -