List Info

Thread: RE: crontab job loosing the Oracle env settings




RE: crontab job loosing the Oracle env settings
user name
2007-07-24 04:12:11
Crontab jobs are normally run in Shell (/bin/sh), and only a
limited number of environment variables are set by default. 
(An easy way to check is to run a script in cron with a line
such as "set > ~/set.out" and examine the
output.)

You can indeed add the environment variables that your
script requires to the scripts themselves, or source them
in.  Yet another alternative is to add them directly to the
crontab file.  Cf. "man 5 crontab" for more info.

Kind regards,

Herta

-----Original Message-----
From: Yoav Givon [mailto:YGivonfcruise.com] 
Sent: Tuesday, July 24, 2007 10:59
To: Martin Klier; Maurice Kemmann
Cc: suse-oraclesuse.com
Subject: RE: [suse-oracle] crontab job loosing the Oracle
env settings


Thank you Maurice and Martin . 

I thought   that as Crontab jobs are created BY the running
user and run on his user account this will preserve his
environment ... 

Have a nice day and thank you again !. 

Yoav 

-----Original Message-----
From: Martin Klier [mailto:martin.klieratu.de] 
Sent: Tuesday, July 24, 2007 10:54 AM
To: suse-oraclesuse.com
Cc: Maurice Kemmann; Yoav Givon
Subject: Re: [suse-oracle] crontab job loosing the Oracle
env settings

Hi,

alternatively, depending on your OS, you may want to source
the global 
environment file, for Linux e.g. /etc/profile.

Am Dienstag 24 Juli 2007 10:49 schrieb Maurice Kemmann:
> Dear Yoav,
>
> Am Dienstag, den 24.07.2007, 10:31 +0200 schrieb Yoav
Givon:
> > ...
> > QUESTION - Do I have   to add something to the
crontab job to facilitate
> > the oracle  environment ?  Have  I missed
something  else  here ?
>
> you should perform the script as oracle user of course
and in addition 
> to that you should set your environment parameters as
well.
>
> E.G.:
>
> crontab
> ========
> # Oracle Script - once a day
> 00 23 * * *      oracle  /opt/bin/ora-script.sh
>
> Beginning of the Script
> ========================
>
> #!/bin/bash
>
> export ORACLE_BASE=/opt/oracle
> export ORACLE_SID=SID
> export ORACLE_HOME=$ORACLE_BASE/OraHome
>
> ## starting the script ...
>
> Hope it helps,
>
> Maurice
>
>
>
> --
> OpenIT GmbH                             tel   +49 211
239 577-0
> Maurice Kemmann                         fax   +49 211
239 577-10
> Jahnstr. 18                             email
kemmannopenit.de
> D-40215 Düsseldorf                      http://www.openit.de
>
____________________________________________________________
____
> HRB 38815 Amtsgericht Düsseldorf    USt-Id DE
812951861
> Geschäftsführer:
> Susanne Schultz, Oliver Haakert, Maurice Kemmann

-- 
Freundliche Grüße

i.A.
Martin Klier
Systemadministration/Datenbanken
------------------------------------------------------------
------
A.T.U Auto-Teile-Unger
Handels GmbH & Co. KG
Dr.-Kilian-Str. 4 
92637 Weiden i.d. OPf.

Tel.: +49 961 306-5663
Fax : +49 961 306-5982

martin.klieratu.de
www.atu.eu

Sitz: Weiden i. d. Opf., Amtsgericht Weiden i. d. OPf., HRA
2012 UST-ID Nr. DE814195392, WEEE-Nr. DE53789710 Persönlich
haftende Gesellschafterin: AFM Autofahrerfachmarkt
Geschäftsführungs GmbH
Sitz: Weiden i. d. OPf., Amtsgericht Weiden i. d. OPf., HRB
2842
Geschäftsführer: Karsten Engel, Dirk Müller, Manfred Ries

-- 
To unsubscribe, email: suse-oracle-unsubscribesuse.com
For additional commands, email: suse-oracle-helpsuse.com
Please see http://www.suse.com/oracl
e/ before posting


--
To unsubscribe, email: suse-oracle-unsubscribesuse.com
For additional commands, email: suse-oracle-helpsuse.com
Please see http://www.suse.com/oracl
e/ before posting


Re: crontab job loosing the Oracle env settings
user name
2007-07-24 11:44:00
If you use suse oraruin, just add into the script

 . /etc/profile.d/oracle.sh

and it wil read standard environment for oracle.

If you use your own .bashrc and not orarun's oracle.sh, add 
. ~/.bashrc or 
simular command.


