Was this helpful?
Transaction Context Restrictions
Your application must not issue the following statements in an Ingres multistatement 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/28/2024