- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: RMAN Backup doesn't start
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 09:10 PM
10-10-2005 09:10 PM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 09:11 PM
10-10-2005 09:11 PM
Re: RMAN Backup doesn't start
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 09:12 PM
10-10-2005 09:12 PM
Re: RMAN Backup doesn't start
Check the thread below :
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=869774
Hope this information can help you.
Cheers,
AW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 09:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 09:24 PM
10-10-2005 09:24 PM
Re: RMAN Backup doesn't start
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 09:33 PM
10-10-2005 09:33 PM
Re: RMAN Backup doesn't start
Just to test, try again after adding ORACLE_SID in the oracle/admin/CRIME92/bin/db2fs_ar.scr script...
Best Regards,
Eric Antunes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 10:25 PM
10-10-2005 10:25 PM
Re: RMAN Backup doesn't start
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 10:28 PM
10-10-2005 10:28 PM
Re: RMAN Backup doesn't start
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 10:34 PM
10-10-2005 10:34 PM
Re: RMAN Backup doesn't start
export ORA_ENVFILE="/.../oracle/product/.../
And this /.../oracle/product/.../
Best Regards,
Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 10:45 PM
10-10-2005 10:45 PM
Re: RMAN Backup doesn't start
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 10:55 PM
10-10-2005 10:55 PM
Re: RMAN Backup doesn't start
the problem sometimes with "su -
Therefore, the best way is to have a dedicated cron.profile that set the environment for the script.
Also, you can use a script wrapper that will call the cron.profile before starting the script.
It works for us.
Regards
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 11:28 PM
10-10-2005 11:28 PM
Re: RMAN Backup doesn't start
I dont know what the cron.profile is. It is a dedicated .profile for the execution of cronjobs?
If yes I cant use this .profile because I run many backup jobs for different databases with different sid's.
regards
Christian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 11:35 PM
10-10-2005 11:35 PM
Re: RMAN Backup doesn't start
to summarise the cron.profile is like your .profile but trimmed down.
Removes all interactive aspects.
The wrapper script will call the cron.profile to initialise the environement variables PATH, SHLIB_PATH, ORACLE_HOME, ...
but obviously some specific parameters will not be set in the cron.profile or (your choice) will be overwritten in you wrapper script
e.g.
#!/bin/sh
# wrapper script : cron<scriptname>.sh
. /home/oracle/cron.profile
export ORACLE_SID=
/oracle/admin/scripts/<scriptname>.sh > /oracle/admin/reports/<scriptname>.out
Regards
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 11:47 PM
10-10-2005 11:47 PM
Re: RMAN Backup doesn't start
below a quote from man crontab
cron supplies a default environment for every shell, defining:
HOME=user's-home-directory
LOGNAME=user's-login-id
PATH=/usr/bin:/usr/sbin:.
SHELL=/usr/bin/sh
Users who desire to have their .profile executed must explicitly do so in the crontab entry or in a script called by the entry.
which is in line with what jean-luc is describing you above.
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 11:49 PM
10-10-2005 11:49 PM
Re: RMAN Backup doesn't start
Please note that when executing some script from the cron , it doesnt execute the .profile, so environneement variable are not set.
try to insert the "set environnement variable" from . profile in the script executed by the cron.
good luck