Hitachi

Hitachi Advanced Database Command Reference


40.3.4 Checking the SQL statement statistical information in a specific date and time range

This example outputs SQL statement statistical information to enable checking of SQL statement execution status within a specified range of dates and times.

Organization of this subsection

(1) Checking SQL statement sequence numbers

This example checks the KFAA51000-I messages output to the message log file to obtain the SQL statement sequence number of the SQL statement for which statistical information is to be output.

Important

To output the KFAA51000-I messages to the message log file, you must have specified in advance the adb_sql_text_out operand in the server definition so that SQL statements will be output to the message log file.

(2) Executing the adbstat command

Command to be executed
adbstat -c sql                                           ...1
        -m '2014/09/28 13:00:00','2014/09/28 15:00:00'   ...2
        -q 4                                             ...3
Explanation:
  1. Specifies that SQL statement statistical information is to be output.

  2. Specifies the date and time range of the statistical information that is to be output (from 2014-09-28 at 13:00:00 to 2014-09-28 at 15:00:00 as the range of date and time statistical information was output to the statistics log file.

  3. Specifies the SQL statement sequence number (4) of the SQL statement for which statistical information is to be output.