Re: Executing UNIX commands from Oracle

From: Eric Stevens <estevens_at_metasys.com>
Date: 15 Feb 1995 22:39:15 GMT
Message-ID: <3htvqj$24s_at_ralph.vnet.net>


Keep in mind, PL/SQL is:

	parsed
	compiled
	executed

from the kernel. If the kernel hosts to the operating system and never returns (maybe an infinate loop) the database is hung forever as well. And just how do you think we are going to kill this crazed process ? The kernel started the process so what is the process called, what is the user, etc ?

From SQL*Plus, Reports, Forms, etc., the HOST is performed from w/in those programs NOT the kernel.

Eric Stevens <estevens_at_metasys.com>
Metasys, Inc.
World-Class Consulting, Software & Education

warkr_at_vanadium.brooks.af.mil (Richard Wark) wrote:
>
> David,
>
> What you are looking for is the HOST command in SQL*Plus. Host allows
> you to execute UNIX commands from within SQLPLUS. One problem, however,
> you cannot use the HOST command within a stored PL/SQL procedure or
> trigger. I have been looking into this for a month or so, and have not
> come up with a perfect solution, the only way I have found is rather
> cumbersome:
>
> 1) have the application write the shell's variable strings to a
> table.
> 2) have the shell script's boilerplate text in another (static)
> table.
> 3) Have a listener-type process which queries the table at
> regular intervals (we're using SQR) which constructs and
> executes the UNIX-shell scripts, and then deletes the entries
> from the table in #1.
>
> I agree that this is a major pain in the neck and challenge anyone
> to come up with a more elegant solution. Why no HOST calls in a
> PL/SQL block?... Oracle often has good reason, but fails to explain
> them......anyone at "O" ???
>
> Richard A. Wark
> Computer Sciences Corporation warkr_at_vanadium.brooks.af.mil
> Brooks AFB, San Antonio, TEXAS
>
>
> In article <daveguyD3t5sA.CFw_at_netcom.com>, daveguy_at_netcom.com (David Dietrich) says:
> >
> >This has to be a no brainer for some of you folks. I'm no DBA, but I play
> >one on TV. Seriously, I have a conceptual thing to ask. If I have a
> >client/server app with a MS Access front end, can I do SQL pass throughs
> >to the Oracle database and have a stored procedure actually execute
> >operating system commands? I want to: present a form to the Access user,
> >update the backend, and kick-off a UNIX script. We're using SQL/net and
> >ODBC to connect. What is the SQL statement in Oracle to execute an
> >operating system command? I hope this post isn't too light weight! I'm
> >doing the UNIX scripts, and the project DBA isn't certain. Any help would
> >be appreciated.
> >
> >David Dietrich - daveguy_at_netcom.com
>
Received on Wed Feb 15 1995 - 23:39:15 CET

Original text of this message