首页 > 数据库 > Oracle > 开启基于java的oracle工具的tracing
10.2:
All Java-based tools and utilities that are available in Oracle RAC are invoked by executing scripts of the same name as the tool or utility. This includes the Cluster Verification Utility (CVU), Database Configuration Assistant (DBCA), the Net Configuration Assistant (NETCA), the Virtual Internet Protocol Configuration Assistant (VIPCA), Server Control (SRVCTL), and the Global Services Daemon (GSD). For example to run DBCA, enter the command dbca.
By default, Oracle enables traces for DBCA and the Database Upgrade Assistant (DBUA). For the CVU, GSDCTL, SRVCTL, and VIPCA, you can set the SRVM_TRACE environment variable to TRUE to make Oracle generate traces. Oracle writes traces to log files. For example, Oracle writes traces to log files in Oracle home/cfgtoollogs/dbca and Oracle home/cfgtoollogs/dbua for DBCA and the Database Upgrade Assistant (DBUA) respectively.
10.1
Enabling Tracing for Java-Based Tools and Utilities in Real Application Clusters All of the Java-based tools and utilities available in RAC are invoked by executing scripts of the same name as the tool or utility. This includes the Database Configuration Assistant (DBCA), the Net Configuration Assistant (NetCA), the Virtual Internet Protocol Configuration Assistant (VIPCA), Service Control (SRVCTL), and the Global Services Daemon (GSD). For example to run the DBCA, enter the command dbca.
To enable additional debugging information, edit the command file (such as dbca in this example) and add the following parameters to the $JRE_DIR/bin/jre command line:
-DTRACING.ENABLED=true -DTRACING.LEVEL=2
For example, the file $ORACLE_HOME/bin/dbca contains the line:
$JRE_DIR/bin/jre -DORACLE_HOME=$OH -DJDBC_PROTOCOL=thin -mx64 -classpath $CLASSPATH oracle.sysman.dbca.Dbca $ARGUMENTS
Change this line to:
$JRE_DIR/bin/jre -DORACLE_HOME=$OH -DTRACING.ENABLED=true -DTRACING.LEVEL=2 -DJDBC_PROTOCOL=thin -mx64 -classpath $CLASSPATH oracle.sysman.dbca.Dbca $ARGUMENTS
When you run the DBCA, trace information will record in the DBCA log file.
To debug SRVCTL, add the argument -D to the command line. For example, to generate tracing information for an add database operation, execute the following command:
$ srvctl -D add database -d mydatabase
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/87149/viewspace-1016057/ ,如需转载,请注明出处,否则将追究法律责任。