Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Invoking a Package.Procedure via bash shell script

ArieanMay 15 2013 — edited May 15 2013
Hello All,
I am using the below syntax to call package in a unix shell script, is this right way of calling and checking for errors or is there any other better approach?? kindly suggest.
I am using Oracle 11g & Linux OS, SQL*Plus: Release 11.2.0.3.0 Production
   RETVAL=`sqlplus -s FCSDWH_STG/${DBSTG}@${DBSRC} <<EOF
        EXEC FCSDWH_STG.FCA_HASH_TOTALS_PKG.HASH_TOTALS_COMPUTE(${PROVIDER},${UNINUM},${EXTRACT_DT},${VER_NUM});
        EOF`
        if [ `echo ${RETVAL} | egrep "ERROR"` ]
        then
                logit "Error While Generating The SQLPLUS Output File, Please Check"
                exit 1
        else
                logit "SQLPLUS Output File Has Been Generated Successfully"
        fi
Thanks much.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2013
Added on May 15 2013
15 comments
4,318 views