----- Original Message ----- 
From: <herta.vandeneyndethomson.com>
To: <YGivonfcruise.com>
Cc: <suse-oraclesuse.com>
Sent: Tuesday, July 24, 2007 2:12 AM
Subject: RE: [suse-oracle] crontab job loosing the Oracle
env settings


Crontab jobs are normally run in Shell (/bin/sh), and only a
limited number 
of environment variables are set by default.  (An easy way
to check is to 
run a script in cron with a line such as "set >
~/set.out" and examine the 
output.)

You can indeed add the environment variables that your
script requires to 
the scripts themselves, or source them in.  Yet another
alternative is to 
add them directly to the crontab file.  Cf. "man 5
crontab" for more info.

Kind regards,

Herta

-----Original Message-----
From: Yoav Givon [mailto:YGivonfcruise.com]
Sent: Tuesday, July 24, 2007 10:59
To: Martin Klier; Maurice Kemmann
Cc: suse-oraclesuse.com
Subject: RE: [suse-oracle] crontab job loosing the Oracle
env settings


Thank you Maurice and Martin .

I thought   that as Crontab jobs are created BY the running
user and run on 
his user account this will preserve his environment ...

Have a nice day and thank you again !.

Yoav

-----Original Message-----
From: Martin Klier [mailto:martin.klieratu.de]
Sent: Tuesday, July 24, 2007 10:54 AM
To: suse-oraclesuse.com
Cc: Maurice Kemmann; Yoav Givon
Subject: Re: [suse-oracle] crontab job loosing the Oracle
env settings

Hi,

alternatively, depending on your OS, you may want to source
the global
environment file, for Linux e.g. /etc/profile.

Am Dienstag 24 Juli 2007 10:49 schrieb Maurice Kemmann:
> Dear Yoav,
>
> Am Dienstag, den 24.07.2007, 10:31 +0200 schrieb Yoav
Givon:
> > ...
> > QUESTION - Do I have   to add something to the
crontab job to facilitate
> > the oracle  environment ?  Have  I missed
something  else  here ?
>
> you should perform the script as oracle user of course
and in addition
> to that you should set your environment parameters as
well.
>
> E.G.:
>
> crontab
> ========
> # Oracle Script - once a day
> 00 23 * * *      oracle  /opt/bin/ora-script.sh
>
> Beginning of the Script
> ========================
>
> #!/bin/bash
>
> export ORACLE_BASE=/opt/oracle
> export ORACLE_SID=SID
> export ORACLE_HOME=$ORACLE_BASE/OraHome
>
> ## starting the script ...
>
> Hope it helps,
>
> Maurice
>
>
>
> --
> OpenIT GmbH                             tel   +49 211
239 577-0
> Maurice Kemmann                         fax   +49 211
239 577-10
> Jahnstr. 18                             email
kemmannopenit.de
> D-40215 Düsseldorf                      http://www.openit.de
>
____________________________________________________________
____
> HRB 38815 Amtsgericht Düsseldorf    USt-Id DE
812951861
> Geschäftsführer:
> Susanne Schultz, Oliver Haakert, Maurice Kemmann

-- 
Freundliche Grüße

i.A.
Martin Klier
Systemadministration/Datenbanken
------------------------------------------------------------
------
A.T.U Auto-Teile-Unger
Handels GmbH & Co. KG
Dr.-Kilian-Str. 4
92637 Weiden i.d. OPf.

Tel.: +49 961 306-5663
Fax : +49 961 306-5982

martin.klieratu.de
www.atu.eu

Sitz: Weiden i. d. Opf., Amtsgericht Weiden i. d. OPf., HRA
2012 UST-ID Nr. 
DE814195392, WEEE-Nr. DE53789710 Persönlich haftende
Gesellschafterin: AFM 
Autofahrerfachmarkt Geschäftsführungs GmbH
Sitz: Weiden i. d. OPf., Amtsgericht Weiden i. d. OPf., HRB
2842
Geschäftsführer: Karsten Engel, Dirk Müller, Manfred Ries

-- 
To unsubscribe, email: suse-oracle-unsubscribesuse.com
For additional commands, email: suse-oracle-helpsuse.com
Please see 
http://www.suse.com/oracl
e/ before posting


-- 
To unsubscribe, email: suse-oracle-unsubscribesuse.com
For additional commands, email: suse-oracle-helpsuse.com
Please see http://www.suse.com/oracl
e/ before posting



--
To unsubscribe, email: suse-oracle-unsubscribesuse.com
For additional commands, email: suse-oracle-helpsuse.com
Please see http://www.suse.com/oracl
e/ before posting


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )