Scalable Database Server, HiRDB Version 8 UAP Development Guide

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

10.1.6 SQL trace dynamic acquisition facility

The SQL trace dynamic acquisition facility lets you dynamically obtain SQL trace information using a command during UAP execution. Acquisition of SQL trace information begins at the next CONNECT.

Organization of this subsection
(1) Specifying the client environment definitions
(2) Trace acquisition command (pdtrcmgr)

(1) Specifying the client environment definitions

Specify the SQL trace file storage directory in PDTRCPATH beforehand. The facility creates two SQL trace files: pdcHHMMSSmmm_XXX_1.trc and pdcHHMMSSmmm_XXX_2.trc, where HHMMSSmmm indicates the CONNECT time (HH:MM:SS:mmm) and XXX indicates the connection sequence number.

(2) Trace acquisition command (pdtrcmgr)

If the directory specified with the -d option is the same as the directory specified in the PDTRCPATH client environment definition variable during UAP execution, the pdtrcmgr command issues the trace acquisition start and end requests.

(a) Format
pdtrcmgr  -d directory-name-specified-in-PDTRCPATH
           [{-b| -e}]
           [-k{[s] [u] [p] [r]| a}]
           [-n PDCLTAPNAME]
           [-s SQL-trace-file-size]
           [-o]
(b) Options

[Figure] <path name>

Specifies the absolute path name of the value (directory name) specified in the PDTRCPATH client environment definition variable to start or stop the acquisition of trace information for the UAP.

The facility issues a trace acquisition start or stop request for all UAPs for which the specified directory matches the directory in PDTRCPATH.

Specifies whether to start or stop the acquisition of the SQL trace:

-b: Starts the acquisition of SQL trace.

-e: Stops the acquisition of SQL trace.

Specifies the information to be output. When this option is omitted, the facility outputs only the SQL trace information.

s: Outputs information by the SQL.

u: Outputs information by the UAP.

p: Outputs access path information.

r: Outputs SQL runtime interim results.

a: Outputs all information.

s, u, p, and r can be specified in different combinations (such as su, spr, or spr). Specifying sup is the same as specifying a. If u, p, r, ur, pr, or upr is specified, SQL trace information is not output.

When the -e option is specified, the specification of the -k option becomes invalid.

For details about the UAP statistical report, see 10.1.4 UAP statistical report facility.

Specifies that only the UAP specified in the PDCLTAPNAME client environment definition variable is to be subject to acquisition of an SQL trace. The facility ignores this option if the -e option is specified.

[Figure] <unsigned integer> ((0 or 32,768 to 2,000,000,000)) <<32,768>>

Specifies the size of the SQL trace file in bytes.

If 0 is specified, the maximum file size is assumed. If a value in the range from 32,768 to 2,000,000,000 is specified, the specified size of file is used.

The facility ignores this option if the -e option is specified.

Specifies that SQL trace files are to opened and closed in CONNECT and DISCONNECT units. The facility ignores this option when the -e option is specified.

When SQL trace files are opened and closed in CONNECT and DISCONNECT units instead of operation units (SQL units), the SQL trace output time can be shortened because the overhead is reduced.

If you omit this option, the SQL trace dynamic acquisition facility opens and closes SQL trace files in operation units.

This facility continues to write information as long as the SQL trace file is open. Therefore, if you specify this option, some SQL trace information may be discarded if DISCONNECT cannot be executed properly.