Was this helpful?
Troubleshooting and Tuning Ingres DTP Applications
How You Obtain Trace and Error Information
To obtain information about XA transaction execution and errors, use the following features:
Ingres error logs
Error logs list errors that have occurred for an Ingres facility. For details about enabling error logs, see the Database Administrator Guide.
Ingres trace files
Trace files contain messages issued by an Ingres facility, enabling you to examine a history of the execution. The GC log records connections to the DBMS and is therefore of interest to the XA System Administrator. To enable GC tracing, use the II_GCx_TRACE and II_GCA_LOG environment variables. For details, see the System Administrator Guide.
II_EMBED_SET environment variable
This environment variable allows you to enable a variety of tuning and troubleshooting features. For details, see the System Administrator Guide.
Logstat utility
The logstat utility, described in detail in the System Administrator Guide, displays status information about the logging system. Logstat indicates XA transactions by preceding the transaction ID with “XA.”
The following figure explains the format of logstat output for XA global transactions. In this diagram, “%x” denotes a 4-byte hexadecimal number.
XA trace file
The XA trace file contains XA-related messages from the XA routines, including queries issued by the application server and error messages issued by the DBMS. To enable this feature, set the II_XA_TRACE_FILE environment variable to a valid file name.
To include the process ID of the application server process in the trace file name, specify “%p” as part of the name.
Example: XA trace file with process ID specified
setenv II_XA_TRACE_FILE svr_grp_1_%p.trc
The preceding setting produces trace files with names like “svr_grp_1_23145.trc,” “svr_grp_1_23172.trc”, and “svr_grp_1_23229.trc,” where “23145,” “23172,” and “23229” are the process IDs. If you want to use the “%p” feature in a Linux environment, be sure that the file name you specify doesn't contain any other percent signs (%).
You must set II_XA_TRACE_FILE before the application server is started. When enabled, XA trace logging logs XA calls from the transaction manager to the application server and SQL statements issued by the application. For details about setting environment variables, see the System Administrator Guide.
Example: Portion of XA trace output
---- XA trace: Started at Mon Aug 9 12:08:48 1994 ---

XA_OPEN: flags = TMNOFLAGS
rmid: 5
OPEN string is: INGRES ticketing as ticketing options= -umoeh
return value: XA_OK
------------------------------------------------
XA_OPEN: flags = TMNOFLAGS
rmid: 10
OPEN string is: INGRES personnel options = -umoeh
return value: XA_OK
------------------------------------------------
XA_START: flags = TMNOFLAGS
XID: 00000001:4:1:4C4D6C6D:30000000:XA
rmid: 5
connected to ticketing ( Ingres DTP session 1)
return value: XA_OK
------------------------------------------------
XA_START: flags = TMNOFLAGS
XID: 00000001:4:1:4C4D6C6D:30000000:XA
rmid: 10
connected to personnel ( Ingres DTP session 2)
return value: XA_OK
------------------------------------------------
Appl Code:
  set connection to rmi: personnel (Ingres DTP session 2)
------------------------------------------------
Appl Code:
  drop table employees
------------------------------------------------
XA_CLOSE: flags = TMNOFLAGS
rmid: 10
CLOSE string is: INGRES personnel options = -umoeh
Last XA_CLOSE, shutting down XA and freeing session cache
disconnecting personnel (Ingres DTP session 4)
'release session' sent to RM
disconnecting ticketing (Ingres DTP session 3)
'release session' sent to RM
disconnecting personnel (Ingres DTP session 2)
'release session' sent to RM
disconnecting ticketing (Ingres DTP session 1)
'release session' sent to RM
closing XA trace file...
------------------------------------------------
Note:  If you are using XA trace files with multiple application servers, you can prevent them from overwriting each other's trace files by starting the servers from different directories or by resetting the II_XA_TRACE_FILE logical before starting each server.
Last modified date: 04/03/2024