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 call a shell script in PL/SQL & plus ??

Re: How to call a shell script in PL/SQL & plus ??

From: <karsten_schmidt8891_at_my-deja.com>
Date: Wed, 06 Oct 1999 13:29:17 GMT
Message-ID: <7tfiqs$ocp$1@nnrp1.deja.com>


In article <11f733ec.5a7f7ced_at_usw-ex0102-016.remarq.com>,   agichen <agiNOagSPAM_at_feib.com.tw.invalid> wrote:
> In article <7tcmdb$ee5$1_at_news.ecrc.de>, "Lothar Dickhoff"
> <dickhofl_at_ada.de> wrote:
> > Hi Agi,
> > did you try the command "host" ?
> > Regs. Lothar
>
> Yes,but how in a PL/SQL ??
>

Hi,
 you cannot run host commands in pl/sql.  pl/sql runs on your server, this is not nessecarily the same box or platform as your sqlplus session.

given this, you can make sqlplus call some clientside scrips depending on pl/sql code.
this would look like this:

sqlplus:

set serverout on
spool /tmp/myscript
exec myproc
spool off
ho /tmp/myscript
exit

where the stored procedure myproc spits out some code via dbms_output.

this is quite cludgy, and in most cases the same thing can be achieved with plain old sql (sqlplus).

Cheers Karsten

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Oct 06 1999 - 08:29:17 CDT

Original text of this message

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