Article ID: 246006 - View products that this article applies to.
This article was previously published under Q246006
Under some circumstances your Oracle database may produce .trc files when used with Microsoft Transaction Server. This document describes what TRC files are, why TRC files produce, and what you can do to eliminate TRC files.
What are TRC files?TRC files are produced by your Oracle database. The online Oracle documentation describes the Oracle trace facility as follows:
The trace facility allows a network or database administrator to obtain more information on the internal operations of the components of an Oracle application network than is provided in a log file. Tracing an operation produces a detailed sequence of statements that describe the events as they are executed. All trace output is directed to trace output files that can be evaluated to identify the events that led to an error.
Who produces TRC files?Your Oracle database software produces .trc files. TRC files are designed to provide more information about errors that are detected and reported by Oracle database software. Several Oracle components are capable of producing TRC file. For the remainder the document focuses on the TRC files produced by Oracle's XA facility.
Does Microsoft software ever produce TRC files?No, Microsoft software never produces .trc files.
Is there documentation describing Oracle TRC files?The Oracle XA trace facility is described in the online "Oracle8 Documentation Library" that accompanies the Oracle8 product. To locate this documentation, do the following:
What information do TRC files contain?A typical Oracle XA TRC file contains information like shown in the following
ORACLE XA: Version 184.108.40.206.0. RM name = 'Oracle_XA'.
xaolgn: XAER_RMERR; upiahs failed. ORA-12154.
ORA-12154: TNS: The name of the Service was not resolved
Why are TRC files being produced?A TRC file is produced when MS DTC attempts to perform an XA operation with your Oracle database and the Oracle XA operation reports an error. The TRC files are the means by which Oracle reports additional error information. Some XA errors result from normal XA database operations such as trying to commit or rollback a transaction. Other XA errors may result when MS DTC attempts to perform XA recovery with your Oracle database.
Understanding how XA Recovery works may help you better understand how XA recovery may result in TRC files.
Whenever MTS opens an Oracle database connection under XA transaction control, MS DTC writes a log record to the Dtcxatm.log file. These log records are used to keep track of each active Oracle database connection. The log record also contains the open string used to open the Oracle database connection. The MS DTC transaction manager uses this open string to reconnect to the Oracle database if XA recovery is necessary. Whenever MTS successfully closes an Oracle database connection, the corresponding log record along with its open string is deleted from the Dtcxatm.log file.
If an Oracle database, an MTS host application process, or the MS DTC transaction manager process fails while an Oracle database connection is open, MS DTC must perform database recovery. If the Oracle database fails while MS DTC remains active, MS DTC immediately attempts to reconnect to the Oracle database and perform recovery. If the MS DTC transaction manager process fails, MS DTC attempts to reconnect to the Oracle database and perform XA recovery as soon as MS DTC is restarted.
MS DTC performs recovery by reading the Dtcxatm.log file to determine Oracle database connections, if any, need recovery. It retrieves the open string for the Oracle database connection and opens the database. MS DTC then sends an XA_RECOVER request to the Oracle database. In response to the XA_RECOVER request, the Oracle database sends MS DTC a list of the transactions that were active or in-doubt at the time of the failure. MS DTC tells Oracle whether each active or in-doubt transaction committed or aborted. Recovery completes when the Oracle database has been told the outcome of all active or in-doubt transaction. When recovery completes, MS DTC deletes the log record for that Oracle connection from its Dtcxatm.log file.
If MS DTC cannot recover the Oracle database connection, either because MS DTC cannot open the Oracle database or because of some other recovery-related error, MS DTC delays for one minute and then retries recovery. MS DTC continues retrying recovery every minute until recovery is successful. MS DTC is persistent in retrying recovery because the Oracle database is required to hold record locks for all active or in-doubt transactions until recovery is complete.
The Oracle database may produce a .TRC file on each unsuccessful recovery attempt. If recovery fails repeatedly, many Oracle TRC files may be produced.
Why does the system sometimes stop producing TRC files after you delete the Dtcxatm.log file?If you delete the MS DTC Dtcxatm.log file, you are deleting all information concerning unrecovered Oracle database connection. This prevents MS DTC from attempting to perform Oracle database recovery. When MS DTC stops trying to recover your database you may no longer get TRC files. The problem with deleting the log file is that it may leave your Oracle database in an inconsistent unrecovered state.
If you are getting unwanted Oracle Trace files, do the following:
How can you control where TRC files are written?You can control the location of the TRC files if you have installed the Windows NT 4.0 Service Pack 4 or later. Do this as follows:
Article ID: 246006 - Last Review: June 11, 2002 - Revision: 1.1
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.