Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Truncated Listener Log/backing up?
Yes, set log_file command to work, it requires
ADMIN_RESTRICTIONS_LISTENER=OFF in the listener.ora file. (I believe
that is the default, but if it is ON you can't rename).
Example:
lsnrctl set log_file ${ORACLE_HOME}/network/log/listener_${DATE}.log
find ${ORACLE_HOME}/network/log -name "listener*.log" -mtime
+${NUMBER_KEEPDAYS} -exec ls -ltr {} \;
find ${ORACLE_HOME}/network/log -name "listener*.log" -mtime
+${NUMBER_KEEPDAYS} -exec rm {} \;
####################### Cleanup old log files ###########################################
find ${LOGGEDDIR} -name "cleanup_listener*.log" -mtime
+${NUMBER_KEEPDAYS} -exec ls -ltr {} \;
find ${LOGGEDDIR} -name "cleanup_listener*.log" -mtime
+${NUMBER_KEEPDAYS} -exec rm {} \;
Joel Patterson
Database Administrator
joel.patterson_at_crowley.com
x72546
904 727-2546
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Niall Litchfield
Sent: Thursday, January 11, 2007 10:39 AM
To: cemail_219_at_hotmail.com
Cc: oracle-l_at_freelists.org
Subject: Re: Truncated Listener Log/backing up?
You'll need to change the current log from within lsnrctl using set log_file <newname>, you can then maintain the old one as you feel like.
On 1/11/07, J. Dex <cemail_219_at_hotmail.com> wrote:
Our listener log has grown too large and I want to back it up. It is my
understanding that it can't be truncated because it is an open file.
What
are other people doing to resolve this issue? This is on a W2K server
where the listener is password protected and security patches have been
applied. I want to add whatever type of process can be used into a
script.
-- http://www.freelists.org/webpage/oracle-l -- Niall Litchfield Oracle DBA http://www.orawin.info -- http://www.freelists.org/webpage/oracle-lReceived on Fri Jan 12 2007 - 07:48:03 CST
![]() |
![]() |