Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Try to set a oracle cron job on AIX 5.2
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:
I re-scheduled it to run this evening again. Let's see if it works tommorrow.
Here is my modified script:
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 Received on Mon Mar 19 2007 - 16:52:49 CDT
![]() |
![]() |