SQL/MX 2.x Reference Manual (H06.10+, J06.03+)
SQL/MX Statements
HP NonStop SQL/MX Reference Manual—544517-008
2-242
Considerations for SET TRANSACTION
If you exit a program without executing COMMIT or without setting
AUTOCOMMIT ON, any uncommitted changes are automatically rolled
back.
AUTOCOMMIT is an SQL/MX extension and cannot be used in combination
with any other option.
autobegin-option
specifies that NonStop SQL/MX can start implicit transactions when the
statement runs.
If this option is set to ON, NonStop SQL/MX automatically starts a transaction
whenever a statement that requires a transaction is run.
If this option is set to OFF, the transaction does not start automatically. You
must explicitly start a transaction before running the statement. When a
statement that requires a transaction is run, and there is no available
transaction, Nonstop SQL/MX returns error 8877.
Considerations for SET TRANSACTION
Implicit Transactions
Most DML statements are transaction-initiating—the system automatically initiates a
transaction when the statement begins executing.
The exceptions (statements that are not transaction-initiating) are:
•
COMMIT, FETCH, ROLLBACK, and SET TRANSACTION
•
DML statements operating on nonaudited tables
•
DML statements executing under READ UNCOMMITTED access on audited tables
•
The embedded-only SQL statements and declarations GET DIAGNOSTICS,
BEGIN DECLARE SECTION, END DECLARE SECTION, and WHENEVER
•
EXECUTE or EXECUTE IMMEDIATE, which are transaction-initiating only if the
associated statement is transaction-initiating
Note. AUTOBEGIN is set to ON when a transaction is not available.
Note.
•
AUTOBEGIN is a NonStop SQL/MX extension.
•
AUTOBEGIN cannot be used in combination with any other option.
•
AUTOBEGIN works only with embedded programs, namely, JDBC programs that
use T2 driver and MXCI.
•
AUTOBEGIN does not work with ODBC driver and JDBC T4 driver.
Embed
C/COBO
L










