How to Enable Oracle SQLNET Tracing from Net Manager

 [ID 395525.1]

修改时间 30-SEP-2011     类型 HOWTO     状态 PUBLISHED 

In this Document
  Goal
  Solution
     Launch the Net Manager utility
     Enabling Oracle Net Client / Server tracing (or both).
      Enabling Oracle SQLNet Listener tracing.
     Cyclic Tracing 
     Tracing Kerberos
     Tracing Externel Procedures (Extproc)
     Tnsping Trace
     Enabling Dynamic Listener Tracing 
     Only for 11g 
  References


Applies to:

Oracle Net Services - Version: 9.2.0.1.0 to 10.2.0.5 - Release: 9.2 to 10.2
Information in this document applies to any platform.
Checked for relevance on 30-SEP-2011

Goal

This document covers how to use Oracle Net Manager tool to enable Oracle SQLNet Client, Server, Listener, Kerberos and External Procedure tracing.  It also includes how to control the size and amount of trace files produced and steps to start dynamic listener tracing.

Solution

Launch the Net Manager utility

 

Windows : Go to Start button, select the Oracle Home on which we are going to generate the tracing for. Net Manager is located under 'Configuration and Migration Tools' of the Oracle Home menu.

article?cmd=show&type=ATT&id=395525.1:WINDWOSL

Unix : The tool can also be started remotely from a Microsoft Windows system with the help a terminal emulation software. You need to ensure this software is up and running first.  Ensure that the $DISPLAY, $ORACLE_HOME, and $PATH environment variables are properly set. The Net Manager tool is started by the command "netmgr".

[oracle@testnet ~]$ export DISPLAY=152.69.172.167:0.0 
[oracle@testnet ~]$ . ora10gr2.env 
The environment settings are performed for 10gr2 home 
[oracle@testnet bin]$ pwd 
/u01/ora10gr2/bin 
[oracle@testnet ~]$ netmgr 

 

article?cmd=show&type=ATT&id=395525.1:linuxl

After launching the Net Manager, the location of the network configuration files shown in the top of the Net Manager window.  Ensure this is the expected location. If it is not, you have TNS_ADMIN environment variable set, which is pointing the session towards a different location.

article?cmd=show&type=ATT&id=395525.1:LAUNCH

 

Enabling Oracle Net Client / Server tracing (or both).

 

A. Click on Profiles in the left panel. The right panel of Net Manager will now show more details.

B. Select General from drop down menu on the right panel of the Net Manager.

C. Select Tracing tab in the right panel. Client Information and Server Information is now seen.

D. Select the required Trace Level. Oracle Support usually requests level SUPPORT (also known as level 16). It is optional to provide a value for the Trace Directory and Trace File. If you do,  ensure that the directory exists and that the owner of the Oracle software is able to write to that directory. The default location for the trace files is the $ORACLE_HOME/network/trace directory. Default name is CLI.TRC

The Unique Trace File Name option for the Client Information section, will make unique trace files for every connection. Without this option selected, all client tracing goes into the one file.  If running Microsoft Windows, always set this parameter or there is the potential that the trace file with the error will be overwritten.  The Server does not have this parameter available.

E. If tracing is to be done on the Server and the connection model is Shared Server, then the Instance will have to be restarted for the Dispatchers to pick up the changes to the SQLNET.ORA file.

article?cmd=show&type=ATT&id=395525.1:tracing2

The SQLNET.ORA will now look like the following :

TRACE_LEVEL_CLIENT = SUPPORT 
TRACE_UNIQUE_CLIENT = on 
TRACE_LEVEL_SERVER = SUPPORT 
TRACE_DIRECTORY_CLIENT = C:\TEMP 
TRACE_FILE_CLIENT = CLIENT 
TRACE_DIRECTORY_SERVER = C:\TEMP 
TRACE_FILE_SERVER = SERVER 
TRACE_TIMESTAMP_ CLIENT = ON 
Note:If tracing is to be done on the Server and the connection model is Shared Server(MTS), then the Instance will have to be restarted for the Dispatchers to pick up the changes to the SQLNET.ORA file. 

 Enabling Oracle SQLNet Listener tracing.

A. In the left panel of the Net Manager, select Listeners view.

B. Select the Listener you want to trace. Once selected the right hand panel will show more details.

C. Select General Parameters from the drop down button, in the right hand panel.

D. Select Logging & Tracing tab.

E. Click the Tracing Enabled radio button and select Trace Level. SUPPORT level is normally requested by Oracle Support.

Select a directory for the trace to be generated.

G. Listener will need to be restarted or reloaded to enable or disable tracing.
 

Note: Stopping a Listener does not effect existing connections.

 

article?cmd=show&type=ATT&id=395525.1:listener

The LISTENER.ORA will now have the following lines.

