SQL/MX 2.x Reference Manual (H06.10+, J06.03+)

MXCI Commands
HP NonStop SQL/MX Reference Manual544517-008
4-36
LOG Command
LOG Command
Considerations for LOG
Examples of LOG
The LOG command starts or stops MXCI logging to a disk file. When logging is in
effect, MXCI writes the commands you enter to a file (in addition to executing them)
and writes the output of the commands to the file.
Use LOG only within an MXCI session.
log_file
is the name of a file to which MXCI writes the commands you use and the
command output. LOG closes the previous log file, if any, and opens log_file as
the new log file. The path name can be either an absolute path name or a relative
path name.
To stop logging, omit log_file.
[COMMAND[S]]
logs only MXCI input, not output or prompts.
[RESULT]
logs the output of a command or query, all success and error messages, row count
information, and comments that are entered from an MXCI session. It does not log
the entered commands or queries.
[RESULT ONLY]
logs only the output of a command or query from an MXCI session. The ONLY
option must be used only with the RESULT option. If it is used with the
COMMAND[S] option, a syntax error is displayed.
CLEAR
clears log_file before logging. If you omit CLEAR, LOG appends the new log to
existing data in log_file.
LOG [log_file {[COMMAND[S]] | [RESULT [ONLY] ]} [CLEAR]]
Caution. To ensure that log information is retained for an MXCI session, use a unique name
for the log file. For more information, see Concurrent MXCI Sessions on page 4-37.
Note. The RESULT and ONLY options are available only on systems running J06.09 and
later J-series RVUs and H06.20 and later H-series RVUs. These options display the output
of the SELECT or EXECUTE queries. They do not display the output of the DISPLAY
STATISTICS or SHOWCONTROL command or the output of the EXPLAIN statement.