Thursday, April 4, 2013

What's the plan of the process currently spinning out of control?

Sometimes you want to know what's going on NOW, not later after everything is done running. ASE 15 & later, you can run sp_showplan, which will get you that information while the spid is running.


sp_showplan spid, batch_id output, context_id output, stmt_num output

To display the showplan output for the current SQL statement without specifying the batch_id, context_id, or stmt_num:
 
sp_showplan spid, null, null, null

No comments:

Post a Comment