sp_cursorexecute , actual sql ? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

sp_cursorexecute , actual sql ?

Hi Guys I pick up the following in a profiler trace. exec sp_cursorexecute 197, @P1 output, @P2 output, @P3 output, @P4 output, ‘PSRF_REPORTING_FOLDERS’, ‘Jan 1 1900 12:00:00:000AM’ Normally to find the actual sql that executes i go up in the trace until i find the relevant cursor prepare. In this case the one for 197 cursor prepare. But this time around i cannot find it, these are app servers connected so for all i know the cursor could be prepared at 5am in the morning and re-used all day long. Is there anyway (adding certain profiler events or something), so that i can see the actual statement held in the cursor ? Thanx
try using pssdiag from MS PSS,