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: Calling St. Procedure in UNIX script, How ?

Re: Calling St. Procedure in UNIX script, How ?

From: Indrek Toom <toom_at_mgine.ee>
Date: Thu, 29 Nov 2001 08:41:26 GMT
Message-ID: <3C05F48A.9070809@mgine.ee>


jane wrote:

> How does one call stored procedures in UNIX
> shell script (I'll take any flavor, thanks) and
> mostly, pass shell variables as parameters ?

something like that:

#!/bin/sh

DATABASE=$1
SP_PARAMETER=$2 if [ -z $DATABASE ];then

   echo "Usage $0 <username/pwd_at_database> <parameter>"    exit
fi

...

if [ "$ORACLE_HOME" = "" ] ; then

    echo "ORACLE_HOME not set. Exiting."     exit 1
fi

$ORACLE_HOME/bin/sqlplus $DATABASE <<EOF

call my_package.my_procedure($SP_PARAMETER); EOF HTH indrek Received on Thu Nov 29 2001 - 02:41:26 CST

Original text of this message

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