Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Calling St. Procedure in UNIX script, How ?
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