cron and ORACLE_HOME env 
Author Message
 cron and ORACLE_HOME env
This question has probably been asked before, but I didn't find a
viable solution, after reading many of them.
Basic Problem : Job runs fine when run from command line, but fails
when cronned.
Attempts : Set up ORACLE_HOME , ORACLE_SID .... etc .... etc in a
configuration file and put that file at the top of the crontab file.
Complains : ORACLE_HOME not set !

HELP !!!

Thanks

Sent via Deja.com http://www.***.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT
 cron and ORACLE_HOME env

if you set the cronjob up as root preceeding the command you what to run
with " su  - username -c " unix will log in as that user prior to executing
the command and therefore should pick up all the enviroment variables

HTH

Conan



Wed, 18 Jun 1902 08:00:00 GMT
 cron and ORACLE_HOME env
who is running cron root ???, is so then su -oracle to change to the
oracle user and get all the oracle user environments or run set up cron
to be run as oracle
Quote:

> This question has probably been asked before, but I didn't find a
> viable solution, after reading many of them.
> Basic Problem : Job runs fine when run from command line, but fails
> when cronned.
> Attempts : Set up ORACLE_HOME , ORACLE_SID .... etc .... etc in a
> configuration file and put that file at the top of the crontab file.
> Complains : ORACLE_HOME not set !

> HELP !!!

> Thanks

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT
 cron and ORACLE_HOME env
the job is being run by a regular user . I am cronning the job under my
name ? The problem that crom mails me with is ORACLE_HOME not set, and
as I said, there is a whole file with things like
ORACLE_HOME = /local/oracle/app/oracle/product/7.3.2
export ORACLE_HOME
and bunch of other things

Any ideas , how to set up cron's environment



Quote:
> who is running cron root ???, is so then su -oracle to change to the
> oracle user and get all the oracle user environments or run set up
cron
> to be run as oracle


> > This question has probably been asked before, but I didn't find a
> > viable solution, after reading many of them.
> > Basic Problem : Job runs fine when run from command line, but fails
> > when cronned.
> > Attempts : Set up ORACLE_HOME , ORACLE_SID .... etc .... etc in a
> > configuration file and put that file at the top of the crontab file.
> > Complains : ORACLE_HOME not set !

> > HELP !!!

> > Thanks

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.


Wed, 18 Jun 1902 08:00:00 GMT
 cron and ORACLE_HOME env
do you << the user running cron>>have all your oracle environment variables
set up in your login or .profile
depending on what shell your running either export $ORACLE_HOME or
set $ORACLE_HOME within the first commands in the shell script
Quote:

> the job is being run by a regular user . I am cronning the job under my
> name ? The problem that crom mails me with is ORACLE_HOME not set, and
> as I said, there is a whole file with things like
> ORACLE_HOME = /local/oracle/app/oracle/product/7.3.2
> export ORACLE_HOME
> and bunch of other things

> Any ideas , how to set up cron's environment



> > who is running cron root ???, is so then su -oracle to change to the
> > oracle user and get all the oracle user environments or run set up
> cron
> > to be run as oracle


> > > This question has probably been asked before, but I didn't find a
> > > viable solution, after reading many of them.
> > > Basic Problem : Job runs fine when run from command line, but fails
> > > when cronned.
> > > Attempts : Set up ORACLE_HOME , ORACLE_SID .... etc .... etc in a
> > > configuration file and put that file at the top of the crontab file.
> > > Complains : ORACLE_HOME not set !

> > > HELP !!!

> > > Thanks

> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT
 cron and ORACLE_HOME env
I had a similar problem.  I solved by defining and exporting the oracle_home
variable inside all the scripts cron was set to run.  Also, do not forget to
specify the full path of the scripts or commands in the script too. For
example, do:

/usr/sbin/gzip /path/filename rather than
gzip filename

DR



Wed, 18 Jun 1902 08:00:00 GMT
 cron and ORACLE_HOME env

Quote:

> This question has probably been asked before, but I didn't find a
> viable solution, after reading many of them.
> Basic Problem : Job runs fine when run from command line, but fails
> when cronned.
> Attempts : Set up ORACLE_HOME , ORACLE_SID .... etc .... etc in a
> configuration file and put that file at the top of the crontab file.
> Complains : ORACLE_HOME not set !

> HELP !!!

> Thanks

> Sent via Deja.com http://www.deja.com/
> Before you buy.

figured it out. The way it worked for our system ( which is different
machines, Solaris and AIX) , is I put all environment variables in a
file , like ORACLE_HOME=/opt/oracle/app/oracle/product/7.3.2
            export ORACLE_HOME
and called this file myconf,
then to run the job (which is a perl script called check_req.pl), I did

* * * * * (. /local/home/farooq/myconf; /Retain/test/sbin/check_req.pl)

Quote:
> /dev/null

This worked. I am posting it here so late, so that down the road ,
someone else wouldn't have to go thru the same misery !!! Thanks to all
that helped.

Sent via Deja.com http://www.deja.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT
 
 [ 7 post ] 

 Relevant Pages 

1. Finding Oracle_Home programatically(sp?)

2. ORACLE_HOME is not set in your environment (Mandrake-80)

3. %ORACLE_HOME%: OAS 4.0 vs Oracle 7.3 on Win NT

4. Avoiding Symbolic Links in setting ORACLE_HOME variable on UNIX

5. TNSNAMES.ORA not in ORACLE_HOME

6. ORACLE_HOME in 7.3.2.3

7. What are all the files in $ORACLE_HOME/bin ?

8. OAS/Database ORACLE_HOME compatabilities and related issues

9. ORACLE_HOME for application server

10. DRG-11208 and ORACLE_HOME

11. ORACLE_HOME and DEFAULT_HOME

12. 2 databases 2 listeners 1 oracle_home


 
Powered by phpBB® Forum Software