Re: Pro*C and cron

From: C. Fetters <cfetters_at_iac.net>
Date: 1996/02/27
Message-ID: <31337626.138E_at_iac.net>#1/1


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

This sounds more like a UNIX "feature" than a Pro*C problem. Programs that are run from cron have virtually no environment. I think the only env variables that are set are HOME and PATH (which will only include /bin and /usr/bin probably). Check the cron man page (or may the crontab man page). What this means is that ORACLE_HOME is not set, ORACLE_SID is not set, and $ORACLE_HOME/bin is not in your PATH. You'll probably need to write a shell script that sets all of the variables that you care about, then run your Pro*C program. Then have cron run your shell script instead of running the Pro*C program directly. Carol Fetters
cfetters_at_iac.net Received on Tue Feb 27 1996 - 00:00:00 CET

Original text of this message