Correlating connection information

Technical Support may ask you to set the -zr option on the start_asiq command in your configuration file. This server startup option sets the request logging level to track statements sent to the server. Parameters are ALL, NONE, or SQL. The option produces a log file named for the database, with the suffix .zr. In the log file, each connection to the server is identified by a connection handle.

Because the connection handle is not unique, Sybase IQ assigns its own Sybase IQ connection ID, which is displayed in the Sybase IQ message file. The Sybase IQ message file records the errors, warnings, and tracing information for each connection. Because the two files use different identifiers for the connections, you cannot compare the .zr output with the .iqmsg file and easily locate information for a particular connection.

The following procedure tells how to correlate the identifiers in the two files to find relevant information. For example, assume that the .zr output file is example.zr and the Sybase IQ message file is example.iqmsg.

StepsTo correlate connection information between the .zr and .iqmsg files:

  1. In the .zr file, locate a connection of interest, for example:

    .conn: 240215640
    

    For example, on a UNIX system:

    grep 240215640 example.zr | grep CONNECT
    
    04/19 06:42:06.690 ** REQUEST conn: 240215640 CONNECT
    04/19 06:42:07.204 ** DONE    conn: 240215640 CONNECT    Conn=569851433
    04/19 06:46:17.646 ** REQUEST conn: 240215640 DISCONNECT
    04/19 06:46:17.670 ** DONE    conn: 240215640 DISCONNECT
    

  2. In the same line, find the number that follows Conn=. In this example:

    Conn=569851433
    
  3. Search the .iqmsg file for “Connection handle is” followed by that number. For example:

    grep 569851433 example.iqmsg
    
    2006-06-19 07:46:57 0000000002 Connection handle is : 569851433. SA connID: 2.User Name is : DBA.
    

    The Sybase IQ connection handle in this example is 000000002.

  4. Isolate all the lines from the .iqmsg file for that connection:

    grep ' 0000000002 ' example.iqmsg