| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to start a Stored Procedure directly from Unix shell skript ?
rs_arwar_at_hotmail.com (Rauf Sarwar) wrote in message news:<92eeeff0.0303111455.4c9e8af6_at_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.
Well, if I can get a genius award, how about:
Move sqlplus to a different name
Create a script that counts parameters and parses them to figure out
if it is the desired syntax.
If so, it dynamically creates a corrected here script and passes that
to real sqlplus.
If not, just pass args to real sqlplus.
Coding is left as an exercise for the student. Coding password-stealer is left as an exercise for the security student.
>
> However, when you are done trying, then use,
> "<start> ::= @<filename>[.<ext>] [<parameter> ...]"
>
> and no... I am not being sarcastic!!
>
> Regards
> /Rauf Sarwar
jg
-- @home is bogus. Command lines are necessary 100% of the time at least once.Received on Wed Mar 19 2003 - 16:50:01 CST
![]() |
![]() |