http://msdn.microsoft.com/en-us/library/ms190346.aspx
It says here in the section under the statement start/end offset that you can use that in conjunction with dm_exec_sql_text to get the currently executing cursor statement. What would be the command for that?
I have a fairly large SP that froze when it reached a cursor logic loop ‘while (@@fetch_status =0) and I’d like to see if it is the exact executing statement I think it is, and I’d also like to see the parameters for this statement so I can see exactly why the cursor either never exited, or just why the statement inside the loop won’t complete. Thanks!
start with this