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: Executing Unix commands from PL/SQL possible?

Re: Executing Unix commands from PL/SQL possible?

From: Rob Christensen <rob4j_at_magna.com.au>
Date: 1997/05/30
Message-ID: <338E4965.13E2@magna.com.au>#1/1

Atif Ahmad Khan wrote:
>
> I am wanting to put a simple Unix command like :
>
> echo "Order Number 123 cancelled by customer" | mail salesperson
>
> in a PL/SQL package. Is this possible?
>
> I read something about a PLEX tool on Oracle Govt. web site. Is
> that supposed to help in achieving something like this?
>
> Thanks a million.
>
> Atif Khan
> aak2_at_ra.msstate.edu

Look in the "Oracle7 Server Application Developer's Guide" at the Chapter on "Sending Messages between sessions with pipes". (Pages 8-13 to 8-19 in the Release 7.2 manual). There are listings of the code required to implement this.

This gives an example on how to execute system commands from a PL/SQL block using the DAEMON package and a PRO*C program.

The PRO*C program just sleeps, waiting for a message to arrive on the named pipe. When a message comes in it wakes up & processes it.

This implementation is completely useless for batch jobs on Windows NT since the Daemon executable has to be run from an account and would require someone to be logged on at all times. But under UNIX it should work well.

Good Luck,
Rob.

-- 
----====(There's too much blood in my caffeine system)====----

  		Rob Christensen, Oracle Database Administrator
 _-_|\		Technisyst (Brisbane, Australia)  
/     \		(http://www.technisyst.com.au)   (07)3229 3150
\_.-._* <---	{Currently residing in Canberra}  
     v		mailto://rob4j@magna.com.au  Phone: (06)295 7013

-=(The opinions expressed here are mine and not my employers)=-
Received on Fri May 30 1997 - 00:00:00 CDT

Original text of this message

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