Unable take automated export thro' crontab
Hello,
I want to automate my backup with crontab
steps followed
==============
1) I created a shell (named expDB.sh,with chmod 777 permission)for taking backup.The content of shell is given below
/user2/oracle/bin/exp scott/tiger file=/usr/users/oracle/kan/emp.dmp tables=emp
direct=y
2)45 6 * * * /usr/users/oracle/kan/exptest > /dev/null
3) i submitted the job by
crontab crontest
4) At 06.45 hrs cron job ran and given following error at /var/spool/mail/oracle
Message 206 not found; No message file for product=RDBMS, facility=EXP: Release
8.1.7.0.0 - Production on Mon Oct 1 06:45:00 2001
(c) Copyright 2000 Oracle Corpor
Invalid format of Export utility name
Verify that ORACLE_HOME is properly set
Export terminated unsuccessfully
EXP-00000: Message 0 not found; No message file for product=RDBMS, facility=EXP
*************************************************
Cron: The previous message is the standard output
and standard error of the following crontab command:
/usr/users/oracle/kan/expt > /dev/null
(I tried the above steps with oracle user as well as with root user, the same error occured.I checked the .profile of oracle user for oracle home and is found to be ok)
Thanks
Sameer
Unable take automated export thro' crontab
Hi
Thanks for the replies.. But even after adding .profile in crontab I get the same error..
>00 01 * * 0 su -l oracle -->command="/home/oracle/script.sh"
>and you will not get any problems with invironment settings.
So I tried above solution...
It failed because I need to submit password for oracle user.
<--------------------------------------------------------->
Your "cron" job on cmsdev2
su -l oracle --command="export/home/oracle/dekadmp/expDB.sh"
produced the following output:
su: Sorry
<--------------------------------------------------------->
How do I submit inline password?
Thanks
Sameer
Re: Unable take automated export thro' crontab
Create crontab as ROOT and use:
00 01 * * 0 su -l oracle --command="/home/oracle/script.sh"
I always do that and never care about env.
Quote:
Originally posted by Sameer
Hi
Thanks for the replies.. But even after adding .profile in crontab I get the same error..
>00 01 * * 0 su -l oracle -->command="/home/oracle/script.sh"
>and you will not get any problems with invironment settings.
So I tried above solution...
It failed because I need to submit password for oracle user.
<--------------------------------------------------------->
Your "cron" job on cmsdev2
su -l oracle --command="export/home/oracle/dekadmp/expDB.sh"
produced the following output:
su: Sorry
<--------------------------------------------------------->
How do I submit inline password?
Thanks
Sameer
[Edited by kgb on 01-15-2002 at 04:15 AM]