Hitachi

Hitachi Advanced Database Command Reference


23.3 Example

This example executes the adbls -d cnct command to display the HADB server's connection status.

[Figure]

Note:
  • If no connection has been established, only the titles of the output items are displayed.

  • In the preceding example, the line is divided at the following points. However, in the actual output all items are displayed side-by-side on the same line.

    - Between STATUS and TRN_ISO_LV

    - Between CLIENT_GROUP and SQL_ELAPSED_TIME

Explanation of the output items

CID

Displays the connection ID.

CNUMBER

Displays the connection sequence numbers since the HADB server started.

CONNECT_TIME

Displays the date and time the connection was established.

PROGRAM

Displays the application identifier.

  • For application programs or the adbsql command

    The application identifier specified in the adb_clt_ap_name operand in the client definition is displayed. If the adb_clt_ap_name operand is omitted, ******** is displayed.

  • For commands (excluding the adbsql command)

    If the connection was established by a command, such as adbimport, the command name is displayed (example: adbimport).

C-PID

Displays the process ID of the HADB client that established the connection. Note that 0 is displayed for the connection from a JDBC driver.

IP-ADDRESS

Displays the IP address of the HADB client that established the connection.

STATUS

Displays the connection status. One of the following is displayed:

  • NOT_STARTED: No transaction has started.

  • THREAD_WAITING: Waiting for allocation of a processing real thread

  • STARTING: A transaction is starting.

  • STARTED: A transaction is executing.

  • COMMITTING: Commit processing is underway.

  • ROLLBACKING: Rollback processing is underway.

The following is displayed only if the multi-node function is used:

  • SWITCH_WAITING: Pending switchover to the master node

  • RETURN_WAITING: Pending node recovery

  • NODE_WAITING: Waiting for ongoing transactions executed on other nodes to finish

▪ If you are using the multi-node function
  • For the node that is executing a transaction, the following status might be displayed (because the connection might be changed to the following status). For nodes that are not executing transactions, the following status is not displayed.

    - THREAD_WAITING: Waiting for allocation of a processing real thread

    - STARTING: A transaction is starting.

    - COMMITTING: Commit processing is underway.

    - ROLLBACKING: Rollback processing is underway.

  • For the master node, the following status might be displayed (because the connection might be changed to the following status). For slave nodes, the following status is not displayed.

    - SWITCH_WAITING: Pending switchover to the master node

    - RETURN_WAITING: Pending node recovery

    - NODE_WAITING: Waiting for ongoing transactions executed on other nodes to finish

TRN_ISO_LV

Displays the transaction isolation level. One of the following is displayed:

  • READ_COMMITTED: The transaction isolation level is READ COMMITTED.

  • REPEATABLE_READ: The transaction isolation level is REPEATABLE READ.

ACCESS_MODE

Displays the transaction access mode. One of the following is displayed:

  • READ_ONLY: Read-only transaction

  • READ_WRITE: Read/write transaction

CONNECTION_INFORMATION

Displays the connection information. This is the same information as was displayed in the KFAA81000-I message that was output to the message log file when the connection was established.

NODE_NO

Displays the node number of the node that is executing a transaction over the connection.

However, if a connection has been established from the JDBC driver, when a ResultSet object is created with HOLD_CURSORS_OVER_COMMIT specified for the holdability, the node number is displayed even if the transaction has terminated normally. In this case, the node number of the node that was executing the transaction before normal termination is displayed.

When the multi-node function is not being used, nothing is displayed.

CLIENT_TYPE

Displays the client type that established the connection.

  • AP(JDBC): An application program connected from a JDBC driver.

  • AP(C Library): An application program connected from a driver other than a JDBC driver.

  • command: A command is connected.

CLIENT_GROUP
  • For an application program or the adbsql command:

    Displays the client group name to which the HADB client belongs. If the HADB client belongs to a command group, command is displayed.

    If the HADB client does not belong to any group, nothing is displayed.

  • For commands (excluding the adbsql command):

    If a command group is set up, command is displayed.

    If no command group is set up, nothing is displayed.

SQL_ELAPSED_TIME

Displays the elapsed time (microseconds) of the SQL statement for which the longest time has elapsed among the SQL statements being executed on the connection since the execution started.

If no SQL statement is being executed, nothing is displayed.

If you are using the multi-node function, the elapsed time of the SQL statement is displayed only on the node that is executing transactions.

If the adbls -d cnct command is executed after the HADB server has terminated abnormally or forcibly during execution of SQL statements, the difference between the following two times is output as the elapsed time:

  • The start time of the SQL statement for which the longest time has elapsed among the SQL statements being executed since the execution started

  • The time when the HADB server terminated abnormally or forcibly