-
Hi DBA's
I wrote a bckup script using rman.
I set ORACLE_HOME, ORACLE_SID, LD_LIBRARY_PATH variables and then wrote my backup code.
when I execute that script from unix prompt it works fine.
When I submit that in cron job I got an error.
RMAN 00571 : File Not Found
LEM-00031 : File not found: arguments[lempgmh] [lemerr]
LEM-00033 : File not found: arguments[lempgfm] [Could not open Message file]
LEM-00031 : File not found: arguments[lempgmh] [lsmerr]
LEM-00033 : File not found: arguments[lempgfm] [Could not open Message file]
I know that script is executed thr' cronjob.
I appriciate if someone could figure out the problem
Thanks
Sunny
-
Could you post the line(s) from your crontab file and the script you are running? It could be that it's not picking up your directory path.
Joe
_________________________
Joe Ramsey
Senior Database Administrator
dbaDirect, Inc.
(877)687-3227
-
cron executes using a minimal shell. It's always best to explicitly execute your user (in this case, oracle) login file (.login for c-shell, .profile for bourne or korn) early in the script to be sure all of your environment is correct.
-
oops. In my previous post I said "execute your login file" when I should have said "source your login file". Big difference.
-
Assume that your user is "oracle", then you should supply "su - oracle" at your crontab. It will set the oracle environment.
-
as MACSWELL said, you r use SUB schell in cronjob which means there are only 5-6 environment var set (try to display your env var in the cronjob you will be very surprise the result). you have to reset your variable by running .profile (KSH) or create a script then execute it.
-
I always start a crontab script with
. /etc/profile
. ~/.profile
Gert
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|