The listener.log file grows and its not possible to just move the file whilst the listener is up. The tnslsnr process always hold this log file. This can be confirmed using the command fuser.
Test $> cd /oracle/product/10.2.0/network/log
Test $> ls -lrt
total 1522
-rw-r—– 1 oracle dba 763075 Mar 7 22:40 listener_old.log
-rw-r—– 1 oracle dba 259 Mar 7 23:08 listener.log
Test $> fuser listener.log
listener.log: 13389o
Test $> ps -ef |grep 13389
oracle 19417 18886 0 23:15:30 pts/1 0:00 grep 13389
oracle 13389 1 0 Nov 19 ? 2:03 /oracle/product/10.2.0/bin/tnslsnr LISTENER -inherit
Test $> lsnrctl
LSNRCTL for Solaris: Version 10.2.0.4.0 – Production on 07-MAR-2011 22:46:03
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Welcome to LSNRCTL, type “help” for information.
LSNRCTL> set Log_status off
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
LISTENER parameter “log_status” set to OFF
The command completed successfully
LSNRCTL> exit
Test $> mv listener.log listener_old.log
Test $> ls -lrt
total 1520
-rw-r—– 1 oracle dba 763075 Mar 7 22:40 listener_old.log
Test $> touch listener.log
Test $>
Test $> ls -lrt
total 1520
-rw-r—– 1 oracle dba 763075 Mar 7 22:40 listener_old.log
-rw-r–r– 1 oracle dba 0 Mar 7 22:47 listener.log
Test $> lsnrctl
LSNRCTL for Solaris: Version 10.2.0.4.0 – Production on 07-MAR-2011 22:47:13
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Welcome to LSNRCTL, type “help” for information.
LSNRCTL> set Log_Status on
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
LISTENER parameter “log_status” set to ON
The command completed successfully
LSNRCTL> exit
2.The below will empty your listener.log file. ” > ” is part of the command. It just redirect null into the file
Test $> > listener.log
3.set LOGGING_LISTENER=OFF in the listener.ora file to stop the listener logging.
Expert are always welcome for their valuable comment or suggestion for the above post.
nice
that is good information to maintenance
Thank
Great post!
Very useful
Thanks
Great information.
Thanks Samadhan.