Although sp_showplan allows you to view the query plan for the current statement, the actual statement that is running may exist within a procedure (or within a nested chain of procedures) called from the original SQL batch. Table 11-4 shows the columns in sysprocesses that contain information about these nested statements.
This information is saved in sysprocesses, regardless of whether SQL text is enabled or any memory is allocated for SQL text.
To display the id, stmtnum, and linenum columns, enter:
select id, stmtnum, linenum from sysprocesses where spid = spid_of_hung_session
You do not need the sa_role to run this select statement.
Copyright © 2005. Sybase Inc. All rights reserved. |