Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
4.96 Mб

Troubleshooting XA Applications

0x1 Trace the entry and exit to each procedure in the XA interface. This can be useful in seeing exactly what XA calls the TP Monitor is making and what transaction identifier it is generating.

0x2 Trace the entry to and exit from other non-public XA library routines. This is generally of use only to Oracle Database developers.

0x4 Trace various other "interesting" calls made by the XA library, such as specific calls to the Oracle Call Interface. This is generally of use only to Oracle Database developers.

Trace File Locations

The trace file can be placed in one of the following locations:

The trace file can be created in the LogDir directory as specified in the open string.

If you do not specify LogDir in the open string, then the Oracle XA application attempts to create the trace file in the following directory (provided$ORACLE_ HOME can be located):

$ORACLE_HOME/rdbms/trace, if the operating system is Windows

$ORACLE_HOME/rdbms/log, otherwise

If the Oracle XA application cannot determine where $ORACLE_HOME is located, then the trace file is created in the current working directory.

Trace File Examples

Examples of two types of trace files are discussed here:

The example, xa_NULL04021992.trc, shows a trace file that was created on April 2, 1992. Its DB field was not specified in the open string when the resource manager was opened.

The example, xa_Finance12151991.trc, shows a trace file was created on December 15, 1991. Its DB field was specified as "Finance" in the open string when the resource manager was opened.

Note: Multiple Oracle XA library resource managers with the same DB field and LogDir field in their open strings log all trace information that occurs on the same day to the same trace file.

Using Oracle XA with Transaction Monitors 16-25

Troubleshooting XA Applications

Each entry in the trace file contains information that looks like this:

1032.12345.2: ORA-01017: invalid username/password; logon denied 1032.12345.2: xaolgn: XAER_INVAL; logon denied

Where 1032 is the time when the information is logged, 12345 is the process ID (PID), 2 is the resource manager ID, xaolgn is the module name, XAER_INVAL was the error returned as specified in the XA standard, and ORA-1017 is the Oracle Database information that was returned.

In-Doubt or Pending Transactions

In-doubt or pending transactions are transactions that have been prepared, but not yet committed to the database.

Generally, the transaction manager provided by the TPM system should resolve any failure and recovery of in-doubt or pending transactions. However, the DBA may have to override an in-doubt transaction in certain circumstances, such as when the in-doubt transaction is:

Locking data that is required by other transactions

Not resolved in a reasonable amount of time

For more information about overriding in-doubt transactions in such circumstances, and about how to decide whether the in-doubt transaction should be committed or rolled back, see the TPM documentation.

Oracle Database SYS Account Tables

There are four tables under the Oracle Database SYS account that contain transactions generated by regular Oracle Database applications and Oracle XA applications. They are DBA_PENDING_TRANSACTIONS, V$GLOBAL_ TRANSACTIONS, DBA_2PC_PENDING and DBA_2PC_NEIGHBORS

For transactions generated by Oracle XA applications, the following column information applies specifically to the DBA_2PC_NEIGHBORS table.

The DBID column is always xa_orcl

The DBUSER_OWNER column is always db_namexa.oracle.com

Remember that the db_name is always specified as DB=db_name in the open string. If you do not specify this field in the open string, then the value of this column is NULLxa.oracle.com for transactions generated by Oracle XA applications.

16-26 Oracle Database Application Developer's Guide - Fundamentals

Тут вы можете оставить комментарий к выбранному абзацу или сообщить об ошибке.

Оставленные комментарии видны всем.

Соседние файлы в папке Oracle 10g