Re: [SOLVED] missing alert.log mystery (it's not what you think)

  • From: "Rich Jesse" <rjoralist2@xxxxxxxxxxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 17 May 2011 09:36:18 -0500 (CDT)

Niall writes:

> In the case of the listener then lsnrctl can be used to rename the log file

In unixish, something like this:

# Temporarily change the listener log location
lsnrctl <<EOD1
set log_file listener_OLD
EOD1
# Archive the listener log by renaming
mv $ORACLE_HOME/network/log/listener.log
$ORACLE_HOME/network/log/listener.log_`date +\%y\%m\%d\%H\%M\%S`
# Reset the listener log location
lsnrctl <<EOD2
set log_file listener
EOD2
# Keep two weeks worth.
find $ORACLE_HOME/network/log/*.log_???????????? -mtime +14|xargs -i -t rm {}

A cleanup of the ever-growing "listener_OLD" file is in order as well. 
Perhaps a similar rename/purge...

YMMV.  Standard "not my fault" disclaimer applies.  :)

Rich

--
//www.freelists.org/webpage/oracle-l


Other related posts: