开启基于java的oracle工具的tracing

本文介绍如何为Oracle Real Application Clusters (RAC) 中的Java基工具启用跟踪功能,包括Cluster Verification Utility (CVU)、Database Configuration Assistant (DBCA)等。通过设置环境变量SRVM_TRACE为TRUE或在命令行参数中加入-DTRACING.ENABLED=true和-DTRACING.LEVEL=2,可以生成详细的调试信息。

10.2:

Enabling Tracing for Java-Based Tools and Utilities in Oracle Real Application Clusters

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.

[@more@]

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博客 ” ,链接:http://blog.itpub.net/87149/viewspace-1016057/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/87149/viewspace-1016057/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值