Further TNS Listener Tracing [ID 751432.1]

In this Document
Goal
Solution
References


Applies to:

Oracle Net Services - Version: 9.2.0.1.0 to 11.2.0.1 - Release: 9.2 to 11.2
Information in this document applies to any platform.
Checked for relevance on 7-MAY-2010.

Goal

For use on versions < 11.2

When attempting to limit the amount of trace generated when TNS listener tracing is enabled, cyclic tracing can be used. But to further restrict the amount of time TNS listener is enabled, tracing can be enabled and disabled, dynamically via the listener control, lsnrctl. This means tracing can be enabled only when required and allows the listener to run without generating trace until required.But when enabled via this method, Time stamp is missing from the trace file(s) generated. The following steps explain how to workaround the time stamp restriction.


Solution

To workaround the current restriction of TNS listener tracing enabled via listener control, generating traces without time stamp, the following steps can be used. Steps 1 to 3 must be inplaced before attempting to capture any problem with tracing.

1. Backup the Listener.ora file, add the following parameters and save.

TRACE_LEVEL_ = 16
TRACE_FILE_ =
TRACE_DIRECTORY_ =
TRACE_TIMESTAMP_ = ON
TRACE_FILELEN_ =
TRACE_FILENO_ =

TRACE_FILELEN and TRACE_FILENO are the cyclic tracing parameters.Ensure values used for these are large enough to capture information,without being overwritten.

2.Reload the listener, with command lsnrctl reload

$lsnrctl reload

LSNRCTL for Solaris: Version 10.2.0.4.0 - Production on 21-NOV-2008 13:32:15
Copyright (c) 1991, 2004, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sample.com)(PORT=1521)))
The command completed successfully

With a default listener name of "listener", the listener name can be excluded from commands.

3. Stop listener tracing, run set trc_level 0 via lsnrctl

LSNRCTL> set trc_level 0
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sample.com)(PORT=1521)))
listener parameter "trc_level" set to off
The command completed successfully

If your listener name is not using the default name of "listener", then run command "set current_listener in listener control, before any other command is used.

4. When TNS listener tracing is required to be re-enabled. run set trc_level 16 via lsnrctl.

LSNRCTL> set trc_level 16
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sample.com)(PORT=1521)))
listener parameter "trc_level" set to support
The command completed successfully


5. Turn off tracing as soon as the problem / issue has been captured with command "set trc_level 0" from lsnrctl. (As per step 3). Remove or hash out the parameters added to the listener.ora in Step 1 and run reload command. This will stop tracing from being re-activated.

Please note for 11g TNS listener tracing, ADR tracing can be disabled by following Note 454927.1Using and Disabling the Automatic Diagnostic Repository (ADR) with Oracle Net for 11g.

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

转载于:http://blog.itpub.net/22308399/viewspace-750807/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值