Chapter 9. Integrated troubleshooting 351
Start trace when using DataSource interface to get the connection
If the DataSource interface is used to connect to a data source, use one of the
following methods to start the trace:
Method 1: Invoke the
DB2BaseDataSource.setTraceLevel method to set the
type of tracing that you need. The default trace level is TRACE_ALL. Then
invoke the
DB2BaseDataSource.setJccLogWriter method to specify the trace
destination and turn the trace on.
Method 2: Invoke the
javax.sql.DataSource.setLogWriter method to turn the
trace on. With this method, TRACE_ALL is the only available trace level.
After a connection is established, you can turn the trace off or back on, change
the trace destination, or change the trace ...