Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    93

    Unanswered: how to exec a procedure in Unix--calling procedures

    how to exec a procedure in Unix
    I am trying to execute a procedure in Unix:

    Here is the deal:

    I have created a procedure, which works fine,it runs via a Shell script. Now I want to execute that Procedure to it can update all the rows...

    Currently have the following:
    shell script:

    sqlplus $ES_DB_STRING @$ES_PATH/code/other/Data_patches/T5_Update_corp.sql

    Exit;

    My procedure creates but its still stuck on SQLPLUS...the 'exit' part does not work

    secondly I want to execute this so it updates rows.:

    I havce used the following:

    spool $ES_LOGS/T5_T5_Update_corp.log
    Whenever SQLERROR EXIT 1
    Whenever OSERROR EXIT 1

    SET SERVEROUTPUT ON

    BEGIN

    T5_Update_corp;




    END;
    /
    --*****************
    --* END OF PL/SQL *
    --*****************
    --------------------------------------------------------------
    -- Check if Exception record was created, if so, set the
    -- exit code accordingly
    --------------------------------------------------------------
    set feedback off


    set feedback on

    spool off

    exit

    But returns the following:
    ' ERROR at line 3
    ora -06550 line 3, column 3
    pls -00201 idendifier 'T5_Update_corp must be declared
    PLSQL STATEMENT IGNORED

    hence it did not work, I just want to exec the above script as in

    EXEC Update Corp: (all has to be uploaded automatically)
    Cheers
    Etravels

  2. #2
    Join Date
    Dec 2003
    Location
    Oklahoma, USA
    Posts
    354
    It appears that Oracle cannot find the procedure you specified: T5_Update_corp

    Are you perhaps not logging into the same schema that owns the procedure?

    JoeB

  3. #3
    Join Date
    Mar 2004
    Posts
    19
    As you have already provided exit in SQL file, there is no need to specify "Exit" in shell script.

    The userid used to login, is probably not having privilege to execute the Procedure "T5_Update_corp".

    Hope this info helps.
    -------------
    Pragati Swain

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •