Pro*C and cron

From: Charles Wolfe <cwolfe_at_ix.netcom.com>
Date: 1996/02/22
Message-ID: <4gitig$di5_at_reader2.ix.netcom.com>#1/1


rstewart_at_bio.ri.ccf.org (Ron Stewart) wrote:
>I'm having a problem with a pro*c program running under cron in a Solaris 2.3
>environment. The pro c program works fine when run from the command line. But from
>cron, it blows up when it tries to connect to the Oracle database. I get a message:
>
>ORA-12546: Unable to open message file (SQL-02113)
>
>This message indicates a problem with privileges. We're new to using pro c here. Has
>anyone experienced and gotten around this?
>
>Ron Stewart
>
>

Ron,

I've had a similar problem in the past with a shell script used to kick off a SQL*Loader job from cron. Since cron doesn't source your .login when it initiates a job, it doesn't know what your oracle environment variables are (i.e. ORACLE_HOME, ORACLE_SID, etc...). Try having cron execute a shell script which sets the environment variables correctly before it execs your pro*c program. Something like this:

#!/bin/sh
ORACLE_HOME=/usr/oracle/product/7.2
ORACLE_SID=DEV1
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_HOME ORACLE_SID PATH Received on Thu Feb 22 1996 - 00:00:00 CET

Original text of this message