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: script problem solved, but I still don't understand ....

Re: script problem solved, but I still don't understand ....

From: John Hurley <johnbhurley_at_sbcglobal.net>
Date: 14 Oct 2004 05:34:26 -0700
Message-ID: <d4d6f278.0410140434.7bc21fd2@posting.google.com>


snip

> I finally realized that even though I was setting ORACLE_SID in the
> shell script, I wasn't exporting it so that SQLPlus could see it.
> After adding 'export ORACLE_SID' to the shell script it ran like a
> champ.

Everyone it seems approaches shell scripts (batch jobs one could say) that use oracle utilities a little differently.

My approach is to always dot in some kind of small file that sets (and exports) all of the oracle environment that you need to have established as the first step.

#!/bin/ksh
#
# doc notes as needed
#

. /u01/app/oracle/local/bin/.9ioraenv

The .9ioraenv file could check what host you are on, what oracle homes are available, what sids, ... etc ... then set the environment as needed (whatever you require). This type of approach might be useful to your environment.

John Received on Thu Oct 14 2004 - 07:34:26 CDT

Original text of this message

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