Operating System - HP-UX
1748224 Members
4708 Online
108759 Solutions
New Discussion юеВ

Re: RMAN Backup doesn't start

 
SOLVED
Go to solution
Christian Marquardt_1
Regular Advisor

RMAN Backup doesn't start

Hi Admins,
I've a problem running my rman backup script.
We've to database machines. On one the cronjob for taking hourly archivelog rman backups running fine on the other it returns the error "ORA-07217: sltln: environment variable cannot be evaluated".
Here's the crontab entry (identical on both machines):
0 * * * * su - crime92 -c "/oracle/admin/CRIME92/bin/db2fs_ar.scr" 1>/dev/null 2>&1

The ORACLE_SID Variable is set by the .profile of the crime92 user.

Has anyone a idea where's the problem?

regards
Christian
14 REPLIES 14
Christian Marquardt_1
Regular Advisor

Re: RMAN Backup doesn't start

PS: If I copy the crontab entry in my shell window and starting it runs fine. If the job is running automatically by crontab the error occurs.
Adisuria Wangsadinata_1
Honored Contributor

Re: RMAN Backup doesn't start

Hi,

Check the thread below :

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=869774

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
Muthukumar_5
Honored Contributor
Solution

Re: RMAN Backup doesn't start

crontab execution to some other with su -c will not read .profile of that specific user. You have to just export ORACLE_SID variable explicitly.

hth.

Easy to suggest when don't know about the problem!
Christian Marquardt_1
Regular Advisor

Re: RMAN Backup doesn't start

Hi,
I understand that the su -c isn't reading the .profile because on the other machine it works fine. The scripts and the crontab entries are identical on both machines.

Christian
Eric Antunes
Honored Contributor

Re: RMAN Backup doesn't start

Hi Christian,

Just to test, try again after adding ORACLE_SID in the oracle/admin/CRIME92/bin/db2fs_ar.scr script...

Best Regards,

Eric Antunes
Each and every day is a good day to learn.
Christian Marquardt_1
Regular Advisor

Re: RMAN Backup doesn't start

Hi Eric,
adding the "export ORACLE_SID" command to the script works fine. But my problem is that there's a machine who's working without setting the ORACLE_SID in the script and another machine doesn't. I've no idea what configuration was done on the "good" machine.

regards
Christian
Yogeeraj_1
Honored Contributor

Re: RMAN Backup doesn't start

hi christian,

it could be that ORACLE_SID and other environment variables are already set in the user's profile or /etc/profile

check this out!

regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Eric Antunes
Honored Contributor

Re: RMAN Backup doesn't start

Or you can have in "/oracle/admin/CRIME92/bin/db2fs_ar.scr something like this:

export ORA_ENVFILE="/.../oracle/product/.../.env"

And this /.../oracle/product/.../.env has the export ORACLE_SID=""

Best Regards,

Eric
Each and every day is a good day to learn.
Yogeeraj_1
Honored Contributor

Re: RMAN Backup doesn't start

hi again,

in our environment, we only have the following three line in the Oracle user account's .profile:

export ORACLE_SID=
export ORACLE_HOME=/u01/app/oracle/product/8.1.7
export CLASSPATH=/u01/app/oracle/product/8.1.7/jre:/u01/app/oracle/product/8.1.7/jlib:.


and the crontab has an entry as follows:
00 01 * * * echo "/app/backup/rman.sh" | su - oracle 1>/dev/null 2>&1


good luck

regards
yogeeraj

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)