You use the db2exfmt tool to format the contents of the explain tables. This tool is located in the misc subdirectory of the instance sqllib directory.
To use the tool, you require read access to the explain tables being formatted.
>>-db2exfmt----+-------------+---+-------------+---+--------+---> '--d--dbname--' '--e--schema--' '--f--O--' >-----+------------------+---+-----+---+-----------+------------> | .---------. | '--l--' '--n--name--' | V | | '--g-----+---+--+--' +-O-+ +-T-+ +-I-+ '-C-' >-----+-------------+---+--------------+------------------------> '--s--schema--' +--o--outfile--+ | .--t-. | '-+----+-------' >-----+-----------------------+---+----------------+------------> '--u--userID--password--' '--w--timestamp--' >-----+--------------+---+-----+------------------------------->< '--#--sectnbr--' '--h--' |
Both the user ID and password must be valid according to naming conventions and be recognized by the database.
You will be prompted for any parameter values that are not supplied, or that are incompletely specified, except in the case of the -h and the -l options.
If an explain table schema is not provided, the value of the environment variable USER is used as the default. If this variable is not found, the user is prompted for an explain table schema.
Source name, source schema, and explain time stamp can be supplied in LIKE predicate form, which allows the percent sign (%) and the underscore (_) to be used as pattern matching characters to select multiple sources with one invocation. For the latest explained statement, the explain time can be specified as -1.
If -o is specified without a file name, and -t is not specified, the user is prompted for a file name (the default name is db2exfmt.out). If neither -o nor -t is specified, the user is prompted for a file name (the default option is terminal output). If -o and -t are both specified, the output is directed to the terminal.