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

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

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


Other related posts: