Oracle跟踪会话

1.客户端跟踪:
PERFORMING A CLIENT-SIDE SQL*NET TRACE

(1) Open the SQLNET.ORA file typically found in the following location:

ORACLE_BASE\ORACLE_HOME\Network\Admin (7.3.x, 8.1.x or later)
ORACLE_BASE\ORACLE_HOME\Net80\Admin (8.0.x)

(2) Add the following parameters at the end of the file:

#CLIENT-SIDE SQL*NET TRACE PARAMETERS
#====================================
TRACE_UNIQUE_CLIENT = ON
TRACE_LEVEL_CLIENT = 16
TRACE_DIRECTORY_CLIENT = C:\temp
TRACE_FILE_CLIENT = SQLNetTrace
TRACE_TIMESTAMP_CLIENT = ON
#TRACE_FILELEN_CLIENT = 2048
#TRACE_FILENO_CLIENT = 2

Parameters prefixed with a “#” are interpreted as comments and will not
affect tracing.

If you want to change the location where the trace file will be saved
modify the following two parameters:

(a) TRACE_DIRECTORY_CLIENT

Set this parameter to the folder where you want the trace file to be
saved.

WARNING: Do not end the path with a “\”. This is not necessary and may
prevent the trace file from being generated.

(b) TRACE_FILE_CLIENT

Set this parameter to the filename of the trace file that will be
created. The actual trace filename may contain additional information
appended to the end of the filename such as

SQLNetTrace_ _.trc

where is the application’s process id while it was running and
distinguishes different client connections established from the
same process id (or session) to the database. This occurs since the
parameter TRACE_UNIQUE_CLIENT is set to ON.

The parameter TRACE_LEVEL_CLIENT=16 ensures that maximum trace
information is logged.

NOTE: If you think the size of the trace file will exceed the free space
on the drive where TRACE_DIRECTORY_CLIENT is saving the file, then
uncomment the last two parameters which will have the following
affect:

(a) TRACE_FILELEN_CLIENT - will create trace files of the size
specified in kilobytes (KB)

(b) TRACE_FILENO_CLIENT - will write to multiple trace files up
to the maximum size specified by
TRACE_FILELEN_CLIENT and then cycle
through the files again overwriting
previously written trace information

The default values specified above for these two paramters will
cycle the trace output between two trace files with a maximum size
of 2MB each.

Once you have made the appropriate changes to the SQLNET.ORA file be
sure to SAVE the file.

NOTE: If the application you are tracing is running from inside a web
server environment, such as Microsoft’s Internet Information
Server (IIS), you will need to RESTART THE WEB SERVER at this
point in order for these changes to be seen by the web server.
This is due to the fact that web servers may cache the SQLNET.ORA
file.

(3) Immediately run the application that uses one of the programmatic
interfaces and generate the error.

(4) Immediately go back to the SQLNET.ORA file and turn tracing off by using
any of the following methods:

(a) Modify the following parameter:

TRACE_LEVEL_CLIENT = OFF

(b) Remove all the tracing parameters you added to this file or

(c) Comment all the tracing parameters out by placing the “#”
character before each one.

Save the changes to the SQLNET.ORA file.

(5) Retrieve the “.trc” file(s) from the location “C:\temp\SQLNetTrace\” or
wherever you have saved the file(s) based on what was specified in the
parameters TRACE_DIRECTORY_CLIENT and TRACE_FILE_CLIENT. If you did not
specify a location please check the location of the directory where the
application was run from or search your hard drive for all “.trc” files.
Check the size of the “.trc” file(s) and make sure they do not have a
size of 0 bytes but do have the current time and date. Zip the file up
and upload it to support.

2.服务器跟踪:
$lsnrctl
LSNRCTL> status
LSNRCTL> trace user 注意rac中节点LISTENER的名称是LISTENER_

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23135684/viewspace-665383/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23135684/viewspace-665383/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值