SQL/MX 2.3.x to SQL/MX 3.0 Database and Application Migration Guide (H06.22+, J06.11+)
Considerations for upgrading to SQL/MX Release
3.0
HP NonStop SQL/MX 2.3.x to SQL/MX 3.0 Database and Application Migration Guide—666210-002
2-11
Using the read-only transaction access mode
The previously prepared SELECT statement is executed.
The transaction started by the SELECT statement is not committed. A
WRITE operation (INSERT, UPDATE, or DELETE statement) is performed.
The following set of operations demonstrate the error scenario for ODBC or JDBC T4
applications:
The transaction access mode is set to read-only.
A SELECT statement is prepared and executed. The transaction is not
committed.
The transaction access mode is changed to read-write.
A WRITE operation (INSERT, UPDATE, or DELETE statement) is
performed
In SQL/MX Release 2.x, the WRITE operations execute successfully. However, in
SQL/MX Release 3.x, the WRITE operation returns SQL error 8551 and file system
error 757. These errors occur due to a more restrictive check in the DAM subsystem,
which prevents WRITE operations in a read-only transaction.
The following scenario is applicable to only JDBC T4 applications:
In JDBC T4 3.x releases (versions prior to T1249V326^AMU), the driver
retains the read-only attribute for a connection even after the connection is
closed and returned to the connection pool. When this connection is
reused from the pool, the new connection uses the same read-only
attribute value that was set before the connection was returned to the pool.
If the read-only attribute was set to true, executing a SELECT statement
starts a read-only transaction. Executing a WRITE operation in the same
read-only transaction returns SQL error 8551 and file system error 757.
To resolve these errors, perform one of the following:
Install JDBC T4 3.x driver version T1249V326^AMU or later.
Set the read-only attribute of the connection to FALSE before closing
the connection.
The following examples describe how SQL applications using read-only transaction
access mode behave in SQL/MX Release 2.x and SQL/MX Release 3.x:
Example 1:
This example is applicable for the ODBC or JDBC T4 applications, MXCI, and
embedded SQL programs.










