Re: [SOLVED] missing alert.log mystery (it's not what you think)
From: Rich Jesse <rjoralist2_at_society.servebeer.com>
Date: Tue, 17 May 2011 09:36:18 -0500 (CDT)
Message-ID: <11e31831c42b23a8c2b28dcfb58aad97.squirrel_at_society.servebeer.com>
Niall writes:
Date: Tue, 17 May 2011 09:36:18 -0500 (CDT)
Message-ID: <11e31831c42b23a8c2b28dcfb58aad97.squirrel_at_society.servebeer.com>
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-lReceived on Tue May 17 2011 - 09:36:18 CDT