TRACE_FILE_LISTENER = LISTENER.TRC 
TRACE_DIRECTORY_LISTENER = C:\TEMP 
TRACE_LEVEL_LISTENER = SUPPORT

Cyclic Tracing

Adding parameters TRACE_FILENO_ and TRACE_FILELEN_ to the SQLNET.ORA or LISTENER.ORA files enables Oracle Net trace files to be limited a certain size and a certain number of files. Following example is for Listener traces of 10 MB, with a maximum of 10 files for a maximum of 100 Mb of trace files. Cyclic tracing can be configured for the Client, Server and Listener

TRACE_FILELEN_LISTENER=10240 
TRACE_FILENO_LISTENER=10

TRACE_FILENO_{CLIENT/SERVER/listener_name}: When this parameter is set it will determine the maximum number of trace files that will be generated. Trace data will continue to generate but in a cyclic fashion. The maximum size of each file is set by configuring the appropriate TRACE_FILELEN parameter.

TRACE_FILELEN_{CLIENT/SERVER/listener_name}: When set determines the maximum size of each trace file before either starting a new trace file (if the TRACE_FILENO parameter is set) or will overwrites an existing file (cyclic tracing). Once the last trace file has been written, up to the size specified by TRACE_FILELEN_, tracing will continue by overwriting the first trace file in the cycle.

Tracing Kerberos

Kerberos can be traced using the following parameters in the SQLNET.ORA file
See Note 185897.1 Kerberos Troubleshooting Guide for more details.

TRACE_LEVEL_OKINIT=SUPPORT
TRACE_DIRECTORY_OKINIT=
TRACE_FILE_OKINIT=

 

Tracing Externel Procedures (Extproc)

External procedure can be traced using the following parameter in the SQLNET.ORA file, where extproc is setup.

TRACE_LEVEL_AGENT= SUPPORT 
TRACE_DIRECTORY_AGENT =  
TRACE_TIMESTAMP_AGENT =ON

 

Tnsping Trace

TNSPING.TRACE_LEVEL = SUPPORT 
TNSPING.TRACE_DIRECTORY =  

 

Enabling Dynamic Listener Tracing

There might be situations when you cannot reload or restart the listener to enable the traces.Such times, you can fmake use of the dynamic tracing for the listener .

LSNRCTL> set current_listener listener 
Current Listener is listener 
LSNRCTL> set trc_level 16 
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) 
LISTENER parameter "trc_level" set to support 
The command completed successfully 
LSNRCTL> set trc_directory /home/oracle 
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) 
LISTENER parameter "trc_directory" set to /home/oracle 
The command completed successfully 
LSNRCTL> exit

This would create sqlnet support level tracing on the listener under directory /home/oracle with name listener.trc

Only for 11g 

11g has new method of tracing Automatic Diagnostic Repository(ADR)  which will create the trace to the ADR directories 
Reference
Note 454927.1Using and Disabling the Automatic Diagnostic Repository (ADR) with Oracle Net for 11g

To create the trace files to the desired directory,
For client tracing & server tracing add:
DIAG_ADR_ENABLED= OFF


For listener tracing:
DIAG_ADR_ENABLED_ = OFF


Unable to start Net Manager 

If Net Manager is unable to start, check that you are able to launch other GUI tools from the same server, where Net Manager is failing. For example the X-Window utility "xclock". If you are not able to launch xclock, you need to address this problem, before attempting to start Oracle GUI tools. If xclock works, check other Oracle GUI tools, like DBCA before reporting the issue to Oracle Support.

References

NOTE:374116.1 - How to Match Oracle Net Client and Server Trace Files
NOTE:454927.1 - Using and Disabling the Automatic Diagnostic Repository (ADR) with Oracle Net for 11g

显示附件 附件


file_default.gif?MOS_5.4.0.0.0_GENERIC_110926 launch1 (49.92 KB)
file_jpg.gif?MOS_5.4.0.0.0_GENERIC_110926 linuxl.jpg (36.77 KB)
file_default.gif?MOS_5.4.0.0.0_GENERIC_110926 tracing (54.53 KB)
file_default.gif?MOS_5.4.0.0.0_GENERIC_110926 tracing2 (55.7 KB)
file_default.gif?MOS_5.4.0.0.0_GENERIC_110926 tracing3 (56.34 KB)
file_jpg.gif?MOS_5.4.0.0.0_GENERIC_110926 windowsl.jpg (17.73 KB)

显示相关信息 相关内容


产品
  • Oracle Database Products > Oracle Database > Net Services > Oracle Net Services
关键字
EXTERNAL PROCEDURE; LISTENER.ORA; NET MANAGER; NETMGR; SQLNET.ORA; TNSNAMES.ORA; TRACE

返回页首返回页首

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

转载于:http://blog.itpub.net/38267/viewspace-709531/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值