DB6 and DB2/390: Java Database Connectivity (JDBC) trace
[DB2] [db2jcc] [DB2UDB] [JCC] [LUW] [OS390] [UDB] [universal] [z/OS]
Related:
- DB2-z/OS: Seamless JDBC Database Failover for SAP Java stackSymptom This SAP Note describes how to enable high availability...
- DB2-z/OS: DB2 Connect 9.1 JDBC Failover for SAP Java stackSymptom This SAP Note describes how to enable high availability...
- DB2-z/OS: Additions upgrade to SAP NW 7.1Symptom Additions to the upgrade procedure: to SAP NW 7.10,...
- DB2-z/OS: Inconsistent fields with DDIC type RAW/LRAW/VARCSymptom You are requested by a SAP tool or documentation...
- DB2-z/OS: PLAN_TABLE & DSN_STATEMNT_TABLE for v9.1Symptom The note describes a fix that allows to create...
- DB6: Installation of FixPaks for DB2 V9.5 (UNIX+Linux)Symptom This note relates to installing FixPaks for DB2 V9.5...
- DB6: Installing FixPaks for DB2 V9.1 (UNIX+Linux)Symptom This note relates to installing FixPaks for DB2 V9.1...
- DB6: Installing V8.2 FixPaks (as of FixPak 9) on UNIXSymptom To install FixPakslower than FixPak 9, see Note 940551...
Symptom
A problem occurs in the SAP J2EE Engine. SAP Support requests a JDBC trace to provide them with more information and, if necessary, for forwarding the problem to IBM Support.
Other terms
DB2, UDB, DB2UDB, LUW, JCC, universal, db2jcc, z/OS, OS390
Solution
Select one of the following procedures to activate the JDBC trace:
Using the global properties file to activate/deactivate the trace.Using the JDBC URL of the default database connection to activate the trace.
As of driver version 3.51+ (Version 9.5 fix pack 1), the JDBC trace can be activated dynamically. To use this option, you must activate the trace using the global properties file.
Using the global properties file to activate/deactivate the trace.
The global properties file must be entered once as the Java parameter of the J2EE Engine. If you then activate/deactivate the trace by changing the properties file, you must restart the J2EE Engine. Proceed as follows:
1. Use a Java parameter in the Config Tool to specify the global properties file.a) Call the Config Tool.b) In the navigation frame, choose
cluster_data -> instance_* -> server_*
and enter the parameter db2.jcc.propertiesFile under the tab pages “General” and “Bootstrap” . For example:
-Ddb2.jcc.propertiesFile=<path to jcc.properties file>
We recommend that you create a file called /usr/sap/FM7/SYS/global/db6/jcc.properties for the database type DB2 LUW.c) Create the specified file and add the following lines if you want to activate the trace when you start the application.
db2.jcc.override.traceDirectory=<directory>
db2.jcc.override.traceLevel=<tracelevel>
For example:
When you use db2.jcc.override.traceLevel=0, the trace is deactivated.
When you use db2.jcc.override.traceLevel=0, the trace is activated with restricted output.
For Java experts:
~com.ibm.db2.jcc.DB2BaseDataSource.TRACE_DRDA_FLOWS = -65
To activate the trace dynamically, the file must contain the following lines when the application is started.
db2.jcc.override.traceDirectory=< directory>
db2.jcc.override.traceLevel=< tracelevel>
db2.jcc.tracePollingEnabled=1
db2.jcc.tracePollingInterval=<seconds>
The parameter db2.jcc.tracePollingEnabled enables the trace to be activated dynamically. The parameter db2.jcc.tracePollingInterval specifies how often the JDBC driver configuration checks for changes in the properties file. Only the db2.jcc.override parameters can be changed dynamically.
2. Restart the J2EE Engine once to activate the Java parameters. If you have not activated the trace dynamically, you must restart the J2EE Engine each time you change the parameter in the global properties file.
The trace is activated for all database connections that are opened using the JCC driver.
To deactivate the trace, set traceLevel=0. If you activated the trace dynamically, you do not need to restart the J2EE Engine afterwards.
Activating the trace using the JDBC URL of the default database connection.
To activate/deactivate the trace, you must change the JDBC URL and restart the J2EE Engine. Proceed as follows:
1. Call the Config Tool.2. In order to be able to change the JDBC URL, choose “secure store” in the navigation frame.
The default JDBC URL is as follows:
jdbc:db2://<dbhost>:<port> /<DBNAME>:deferPrepares=false;3. In the Value field, add the trace options required by SAP support to the URL.
In most cases, the following options are useful:
jdbc:db2://< dbhost>:<port>/<DBNAME>:deferPrepares=false;traceDirectory=<dir>;traceLevel=-65;
The trace is thereby written into the < dir> directory. “traceLevel=-65″ restricts the trace output.
For Java experts:
~com.ibm.db2.jcc. DB2BaseDataSource.TRACE_DRDA_FLOWS = -654. To activate the new setting, choose “Add” and then “Save”.5. Restart the J2EE Engine and execute the critical action. You do not need to stop the database.6. Delete the trace options again from the JDBC URL and restart the J2EE Engine.