In this Document
Purpose |
Troubleshooting Steps |
Applies to:
Oracle Database Products > Oracle Database > Net ServicesInformation in this document applies to any platform.
checked for currency on 30-jul-2013
Purpose
This document provides techniques that can be used to identify and enable network tracing of the various listeners in an 11.2 RAC environment. An 11.2 RAC environment will have three scan listeners and also database listeners on each individual cluster node.
Troubleshooting Steps
Database Listener
To trace the listener that is servicing the database on any cluster node first locate the grid home on that node. The grid home will contain the dynamically created listener.ora used by the cluster. The location of listener.ora can be easily determined using the lsnrctl utility if the listener is running on the node. The command "lsnrctl status" will reveal the parameter file and log locations used by the listener.
Listener Parameter File /u01/app/11.2.0.2/grid/network/admin/listener.ora
In this example the listener.ora is located in /u01/app/11.2.0.2/grid/network/admin.
Listener trace parameters can be appended to this listener.ora using "listener" as thelistener_name value.
Listener tracing of the database listener can also be performed dynamically using lsnrctl.
Scan Listener
Scan listener processes are created dynamically by the grid agent and can originate from any node in the cluster. Scan listeners running on an individual node can be identified using srvctl.
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node net-rac1
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node net-rac1
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node net-rac2
Scan listener tracing is performed by appending trace parameters to the grid home listener.ora as was explained for the database listener. It can be advantageous however to directly manipulate a scan listener using lsnrctl. Use the following steps to further utilize lsnrctl specific features with any of the RAC envrionment listeners.
Isolate the IPC listener addresses in the grid home listener.ora and place them into a tnsnames.ora file. The IPC protocol entries are ideal for use in tnsnames.ora and can be used without editing.
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))
LISTENER_SCAN3=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3))))
LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2))))
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))
Paste the above extracted values directly into an existing or newly created tnsnames.ora file and set $TNS_ADMIN to point to that location. lsnrctl can then be used to work with any of the individual listeners that are now defined in the tnsnames.ora; LISTENER, LISTENER_SCAN1, LISTENER_SCAN2, LISTENER_SCAN3.
[oracle]$ export TNS_ADMIN=/u01/app/11.2.0.2/grid/network/admin
LSNRCTL> set current_listener LISTENER_SCAN1
Current Listener is LISTENER_SCAN1
LSNRCTL> set trc_level 16
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
LISTENER_SCAN1 parameter "trc_level" set to support
The command completed successfully
[oracle]$ lsnrctl status LISTENER_SCAN1 | grep Trace
Trace Level support
Listener Trace File /u01/app/11.2.0.2/grid/log/diag/tnslsnr/net-rac1/listener_scan1/trace/ora_1622_46912546730672.trc
转载请注明作者出处及原文链接,否则将追究法律责任:
作者:xiangsir
原文链接:http://blog.csdn.net/xiangsir/article/details/17285081
QQ:444367417
MSN:xiangsir@hotmail.com