Help capturing sql | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Help capturing sql

We have a third party tool (ie Cognos) that connects to the database and executes queries. Through the management console, I can only see that it is executing: sp_execute;1, but I need to be able to capture the actual sql. I’m fairly confident it can be done somehow, because the NetIQ Diagnostic Manager eval I tried displayed these in the query performance section. Does anyone know how or can anyone direct me to where I might find this information?
You can use SQL Profiler to capture this information. Check BOL for more details.
I have tried sql profiler several times and cannot find the right event to track to display this. I have tried stored procedure – statement completed, TSQL, many others but cannot seem to find the right one. For which event would you expect to see the sql in this case? When I execute a stored procedure on the box, I can definitely track the statements, but I cannot seem to find these from the third party.
Have you tried RPC completed ? Normally, this should be able to capture the SP calls from the application along with the parameters being passed. And Batch completed should capture any adhoc sql statements from it.
True, and for referencehttp://www.winnetmag.com/SQLServer/Article/ArticleID/8231/8231.html article.
http://www.sql-server-performance.com/sql_server_profiler_tips.asp – profiler tips. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>