Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: cronjob and script to start rman make's problems
"achim.altmann" <achim.altmann_at_web.de> wrote
> im from Germany
> please sorry for my bad english language,
Not a problem.
<snipped>
> Please tell me
> what is the problem
I think the problem is that environment is not set. When running a shell script via cron, cron does not run the .profile of that user. This means that ORACLE_HOME, PATH and so, are not set.
Add the following lines to the start of your shell script and see how it works:
-- # check if we have a valid Oracle environment if [ "$ORACLE_HOME" = "" ] then # ORACLE HOME not set. We assume that .profile # was not run, so we execute it ourselves, and # redirect STDOUT and STDERR to /dev/null . $HOME/.profile 1>/dev/null 2>/dev/null fi -- This works under HP-UX's ksh and sh, so I guess this should also work under Linux's bash. -- BillyReceived on Mon Jul 23 2001 - 00:50:27 CDT
![]() |
![]() |