Trace utility

The db2drdat utility records the data that is interchanged between the Db2 Connect server (on behalf of the IBM® data server client) and the IBM mainframe database server.

As a database administrator (or application developer), you might find it useful to understand how this flow of data works, because this knowledge can help you determine the origin of a particular problem. Suppose you found yourself in the following situation: you issue a CONNECT TO database statement for a IBM mainframe database server but the command fails and you receive an unsuccessful return code. If you understand exactly what information was conveyed to the IBM mainframe database server management system, you might be able to determine the cause of the failure even if the return code information is general. Many failures are caused by simple user errors.

Output from db2drdat lists the data streams exchanged between the Db2 Connect workstation and the IBM mainframe database server management system. Data sent to the IBM mainframe database server is labeled SEND BUFFER and data received from the IBM mainframe database server is labeled RECEIVE BUFFER.

If a receive buffer contains SQLCA information, it will be followed by a formatted interpretation of this data and labeled SQLCA. The SQLCODE field of an SQLCA is the unmapped value as returned by the IBM mainframe database server. The send and receive buffers are arranged from the oldest to the most recent within the file. Each buffer has:
  • The process ID
  • A SEND BUFFER, RECEIVE BUFFER, or SQLCA label. The first DDM command or object in a buffer is labeled DSS TYPE.
The remaining data in send and receive buffers is divided into five columns, consisting of:
  • A byte count.
  • Columns 2 and 3 represent the DRDA data stream exchanged between the two systems, in ASCII or EBCDIC.
  • An ASCII representation of columns 2 and 3.
  • An EBCDIC representation of columns 2 and 3.