uCosminexus Application Server, Maintenance and Migration Guide

[Contents][Glossary][Index][Back][Next]

Appendix B.3 HiRDB Client

In a HiRDB client, information such as the connection ID and connect serial number is output to the SQL trace file, error log file, and reconnection trace file.

How to acquire the SQL trace file, error log file, and reconnection trace file, and the output format of each one is described below:

Organization of this subsection
(1) SQL trace file
(2) Error log file
(3) Reconnection trace file

(1) SQL trace file

This is a trace file that outputs the SQL trace information of an executed UAP. This trace file is output when the execution of an SQL terminates.

If an SQL error occurs while you are executing a UAP, you can identify the SQL responsible for the error by referencing the SQL trace file.

Conditions for output of a connection ID
If the below-mentioned condition is fulfilled, the connection ID is output to the SQL trace file:
  • A value is specified in the client environment definitions PDCLTPATH and PDSQLTRACE.
For details about how to set client environment definitions, see the HIRDB UAP Development Guide.
(a) How to acquire

The SQL trace file is stored in the directory specified in the client environment definition PDCLTPATH.

(b) Output format

The server name, connect serial number, and server process ID are output in the format are as follows:

 
(Omitted)
 ...
CONNECTION STATUS:
 CURHOST(connection destination host name) CURPORT(connect port number) SRVNAME(server name)
 CNCTNO(connect serial number) SVRPID(server process ID) CLTPID (UAP process ID) CLTTID (UAP thread serial number)
 ...
(Omitted)

The SQL statement, SQL execution time, and values set in the variables within the SQL statement are also output to the SQL trace file. For details about the output format, see the HIRDB UAP Development Guide.

(2) Error log file

This is a log file that outputs the error information when an error occurs during the communication between a client and HiRDB server, or in the XA interface defined in X/Open. This log file is output when an error occurs during the execution of an SQL, communication processing, or execution of XA interface functions defined in X/Open.

Conditions for output of a connection ID
If the below-mentioned condition is fulfilled, the connection ID is output to the error log file:
  • A value is specified in the client environment definitions PDCLTPATH and PDUAPERLOG.
For details about how to set, see the HIRDB UAP Development Guide.
(a) How to acquire

The SQL trace file is stored in the directory specified in the client environment definition PDCLTPATH.

(b) Output format

The server process ID is output to the SQL trace in the format described below:

 
Error-log-identifier (>> or >) UAP-process-ID UAP-thread-serial-number Server-process-ID Error-log-counter (Rest omitted)

For details about the output format, see the HIRDB UAP Development Guide.

In addition to the connection information, the time of acquiring the error, SQLCODE, and SQL operation code where an error occurred is output to the error log information.

(3) Reconnection trace file

When you reconnect with the automatic reconnection function of HiRDB client, then this trace file outputs the value of the connection handle, connection information before reconnection, connection information after reconnection, and the time of reconnection that HiRDB manages internally. This trace file is output when a connection is executed automatically with the automatic reconnection function.

Conditions for output of a connection ID
If the below-mentioned conditions are fulfilled, the connection ID is output to the reconnection trace file:
  • A value is specified in the client environment definitions PDCLTPATH and PDSQLTRACE.
  • The automatic reconnection function of HiRDB is used.
For details about how to set up, see the HIRDB UAP Development Guide.
(a) How to acquire

The reconnection trace file is stored in the directory specified in the client environment definition PDCLTPATH. The stored file names are pdrcnct1.trc and pdrcnct2.trc.

(b) Output format

The reconnection trace is output in the format described below:

 
Connection-handle-value Reconnection-result(S or F) Reconnection-start-date-and-time - 
Reconnection-end-date-and-time Connection-information-before-reconnection => Connection-information-after-reconnection

The connection ID is output as the connection information after reconnection.

For details about the output format, see the HIRDB UAP Development Guide.

An output example of the reconnection trace file is described below. The characters in bold indicate the connection ID.

 
40004250 S 2004/04/12 11:10:36.766 - 2004/04/12 11:10:41.846 sds:9:23763 => sds:10:23750
40004250 S 2004/04/12 11:11:07.491 - 2004/04/12 11:11:12.547 sds:10:23750 => sds:11:23765
40004850 F 2004/04/12 11:17:58.285 - 2004/04/12 11:18:23.395 sds:14:23751 => 
40005050 S 2004/04/12 11:27:35.098 - 2004/04/12 11:27:40.152 sds:1:24414 => sds:2:24418