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: How to start a Stored Procedure directly from Unix shell skript ?

Re: How to start a Stored Procedure directly from Unix shell skript ?

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 11 Mar 2003 14:55:41 -0800
Message-ID: <92eeeff0.0303111455.4c9e8af6@posting.google.com>


"Jan Gelbrich" <j_gelbrich_at_westfalen-blatt.de> wrote in message news:<b4l0d4$1ujt4h$1_at_ID-152732.news.dfncis.de>...
> Hello,
>
> is there a way to start a *stored procedure* (not a SQL script)
> from a Unix *shell script* using SQL+.
>
> I know the way how to start a SQL-Script from the shell,
> as documentation says:
> ...
> sqlplus user/pass @myscript [arg1 ...]
> ...
> And inside this SQL-script you may say
> EXEC myPU ...
>
> We tried it the same way with a PU, with no success ...
> ...
> sqlplus user/pass myPU
> no way ...
> sqlplus user/pass exec myPU
> no way ...
>
> Is it possible at all ? I can hardly imagine that it is not ...
> I did RTFMing but did not find useful tips ...
>
> (Oracle EE 8.1.7, AIX 4.3.3)
>
> TIA
>
> Jan

This is Sqlplus usage,

Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ] where <option> ::= - | -? | [ [-M <o>] [-R <n>] [-S] ]

      <logon> ::= <username>[/<password>][@<connect_string>] | / | /NOLOG

      <start>  ::= @<filename>[.<ext>] [<parameter> ...]
        "-" displays the usage syntax
        "-?" displays the SQL*Plus version banner
        "-M <o>" uses HTML markup options <o>
        "-R <n>" uses restricted mode <n>
        "-S" uses silent mode

Look at,
"<logon> ::= <username>[/<password>][@<connect_string>] | / | /NOLOG". and if you find a way to run Sqlplus by, "<logon> ::= <username>[/<password>][@<connect_string>] <YOUR PARAM>". without actually recompiling it to accept <YOUR PARAM>, then you will be a genius, no matter which platform it is. And yes...please post here if you do find a way.

However, when you are done trying, then use, "<start> ::= @<filename>[.<ext>] [<parameter> ...]"

and no... I am not being sarcastic!!

Regards
/Rauf Sarwar Received on Tue Mar 11 2003 - 16:55:41 CST

Original text of this message

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