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: Archive log dest full

RE: Archive log dest full

From: Henry Poras <Henry.Poras_at_ctp.com>
Date: Tue, 08 Jan 2002 13:34:37 -0800
Message-ID: <F001.003EA514.20020108132107@fatcity.com>

I've used: (sorry, but I can never remember which lists let through text documents and which lists don't. I can always resend as such)

#!/usr/bin/ksh
########################################################################
##NAME: maint_arch.sh
##CREATED ON: 10/17/2001
##CREATED BY: Henry Poras
##DESCRIPTION: Script to deal with space issues when
## the directory containing Oracle archive logs
## fills up. The logs can be compressed or moved
## to a new location.
##SETUP: Set the following parameters:
## VOL_I Volume containing the archive logs as seen
## through df -k
## DIR_I Current directory holding the logs
## DIR_F Final location of the logs (if they are
## to be moved)
## THRESH Threshold of %space used in VOL_I before
## CMD is run
## CMD Command to be run. Standard input consists
## of the full path of the archive log files
## LOG_PREFIX
## LOG_SUFFIX
## Can be run from cron or manually
##MODIFICATIONS:
##
#######################################################################

        
VOL_I=/vol00            # volume of concern as appearing in df -k
                                # A grep of this name should only return
                                # a single line.
DIR_I=/vol00/orabu/test # The initial directory of the archive logs. DIR_F=/vol05/orabu/test # The final location of the archive logs.
THRESH=3                        # Threshold of %space used to trigger the 
                                # actions.

#CMD="mv {} $DIR_F/{}" # Command to move the files
#CMD="compress {}" # Command to compress the files
CMD=" -t echo {}"
LOG_PREFIX=arch.log1_ # Log name leading the numbers (standard is
                                # arch)
LOG_SUFFIX=.dbf         # Log name following the numbers (standard is
                                # .arc) 


##
##
## Test that there is only a single volume containing VOL_I. If not,
## THRESH cannot be used.
##
##
if                              #check for single volume
        
        test `df -kl|grep $VOL_I|wc -l` -ne 1
then
        echo 'Error in initial volume'
else
        if                      #test %used greater than threshold
        test `df -kl|grep $VOL_I|awk '{print $5}'|sed 's/%//'` -gt $THRESH
        then
        ls $DIR_I/arch*|
                                #use grep -v to exclude the maximum archive
                                #log from the list (ls). This is in case
                                #it is still active. (fuser could also
                                #be used (thanks Jared).
        grep -v `ls $DIR_I/arch*|
                 sed 's/$LOG_PREFIX//
                      s/$LOG_SUFFIX//'|
                 nawk '
                      BEGIN     {MAX_ARCH_NO==0}
                                {if ($1>MAX_ARCH_NO) {MAX_ARCH_NO=$1}}
                      END       {printf "%s\n", MAX_ARCH_NO}
                      '
                `|
        xargs -i $CMD
        fi

fi

-----Original Message-----
Sent: Tuesday, January 08, 2002 3:01 PM
To: Multiple recipients of list ORACLE-L

it's just a shell script that does a cd, then gzip *.archive

run in cron...
--- Prakriteswar Santikary <prakriteswar.santikary_at_pointinfo.com> wrote:

> Rachel,
> 
> do you have a script for this ? I would appreciate if you could send
> me that
> script.
> 
> regards
> Santi
> 
> -----Original Message-----
> Sent: Tuesday, January 08, 2002 5:55 AM
> To: Multiple recipients of list ORACLE-L
> 
> 
> we run a batch job every hour that takes all the unzipped archived
> redo
> logs and zips them, so that we keep compressing space. The other
> thing
> I used to do was on a daily basis, move the prior day's logs to
> another
> drive so that I was only storing one day's worth of archived logs at
> the archive log dest drive
> 
> 
> --- "O'Neill, Sean" <Sean.ONeill_at_organon.ie> wrote:
> > So yesterday the archive log dest disk filled up on one of our
> > prduction
> > systems causing the Oracle DB to halt as it's supposed to.  Disk
> > space was
> > tight and there was a bit of data loading done.  Anyhow I freed up
> > disk
> > space on relevant drive and proceeded to server console to press
> the
> > OK
> > button to allow archiving to restart.  However, the console was
> > locked by a
> > PC Anywhere session which prevented me from getting to the console
> > window
> > with archive dest full message.  Anyhow ended up having to bounce
> the
> > database.  Apart from throttling the user who set the PC anywhere
> > lock on
> > the console and insisting it not be done again I'm wondering did I
> > have any
> > other options apart from a database bounce to overcome this
> problem?.
> > 
> > Oracle 7.3.3, 8.0.5, 8.1.7 
> > NT4, W2K 
> > -------------------------
> > Seán O' Neill
> > Organon (Ireland) Ltd.
> > [subscribed: digest mode] 
> >
> --------------------------------------------------------------------
> > This message, including attached files, may contain confidential
> > information and is intended only for the use by the individual
> > and/or the entity to which it is addressed. Any unauthorized use,
> > dissemination of, or copying of the information contained herein is
> > not allowed and may lead to irreparable harm and damage for which
> > you may be held liable. If you receive this message in error or if
> > it is intended for someone else please notify the sender by
> > returning this e-mail immediately and delete the message.
> >
> --------------------------------------------------------------------
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > --
> > Author: O'Neill, Sean
> >   INET: Sean.ONeill_at_organon.ie
> > 
> > Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> > San Diego, California        -- Public Internet access / Mailing
> > Lists
> >
> --------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from).  You may
> > also send the HELP command for other information (like
> subscribing).
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: Rachel Carmichael
>   INET: wisernet100_at_yahoo.com
> 
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing
> Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Prakriteswar Santikary
>   INET: prakriteswar.santikary_at_pointinfo.com
> 
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing
> Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rachel Carmichael
  INET: wisernet100_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Henry Poras
  INET: Henry.Poras_at_ctp.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Jan 08 2002 - 15:34:37 CST

Original text of this message

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