Transaction Context Restrictions
Your application must not issue the following statements in an Ingres multi-statement transaction:
• SET SESSION AUTHORIZATION
• ENABLE / DISABLE SECURITY_AUDIT
• SET LOCKMODE
• SET [NO]LOGGING
• SET SESSION WITH ON_ERROR
However, when your application issues these statements, they must be issued with an XA transaction, demarcated as required by your TP vendor software. To determine whether your application is in a transaction, issue the following Ingres SQL statement:
INQUIRE_SQL(TRANSACTION)
Example: INQUIRE_SQL(TRANSACTION) statement
begin_xa_transaction();
exec sql inquire_sql (:trxflag = transaction);
if trxflag = 0
{
exec sql set lockmode...
exec sql set session with on_error...
}
...
For details about INQUIRE_SQL, see the SQL Reference Guide.
Environment Variables
To avoid conflicts with Ingres transaction states, you can use environment variables to specify a set of SQL statements to be sent to the Ingres DBMS whenever Ingres DTP creates a connection to an Ingres database. The following environment variables are listed in the order in which their corresponding statements are sent to the DBMS:
ING_SYSTEM_SET
Executed for all connections
ING_SET_DBNAME
Executed for connections to the specified database
ING_SET
Executed for all connections
For details about these environment variables, see the System Administrator Guide. To set the environment variables for your entire Ingres installation, use the following command:
ingsetenv
To set the environment variables for your current session, use the following command:
setenv
Any SET statements issued by your application after a connection is made override the settings established by the preceding environment variables.
Non-DTP Ingres SQL applications establish connections by issuing the CONNECT statement. In Ingres DTP applications, the CONNECT statement is not required (and is not valid). Connections to databases are made by Ingres DTP on behalf of your application-typically (though not always), a connection is established the first time your application accesses the RMI for which the connection is required.
Last modified date: 08/14/2024