Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Need to execute a UNIX program from a ORACLE PL/SQL block
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
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
![]() |
![]() |