Re: HELP with CRONTAB and SQLPLUS
Date: 1995/11/27
Message-ID: <49da8v$e0g_at_iserv.dnt.dialog.com>#1/1
Patrick,
You have to explicitely define ORACLE_HOME and ORACLE_SID in your script.
Regards,
Charles_Dye_at_corp.dialog.com
In article <49ci7m$heg_at_sol.sun.csd.unb.ca>, pmccarth_at_rpc.unb.ca (Patrick McCarthy) writes:
>
> I am running Solaris 2.4 and Oracle 7.1.4. We get customer updates from our
> accounting system and we place them on an NFS mounted drive. I am attempting
> to run the following script file from crontab to run sqlplus and do the
> updates. Unfortunately sqlplus does not seem to run. I know the script run
> because the file gets moved and stored in an update directory. I have run the
> script as the root user and it works. What can I do to get it to work from
> CRONTAB or is it not possible to run sqlplus from a crontab ?
>
> #! /bin/sh
>
> # locate update files and run then with sqlplus and then move the files
> # to /updates directory
> # This file is run from crontab
>
> for i in /accounts/LC*.sql
> do
> if [ -s $i ]
> then /opt/oracle/V7/bin/sqlplus / _at_$i
> mv $i /updates/update.`date '+%m.%d.%y_:_%T'`
> sleep 1
> fi
> done
>
> Thanks in advance
> Patrick McCarthy
> pmccarth_at_rpc.unb.ca
Received on Mon Nov 27 1995 - 00:00:00 CET