Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Purging alert log files

Re: Purging alert log files

From: Andreas Piesk <a.piesk_at_gmx.net>
Date: Mon, 22 Jan 2007 17:46:00 +0100
Message-ID: <45B4EA48.5060606@gmx.net>


Kline.Michael schrieb:
> Also, I’m thinking there is a strong possibility that we could lose data
> on this. I’ve seen it sometimes take 5-15 seconds just to tail the alert
> log.
>
>
>
> Currently:
>
> cp $LOG_NAME $LOG_NAME.prev
>
> /usr/bin/gzip -c $LOG_NAME.prev >
> $ORA_LOG/$ORACLE_SID"_"$LOG_NAME"_"`date +%H:%M_%d-%h-%Y`.gz
>
> cat /dev/null > $LOG_NAME
>
>
>
> Maybe should:
>
> cp $LOG_NAME $LOG_NAME.prev
>
> cat /dev/null > $LOG_NAME
>
> /usr/bin/gzip -c $LOG_NAME.prev >
> $ORA_LOG/$ORACLE_SID"_"$LOG_NAME"_"`date +%H:%M_%d-%h-%Y`.gz

why do you copy the alert.log? i just rename it. rename is atomic, so no data loss possible. oracle will create a new alert.log if there's no such file.

regards,
-ap

-- 
Andreas Piesk  a.piesk_at_gmx.net

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jan 22 2007 - 10:46:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US