Re: SQL Plus from a 'cron'
Date: 1995/07/31
Message-ID: <1995Jul31.231116.23946_at_xsoft.uucp>#1/1
In article <3v1o1v$qh3_at_crcnis3.unl.edu>, nolan_at_helios.unl.edu (Michael Nolan) writes:
>bps9_at_bps9.ebay.sun.com (Ravi Sankar) writes:
>
>>Is it possible to execute SQL Script from a cron function.
>
>Yes, we do it all the time. The problem is that cron does NOT execute
>the .profile, so you don't have the environmental variables that Oracle
>needs defined. (If you use csh will need to translate your .cshrc and/or
>..login commands to Bourne shell scripts, because cron uses /bin/sh.)
what nobody's told you is that you need to set ORACLE_HOME in the environment so sqlplus can find its message files.
#!/bin/sh
# my sqlplus cron script
set ORACLE_HOME=/home/foo/bar/oracle/product/7.2 ; export ORACLE_HOME
set PATH=${ORACLE_HOME}/bin:...; export PATH
sqlplus user/password _at_/fully/qualified/name/for/script
good luck
//michael
-- :: michael ryan , ryan_at_xsoft.xerox.com :: ob disclaimer: opinions expressed are not those of xerox, corp.Received on Mon Jul 31 1995 - 00:00:00 CEST