Oracle FAQ
|
Your Portal to the Oracle Knowledge Grid
|
Home ->
Community ->
Usenet ->
c.d.o.server ->
Re: How to use dbms_pipe (or something else) to execute unix command
Re: How to use dbms_pipe (or something else) to execute unix command
- Write a stored proc, sp1, that listens on a named pipe. It will block
until data is available.
- Write another proc, sp2, that sends a message and a return pipe address to
the above pipe. The return pipe address can be from
dbms_session.unique_session_id. sp2 waits for a reply on the pipe named by
the return address.
- Write a C program using OCI that calls sp1 in an infinite loop. The OCI
call to invoke sp1 will block until a user invokes sp2 to wake the listener.
- When the OCI calling sp1 returns, fork or system your external program.
Send a reply back to sp2 on the return address.
-R. Sood
rsood_at_panix.com
Received on Thu Aug 13 1998 - 23:10:27 CDT
Original text of this message