Debug Tracing

ODP.NET provides debug tracing support, which allows logging of all the ODP.NET activities into a trace file. Different levels of tracing are available.

The provider can record the following information:

  • Entry and exit information for the ODP.NET public methods

  • User-provided SQL statements as well as SQL statements modified by the provider

  • Connection pooling statistics such as enlistment and delistment

  • Thread ID (entry and exit)

  • HA Events and Load Balancing information

Registry Settings for Tracing Calls

The following registry settings should be configured under


where HOMENAME is the appropriate Oracle Home.


The valid values for TraceFileName are: any valid path name and file name.

TraceFileName specifies the file name that is to be used for logging trace information. If TraceOption is set to 1, the name is used as is. However, if TraceOption is 1, the Thread ID is appended to the file name provided.

See Also:



The valid values for TraceLevel are:

  • 0 = None

  • 1 = Entry, exit, and SQL statement information

  • 2 = Connection pooling statistics

  • 4 = Distributed transactions (enlistment and delistment)

  • 8 = User-mode dump creation upon unmanaged exception

  • 16 = HA Event Information

  • 32 = Load Balancing Information

TraceLevel specifies the level of tracing in ODP.NET. Because tracing all the entry and exit calls for all the objects can be excessive, TraceLevel is provided to limit tracing to certain areas of the provider.

To obtain tracing on multiple objects, simply add the valid values. For example, if TraceLevel is set to 3, trace information is logged for entry, exit, SQL, and connection pooling information.

The user-mode dump creation requires dbghelp.dll version 5.1.2600.0 or later.


The valid values for TraceOption are:

  • 0 = Single trace file

  • 1 = Multiple trace files

TraceOption specifies whether to log trace information in single or multiple files for different threads. If a single trace file is specified, the file name specified in TraceFileName is used. If the multiple trace files option is requested, a Thread ID is appended to the file name provided to create a trace file for each thread.