System administrators and database administrators responsible for administering this database should read this chapter before installing and configuring the DBMS if it will be used for transaction processing. In particular, refer to the sections identified below. Application developers building applications with VisiTransact should review the information in “Programming restrictions”.
Use the init.ora parameters, described in the following table, to help configure your database for use with the XA Session Manager for Oracle OCI.
See the Oracle9i Server Administrator's Guide for more information on setting this parameter. With VisiTransact, the number of distributed transactions is limited by the database init.ora parameter transactions. Transactions remain active from the time of the first getConnection() or getConnectionWithCoordinator() call until the commit or rollback is complete. The default setting for transactions is generally set too low for use with the Session Manager. The default is system dependent.With Oracle OCI, each distributed transaction, as opposed to a connection, consumes a database session. Make sure that init.ora parameters, sessions and processes, are set high enough to accommodate the distributed transactions as well as other applications' sessions.See Oracle documentation for information on how to set init.ora parameters and for information about the interaction of Oracle XA with other Oracle features, including Oracle Parallel Server and Oracle Replication.To make sure that the permissions to the view are correct and that recovery processing can take place, log into Oracle using SQL*Plus as the userid for the XA Resource Director and perform the following query:If you receive Oracle error “ORA-00942: the table or view does not exist,” then the XA Resource Director will not be able to access this view. The user can either logon as user sys or system or connect internally from the server manager to grant the select privilege on this view to the appropriate user.The PATH environment variable needs to include the path to the Oracle client directory where the database client libraries are installed, as well as the path to the Session Manager libraries.
1
2 Include the file, ora9i_sessmgr.h, in the application source to define the object ITSoracle9i_handles.
3 Cast the return value of Connection::getNativeConnectionHandle() to the type ITSoracle9i_handles * (a pointer to an object of type ITSoracle9i_handles).
4 Use accessor methods provided by the class ITSoracle9i_handles to obtain the various handles needed. These methods are:Do not attempt to deallocate the objects obtained through the ITSoracle9i_handles object; these object instances are managed by the Session Manager.
• Do not use DDL statements in your application.
This restriction means that DDL SQL statements will not be supported in the Oracle XA application. This is because a DDL SQL statement such as CREATE TABLE performs an implicit commit. Any required DDL statements must be performed by a process which does not use the XA protocol.
OCIStmtExecute in OCI_COMMIT_ON_
SUCCESS mode If errors occur that indicate problems with the XA code, more information on any Oracle errors can be found in the xa_*.trc files. These files will be placed in the log directory specified in the defined connection profile. If a log directory is not specified in the Session Manager connection profile, the xa_*.trc files will be placed in the $ORACLE_HOME/rdbms/log directory if $ORACLE_HOME is available, or in the current directory if $ORACLE_HOME is not available, when the process is started.The timeout interval described in the above situation can be controlled with the initialization parameter distributed_lock_timeout. This interval is in seconds. For example, to set the timeout interval for an instance to 30 seconds, include the following line in the associated parameter file:
The process limit for file descriptors (ulimit) on Solaris is set too low for multithreaded applications. Check the tnsnames.ora file for matching service names entry.Check that you have set your File Descriptor limit (ulimit), on Solaris, high enough to assure that you can open connections.Use COMMIT FORCE <local transaction id> or ROLLBACK FORCE <local transaction id>—where <local transaction id> comes from the dba_2pc_pending table—to force completion of a heuristic transaction. Refer to Oracle9i Distributed Database Systems documentation for more information.