General rules

Types and functions of the control SQL

The control SQL connects a UAP to HiRDB, disconnects a UAP from HiRDB, and performs lock control on tables.

The following table lists the types and functions of the control SQL.

Table 5-1 Types and functions of the control SQL

TypeFunction
CALL COMMAND statement (Execute command or utility)Executes a HiRDB command or utility.
COMMIT statement (Terminate transaction normally)Terminates the current transaction normally, sets synchronization points, generates one unit of commitment, and puts into effect the databases updates performed by the transaction.
CONNECT statement (Connect UAP to HiRDB)Passes the authorization identifier and password to HiRDB, enabling the UAP to use HiRDB.
DISCONNECT statement (Disconnect UAP from HiRDB)Terminates the current transaction normally, sets synchronization points, generates one unit of commitment, and disconnects the UAP from HiRDB.
LOCK statement (Lock control on tables)Performs exclusive lock on specified tables.
ROLLBACK statement (Cancel transaction)Cancels the current transaction and nullifies the database updating performed by the transaction.
SET SESSION AUTHORIZATION statement (Change connected user)Changes a connected user by reporting an authorization identifier and password to HiRDB.

Notes on specifying the control SQL

The transaction is the unit of logical work; it is the basic unit by which HiRDB recovers data and performs concurrent execution of UAPs. To improve the system's concurrent execution capability, the amount of time required by a transaction should be as short as possible. Especially when large quantities of data are updated, the duration of lock control, the number of resources subject to lock control, and the amount of log data generated must be taken into consideration. In some cases, it may be necessary to divide a transaction into several subunits.

Notes on X/open-compliant UAPs running under OLTP

The following SQL statements cannot be used in X/Open-compliant UAPs running under OLTP: