Hitachi

Hitachi Advanced Database Setup and Operation Guide


10.8.1 Checking the application or command processing status

If the transaction processing time is longer than expected when an application or command is executed, you need to check the transaction processing status and take the necessary action.

How to check the transaction processing status is described below. Note that you cannot check the processing status of the adbinit or adbstat command.

To check the transaction processing status:

  1. Execute the adbls -d cnct command.

    Check whether the target connection is displayed under the item PROGRAM.

    ■ To check the application processing status

    The application identifier specified for the adb_clt_ap_name operand in the client definition is displayed. The following shows an example of the execution result of the adbls -d cnct command.

    Execution result example

    [Figure]

    If an application identifier is displayed, proceed to step 3.

    If the adb_clt_ap_name operand is not specified, ******** is displayed. In this case, proceed to step 2.

    Note

    When SQL statements are being executed, SQL_ELAPSED_TIME displays the elapsed time (in microseconds) of the SQL statement that has been executing for the longest time since it started.

    ■ To check the command processing status

    If connection is established, the applicable command name (such as adbimport) is displayed. For the adbsql command, the application identifier specified for the adb_clt_ap_name operand in the client definition is displayed.

    If a command name is displayed, proceed to step 3. Otherwise, proceed to step 2.

  2. Execute the adbls -d srv command.

    If the target connection is not displayed, check whether the HADB server is running. The following shows an example of the execution result of the adbls -d srv command.

    Execution result example

    SVID  STATUS  START_TIME            MSGLOG_STATUS
    6477  ACTIVE  2017/03/02 14:18:34   NORMAL

    If the item STATUS shows ACTIVE, the HADB server is active. Proceed to step 6.

    If the item STATUS does not show ACTIVE, execute the adbstart command to start the HADB server, and then re-execute the application or command.

  3. Check the connection ID.

    If a target connection is displayed when you execute the adbls -d cnct command in step 1, check whether a connection ID is displayed under CID. If a connection ID is displayed, proceed to step 4. Otherwise, proceed to step 6.

  4. Execute the adbstat -c cnct -n command.

    In order to check the processing status of the transaction, execute the adbstat -c cnct -n command based on the application identifier checked in step 1. For the -n option, specify the application identifier.

    When the connection operation information is displayed, refer to the following output items to check the transaction processing status:

    • SQL_execute_wait_total_time (total SQL statement execution wait time)

    • SQL_execute_wait_cnt (number of times SQL statements waited for execution)

    • Execution time of each SQL statement executed

      SELECT_total_time (SELECT statement execution time)

      INSERT_total_time (INSERT statement execution time)

      UPDATE_total_time (UPDATE statement execution time)

      DELETE_total_time (DELETE statement execution time)

      PURGE_CHUNK_total_time (PURGE CHUNK statement execution time)

    If the value of any output item has increased significantly since the last time the adbstat command was executed, processing might be taking too long. If you need to terminate forcibly the transaction being processed, go to step 5.

    If you are executing the adbstat command for the first time or if the results of the previously executed adbstat command are not available, you cannot determine whether processing is taking too long.

  5. Execute the adbcancel command.

    If needed, forcibly terminate the transactions being processed.

    To forcibly terminate the transaction being processed, execute the adbcancel command and specify in the -u option the connection ID confirmed in step 3. After the forced termination, re-execute the application or command.

  6. Examine the application.

    If the HADB server is active but no connection ID is displayed, the target application has not successfully connected to the HADB server. Therefore, check whether the application is able to connect to the HADB server. In addition, reassess the values specified for the adb_clt_rpc_srv_host and adb_clt_rpc_srv_port operands of the client definition.