Wednesday, September 16, 2015

How To Change the Listener Log Filename Without Stopping the Listener

At the LSNRCTL prompt:

$ lsnrctl

LSNRCTL> set current_listener LISTENER 


Current Listener is LISTENER
LSNRCTL> set log_file /u01/app/oracle/diag/tnslsnr/linux01/listener/trace/listener1.log
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux01)(PORT=1521)))
LISTENER parameter "log_file" set to /u01/app/oracle/diag/tnslsnr/linux01/listener/trace/listener1.log
The command completed successfully


LSNRCTL> save_config


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux01)(PORT=1521)))
Saved LISTENER configuration parameters.
Listener Parameter File   /u01/app/oracle/product/11.2/db_1/network/admin/listener.ora
Old Parameter File   /u01/app/oracle/product/11.2/db_1/network/admin/listener.bak
The command completed successfully


LSNRCTL> exit



Note : If you get this error "TNS-01251: Cannot set trace/log directory under ADR" refer to below link

click on this >> TNS-01251


No comments :

Post a Comment