Home » Infrastructure » Unix » Crontab file does not execution! (Solaris 10, Oracle DB 10.2.0.2)
Crontab file does not execution! [message #333340] Fri, 11 July 2008 05:32 Go to next message
trantuananh24hg
Messages: 612
Registered: January 2007
Location: Ha Noi, Viet Nam
Senior Member
Hi all!

I just created one rman backup file level 1
run{
allocate channel d1 type disk;
allocate channel d2 type disk;
backup incremental level 1 tag Level1
format '/vnporadataSYSTEM/backupIncrementalVNP/Level1/Level1%d_%s_%p_%u'
filesperset 1
(database include current controlfile);
delete obsolete;
release channel d1;
release channel d2;
}


This file is located at: /vnporadataSYSTEM/backupIncrementalVNP/Level1.rc

Then, I created one execution file called as rmanschedule
ORACLE_HOME=/u02/app/oracle/oracle/product/10.2.0/DB
export ORACLE_HOME
ORACLE_SID=VNP
export ORACLE_SID
rman target sys/admin@vnp @/vnporadataSYSTEM/backupIncrementalVNP/Level1.rc


If I execute in k.shell by
$/vnporadataSYSTEM/backupIncrementalVNP/rmanschedule


It call /Level1.rc and execute at one.

But when I create the crontab file, call the rmanschedule
$crontab -e 
$crontab -l
30 17 * * * /vnporadataSYSTEM/backupIncrementalVNP/rmanschedule$


It - the daily at 17:30 schedule does not execute, then I got the mail
Quote:

From oracle@database Fri Jul 11 17:22:00 2008
Date: Fri, 11 Jul 2008 17:22:00 +0700 (GMT-7)
From: Oracle Software Owner <oracle@database>
Message-Id: <200807111022.m6BAM06E021610@database>
To: oracle@database
Subject: Output from "cron" command
Content-Length: 162

Your "cron" job on database
rman target sys/neovnp@vnp @/vnporadataSYSTEM/backupIncrementalVNP/Level1VNP.rc

produced the following output:

sh: rman: not found


?
From oracle@database Fri Jul 11 17:20:00 2008
Date: Fri, 11 Jul 2008 17:20:00 +0700 (GMT-7)
From: Oracle Software Owner <oracle@database>
Message-Id: <200807111020.m6BAK0lQ021593@database>
To: oracle@database
Subject: Output from "cron" command
Content-Length: 183

Your "cron" job on database
/vnporadataSYSTEM/backupIncrementalVNP/rmanschedule

produced the following output:

/vnporadataSYSTEM/backupIncrementalVNP/rmanschedule: rman: not found

$



Were I wrong?

Thank you for your resolution!

[Updated on: Fri, 11 July 2008 05:37]

Report message to a moderator

Re: Crontab file does not execution! [message #333372 is a reply to message #333340] Fri, 11 July 2008 07:27 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10628
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
set your PATH.
At the end of your script add
PATH=$PATH;$ORACLE_HOME/bin
export PATH

or
Invoke rman with full path
$ORACLE_HOME/bin/rman  ... 
Re: Crontab file does not execution! [message #333635 is a reply to message #333372] Sun, 13 July 2008 21:09 Go to previous message
trantuananh24hg
Messages: 612
Registered: January 2007
Location: Ha Noi, Viet Nam
Senior Member
Thanks, Mahesh!

I've just fix this file, and it ran normally.
Previous Topic: could not open connection to the host, on port 23 : connection failed
Next Topic: installation
Goto Forum:
  


Current Time: Tue Sep 30 12:11:03 CDT 2014

Total time taken to generate the page: 0.13889 seconds