Tuesday 13 November 2012

change the listener log file location


How could i change the listener log file location, ?
 
Note :  The listner should not RE-START.
 
orckna@tlg0004:~> lsnrctl status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 07-NOV-2012 14:37:42
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(address=(protocol=tcp)(host=tlg0004.mykft.net)(port=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                04-OCT-2012 22:47:36
Uptime                    33 days 16 hr. 50 min. 6 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /oracle/11.2.0.2/db_1/network/admin/listener.ora
Listener Log File         /oracle/diag/tnslsnr/tlg0004/listener/alert/log.xml
 
 
i have to change this to default location
 
                                   /oracle/11.2.0.2/db_1/network/log/listener.log
solution:

To set destination directory where the listener log file is written.
By default, the log file is written to the 'ORACLE_HOME/network/log'
directory.

$ lsnrctl
LSNRCTL> show LOG_DIRECTORY


$ SET LOG_DIRECTORY directory

Example

LSNRCTL> SET LOG_DIRECTORY /u01/app/oracle

LSNRCTL> reload listener_name

In which reload means: Forces a read of the configuration file in
order for new settings to take effect without stopping and starting
the listener.

Now check the status which intenally shows the new location
LSNRCTL> status listener_name

(or)

Steps to change the path of listener logfile for 11g :

1. Add two parameters in listener.ora

DIAG_ADR_ENABLED_LISTENER=OFF

2. reload the listener:   $ lsnrctl reload <listener_name>

No comments: