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

Home -> Community -> Usenet -> c.d.o.server -> Re: Try to set a oracle cron job on AIX 5.2

Re: Try to set a oracle cron job on AIX 5.2

From: William Robertson <williamr2019_at_googlemail.com>
Date: 20 Mar 2007 13:29:51 -0700
Message-ID: <1174422591.650908.263480@y80g2000hsf.googlegroups.com>


On Mar 20, 8:22 pm, "William Robertson" <williamr2..._at_googlemail.com> wrote:
> On Mar 19, 9:52 pm, philc..._at_rogers.com wrote:
>
>
>
> > On Mar 19, 5:20 pm, "Matthias Hoys" <a..._at_spam.com> wrote:
>
> > > <philc..._at_rogers.com> wrote in message
>
> > >news:1174336400.261141.70360_at_y66g2000hsf.googlegroups.com...
>
> > > > Hi,
> > > > I am trying to set up acronjobto backup my database daily, the
> > > > following is my shell script, but it
> > > > seems it would not run from thecron, but the manual run is fine, I
> > > > don't know what is missing from my environment:
>
> > > > ==================================
> > > > #!/usr/bin/ksh
> > > > #oracledaily backups
>
> > > > export ORACLE_SID=MYPRD
> > > > export ORACLE_HOME=/home/app/oracle/product/9.2.0
> > > > export ORAENV_ASK=NO;
> > > > . oraenv
>
> > > > WORK_IDEN=/san01/pmmprd/alcprd/exp/exp_myprd_full
>
> > > > exp system/manager file=$WORK_IDEN.dmp log=$WORK_IDEN.log full=y
> > > > direct=y
> > > > exp system/manager parfile=$WORK_IDEN.par
> > > > ~
>
> > > > ===============================================
>
> > > > Any suggestion is appreciated.
>
> > > > Philip
>
> > > Do you have exp in your path ? Try to add export
> > > PATH=$PATH:$ORACLE_HOME/bin, or the full path to the exp executable.
>
> > > Matthias- Hide quoted text -
>
> > > - Show quoted text -
>
> > Hi Joel and Matthias,
>
> > Thanks a lot for giving me so much suggestions, here are my
> > corrections to my script:
>
> > # Schedule of daily oracle backups
> > 02 19 * * * /san01/pmmprd/alcprd/exp/exp_myprd.sh
>
> > Yes I am running separate crons for the oracle, no need for cron.allow
> > as long as oracle is not in cron.deny.
>
> > The shell is correct, because I got the shell from env. But you gave
> > me two suggestions:
>
> > 1. Take out the semicolon from NO
> > 2. add the line export PATH=$PATH:$ORACLE_HOME/bin
>
> > I re-scheduled it to run this evening again. Let's see if it works
> > tommorrow.
>
> > Here is my modified script:
>
> > ==========================================
> > #!/usr/bin/ksh
> > #oracle daily backups
>
> > export ORACLE_SID=MYPRD
> > export ORACLE_HOME=/home/app/oracle/product/9.2.0
> > export PATH=$PATH:/home/app/oralce/product/9.2.0/bin
> > export ORAENV_ASK=NO
> > . oraenv
>
> > WORK_IDEN=/san01/pmmprd/myprd/exp/exp_myprd_full
>
> > exp system/manager file=$WORK_IDEN.dmp log=$WORK_IDEN.log full=y
> > direct=y
> > exp system/manager parfile=$WORK_IDEN.par
>
> > =======================================
>
> > Thanks you so much again.
>
> > Philip
>
> This isn't hoing to be much help, but a semicolon at the end of a line
> is optional (from man ksh: "A semicolon (;) causes sequential
> execution of the preceding pipeline"; or bash, "[list] must be
> terminated with a newline or semicolon") and I think you'll find the
> PATH variable is already exported.

s/hoing/going
Sorry, I can't seem to type... Received on Tue Mar 20 2007 - 15:29:51 CDT

Original text of this message

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