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: Need to execute a UNIX program from a ORACLE PL/SQL block

Re: Need to execute a UNIX program from a ORACLE PL/SQL block

From: Roger Snowden <snowden_at_NOT.com>
Date: Tue, 22 Dec 1998 01:57:27 GMT
Message-ID: <367EFBB2.643E77C6@NOT.com>


Bottom line: Can't do that. There is no "host" command. You can, however, us an Oracle pipe with the dbms_pipe package to send a message to another session running some application code, perhaps written in "c", that in turn has access to the operating system.

This is not a trivial thing to do, but quite workable if you really need it. Typically, you need to execute the "agent" program from outside Oracle and have it get a session, then you open a pipe for read and then any other session can send it messages. Of course, a "c" program can communicate with the operating system just fine. The trigger you want to create can send the pipe message.

Some if the people at Oracle created a utility package for this sort of thing, called PLEX. You can get it from

http://govt.us.oracle.com

Look on the bottom right, under "quick picks" and select "downloadable utilities", and then "downloadable utilities" again at the top. Then you have to read the message, click "accept" and then look for PLEX toward the bottom of the page. Lots of clicks, but it is free. Naturally, it is explicitly NOT supported.

Have fun stormin' the castle!

Roger

Roger Snowden
Sr. Systems Engineering Specialist
Oracle Corporation
rsnowden_at_NOTus.oracle.com <-- to reply, remove the obvious

HAP wrote:
>
> The subject pretty much sums it up.
> I am running 7.2.2.3 and I need to run a program from within a trigger.
>
> I have tried testingthe HOST command but I get trhe following message:
> PLS-00103: Encountered the symbol "CLEAR" when expecting one of the
> following:
> := . ( @ % ;
>
> The test was a line that read:
> host clear;
Received on Mon Dec 21 1998 - 19:57:27 CST

Original text of this message

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