How to enable Oracle JDBC Driver tracing with WebSphere Application Server
This document describes how to enable Oracle JDBC driver trace when using a datasource in WebSphere Application Server
When debugging WAS + Oracle connection problems, it sometimes becomes necessary to enable Oracle JDBC driver tracing.
Resolving the problem
Set the following as a Generic JVM Argument on the application server (Servers > Server Types > WebSphere application servers > server_name. Then, in the Server Infrastructure section, click Java and process management > Process definition > Java virtual machine)
-Doracle.jdbc.Trace=true -Djava.util.logging.configureByLoggingPropertiesFile=true -Djava.util.logging.config.file=C:\WAS70\AppServer\profiles\AppSrvXML\logs\server1\OracleTrace\OracleTracing.properties
Replace the existing Oracle driver with the _g version of the driver (for example, ojdbc6_g.jar) in both the file system and in the Classpath field of the Oracle JDBC Provider configuration. The _g driver is a debug version of the driver and can be obtained from Oracle.
The Oracle document 30 Diagnosability in JDBC provides additional information on generating JDBC trace (see the section entitled Configuring Logging). The document refers to an OracleLog.properties file instead of OracleTracing.properties.
If you are using more than one Oracle JDBC Provider in your WebSphere Application Server environment (for example ojdbc7.jar and ojdbc7_g.jar), it is possible that the Oracle JDBC-Driver traces are still missing. In order to avoid this problem, please make sure that all Oracle JDBC Providers use the option "Isolate classloader".
More support for:
WebSphere Application Server
DB Connections/Connection Pooling
Software version: 7.0, 8.0, 8.5, 8.5.5
Operating system(s): AIX, HP-UX, Linux, Solaris, Windows
Reference #: 1598616
Modified date: 17 March 2017
Translate this page: