Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Running Pro*C App via Crontab

Re: Running Pro*C App via Crontab

From: Simon Goland <sg_at_mda.ca>
Date: 1997/01/10
Message-ID: <32D69F64.10AF@mda.ca>#1/1

Insoo Kang wrote:
>
> Does anybody know how to set Oracle environment variables to a Pro*C
> application that will be executed via crontab? Thanks.

I have some cron tasks, but they use perl. I set all the required Oracle variables in my perl programs, since the shell does not see them. In perl it looks something like:

# Processes that run as a crontab entry inherit a very
# impoverished environment.
# Therefore set all possible related environment variables explicitly.
#
$ENV{'ORACLE_HOME'} = "/home/dba/oracle/orahome7_3";
$ENV{'ORA_NLS'}     =
"/home/dba/oracle/orahome7_3/ocommon/nls/admin/data";
$ENV{'PATH'}        = "your path"
$ENV{'SQLPATH'}     = "/home/dba/oracle/scripts/admin";

You will have to experiment a bit to find out which variables are needed to be set. I am sure there is a similar way to set it just from a shell script without perl, but since I needed perl anyway (and I like it too), I used only this approach.

-- 
[ Simon Goland      B-)>      sg_at_mda.ca ]
[   Without action there is no change   ]
Received on Fri Jan 10 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US