Re: Try to set a oracle cron job on AIX 5.2
- From: "joel garry" <joel-garry@xxxxxxxx>
- Date: 19 Mar 2007 15:46:23 -0700
On Mar 19, 2:52 pm, philc...@xxxxxxxxxx wrote:
On Mar 19, 5:20 pm, "Matthias Hoys" <a...@xxxxxxxx> wrote:
<philc...@xxxxxxxxxx> wrote in message
news:1174336400.261141.70360@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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
Well, besides the fact you can't spell oracle (look at your PATH :-)
adding it to your path should have been done by oraenv, so you might
investigate why that doesn't work, a printenv at the beginning and end
of your script may help for debugging purposes. Trying running the
command dbhome with no SID and then with your SID, see if it says the
correct home (and if not, check your oratab). Keep us posted.
I was under the impression that if neither the allow or deny files
exist, only root can cron. But it's been too long since I've been on
AIX to remember if it is different than hp-ux that way. Actually,
it's been so long since I've had to deal with this issue I don't
remember if hp-ux is that way, either. at and batch _are_ that way,
anyways.
jg
--
@home.com is bogus.
Well, at least it isn't a green door.
http://www.signonsandiego.com/uniontrib/20070316/news_1b16reddoor.html
.
- References:
- Try to set a oracle cron job on AIX 5.2
- From: philchan
- Re: Try to set a oracle cron job on AIX 5.2
- From: Matthias Hoys
- Re: Try to set a oracle cron job on AIX 5.2
- From: philchan
- Try to set a oracle cron job on AIX 5.2
- Prev by Date: Re: Try to set a oracle cron job on AIX 5.2
- Next by Date: Re: Introducing myself
- Previous by thread: Re: Try to set a oracle cron job on AIX 5.2
- Next by thread: Re: Try to set a oracle cron job on AIX 5.2
- Index(es):
Relevant Pages
|