How to enable Listener Dynamic Tracing?Here is the answer
Sart the Listener Utility
$lsnrctl
LSNRCTL> show
The following operations are available after show
An asterisk (*) denotes a modifier or extended command:
rawmode displaymode
rules trc_file
trc_directory trc_level
log_file log_directory
log_status current_listener
inbound_connect_timeout startup_waittime
snmp_visible save_config_on_stop
dynamic_registration enable_global_dynamic_endpoint
oracle_home pid
connection_rate_limit
LSNRCTL> set trc_directory /oradata (/oradata is created for test, you can set your own directory)
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
TNS-01251: Cannot set trace/log directory under ADR
Note:- set the below parameter in listener.ora (default is on)
DIAG_ADR_ENABLED_<listener_name> = OFF
Reload the listener,
LSNRCTL> reload
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
The command completed successfully
LSNRCTL> set trc_directory /oradata
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
TNS-01178: Trace Level is 0. Trace file/directory unchanged
Follow the below sequence to supress TNS-01178 (as the error is itself descriptive)
LSNRCTL> set trc_level 8
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
LISTENER parameter "trc_level" set to admin
The command completed successfully
LSNRCTL> set trc_file lisn.trc
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
LISTENER parameter "trc_file" set to lisn.trc
The command completed successfully
LSNRCTL> set trc_directory /oradata
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
LISTENER parameter "trc_directory" set to /oradata
The command completed successfully
LSNRCTL> exit
Verify the trace file is created in the desired directory or not.
$ cd /oradata
[oracle@localhost-pub oradata]$ ls -ltr
-rw-r-----. 1 oracle oinstall 41662 May 28 09:49 lisn.trc
[oracle@localhost-pub oradata]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 28-MAY-2013 09:53:09
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 27-MAY-2013 23:34:54
Uptime 0 days 10 hr. 18 min. 15 sec
Trace Level admin
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0/dbhome_1/network/log/listener.log
Listener Trace File /oradata/lisn.trcListening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost-pub)(PORT=1521)))
Services Summary...
Service "pr" has 2 instance(s).
Switch of the dynamic listener tracing.
LSNRCTL> set trc_level off
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
LISTENER parameter "trc_level" set to off
The command completed successfully
LSNRCTL>
Sart the Listener Utility
$lsnrctl
LSNRCTL> show
The following operations are available after show
An asterisk (*) denotes a modifier or extended command:
rawmode displaymode
rules trc_file
trc_directory trc_level
log_file log_directory
log_status current_listener
inbound_connect_timeout startup_waittime
snmp_visible save_config_on_stop
dynamic_registration enable_global_dynamic_endpoint
oracle_home pid
connection_rate_limit
LSNRCTL> set trc_directory /oradata (/oradata is created for test, you can set your own directory)
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
TNS-01251: Cannot set trace/log directory under ADR
Note:- set the below parameter in listener.ora (default is on)
DIAG_ADR_ENABLED_<listener_name> = OFF
Reload the listener,
LSNRCTL> reload
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
The command completed successfully
LSNRCTL> set trc_directory /oradata
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
TNS-01178: Trace Level is 0. Trace file/directory unchanged
Follow the below sequence to supress TNS-01178 (as the error is itself descriptive)
LSNRCTL> set trc_level 8
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
LISTENER parameter "trc_level" set to admin
The command completed successfully
LSNRCTL> set trc_file lisn.trc
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
LISTENER parameter "trc_file" set to lisn.trc
The command completed successfully
LSNRCTL> set trc_directory /oradata
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
LISTENER parameter "trc_directory" set to /oradata
The command completed successfully
LSNRCTL> exit
Verify the trace file is created in the desired directory or not.
$ cd /oradata
[oracle@localhost-pub oradata]$ ls -ltr
-rw-r-----. 1 oracle oinstall 41662 May 28 09:49 lisn.trc
[oracle@localhost-pub oradata]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 28-MAY-2013 09:53:09
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 27-MAY-2013 23:34:54
Uptime 0 days 10 hr. 18 min. 15 sec
Trace Level admin
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0/dbhome_1/network/log/listener.log
Listener Trace File /oradata/lisn.trcListening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost-pub)(PORT=1521)))
Services Summary...
Service "pr" has 2 instance(s).
Switch of the dynamic listener tracing.
LSNRCTL> set trc_level off
Connecting to (DESCRIPTION=(ADDRESS=(HOST=localhost-pub)(PROTOCOL=TCP)(PORT=1521)))
LISTENER parameter "trc_level" set to off
The command completed successfully
LSNRCTL>
TEST!TEST!TEST
No comments:
Post a Comment