Finding the Currently Executing Statement

When diagnosing a problem, you may want to know what statement was executing when the problem occurred.

The sp_iqcontext stored procedure tells you what statements are running on the system when you run the procedure, and identifies the user and connection that issued the statement. You can use this utility together with information provided by sp_iqconnection, the .iqmsg log, and the -zr server request log (.srvlog), as well as stack traces, to determine what was happening when a problem occurred.

For details and sample output of the sp_iqcontext stored procedure, see Reference: Building Blocks, Tables, and Procedures. To match .iqmsg log and the -zr server request log entries using connection information, correlate connection information between the .srvlog and .iqmsg files.

Related concepts
IQ Main Store and IQ Temporary Store Space Management
Logging Server Requests
Sybase IQ Stops Processing or Stops Responding
Related tasks
Correlating Connection Information Between the .srvlog and .iqmsg Files