Nonstop Database, HiRDB Version 9 UAP Development Guide
Reconnection is performed at the following times:
When the HiRDB client executes an SQL statement, the automatic reconnect facility detects whether the connection with the HiRDB server has been disconnected. If the facility detects a disconnection, it reconnects the client to the server, and re-executes the SQL statement after the connection is re-established. If the automatic reconnect facility detects a connection failure when the HiRDB client executes an SQL statement after automatic reconnection, it returns an error to the UAP. The following figure shows the reconnect timing (when the HiRDB client executes an SQL statement immediately after executing the CONNECT statement, or when the transaction for the previous SQL statement is completed).
Figure 4-70 Reconnect timing (when the HiRDB client executes an SQL statement immediately after executing the CONNECT statement, or when the transaction for the previous SQL statement is completed)
When the HiRDB client executes an SQL statement, the automatic reconnect facility detects whether the connection with the HiRDB server has been disconnected. If the facility detects a disconnection, it returns a connection error (SQLCODE = -722 or -723) to the UAP. When the client executes the next SQL statement, the facility reconnects with the server and re-executes the previous SQL statement.
If the automatic reconnect facility detects a connection failure when the HiRDB client executes an SQL statement after automatic reconnection, it returns an error to the UAP. The figure below shows the reconnect timing (when the HiRDB client executes an SQL statement while the HiRDB server is processing the transaction for the previous SQL statement). Any uncompleted transactions that were being executed when the SQL statement with the returned error was executed are rolled back.
Figure 4-71 Reconnect timing (when the HiRDB client executes an SQL statement while the HiRDB server is processing the transaction for the previous SQL statement)
If the HiRDB client executes the CONNECT statement and the connection fails because of a communication error, the automatic reconnect facility executes reconnect processing.
The following figure shows the reconnect timing (when the HiRDB client executes the CONNECT statement).
Figure 4-72 Reconnect timing (when the HiRDB client executes the CONNECT statement)
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.