JDBC trace configuration
Trace strings for JDBC data sources
If the application displays JDBC-related exception messages, activate the JDBC trace service. The resulting log text can help you identify the problem.
See Enabling trace at server startup
This method activates JDBC trace for all applications that run in the server you specify.
Identify the database type by selecting the trace group WAS.database and typing one of the following trace strings in the console:
- com.ibm.ws.database.logwriter
- Tracestring for databases that use the GenericDataStoreHelper. Also used for unsupported databases.
- com.ibm.ws.db2.logwriter
- Trace string for DB2 databases.
- com.ibm.ws.oracle.logwriter
- Trace string for Oracle databases.
- com.ibm.ws.derby.logwriter
- Trace string for Derby databases.
- com.ibm.ws.informix.logwriter
- Trace string for Informix databases.
- com.ibm.ws.sqlserver.logwriter
- Trace string for Microsoft SQL Server databases.
- com.ibm.ws.sybase.logwriter
- Trace string for Sybase databases.
A few JDBC drivers require set trace differently, at the data source level. These drivers include:
Set trace for these drivers through the WAS.database group results in corrupt trace information. The appserver sets trace for the group at the server level, causing the trace service to begin only after the application establishes an initial connection. Because that first connection does not carry trace information, re-use of it is never tracked. Consequently the application cannot accurately match trace information to connection use.
Set trace for the previously mentioned JDBC drivers through data source custom properties.
For example, use the spyAttributes custom property to enable JDBC trace for the DataDirect Connect for JDBC driver.
Consult the driver documentation for details on the custom property that enables trace for the JDBC implementation.
Additional resources
If the JDBC tracing service cannot help you isolate and fix the problem, consult the IBM Support web site for WAS. Use the site search function to find current information on known problems and their resolutions. Locating the right troubleshooting tip can save time that we might otherwise spend on opening and tracking a PMR.
Related
Tracing and logging configuration
Data access problems