Not directly. However, you may use DBMS pipes within any PL/SQL block to
output arbitrary text to a stream. You may then develop a Pro*C program
to run as a listener daemon and fork other Pro*C programs based on its
interpretation of the input stream.
These days, you need a better description of what triggers. Here goes:
Database triggers: Must communicate to another running process via dbms
pipe. That process would launch your C program.
Forms Triggers: User exits or HOST call. Also could use the dbms pipe as
above.
Yes...you must use the DBMS_PIPES (v7). Create a stored procedure that
the trigger executes. The procedure then places a set of code on a named
pipe. The C program is "listening" to this pipe for instructions. I use
it to pass UNIX system commands out to be executed.
There is a product called Oracle Plex that is supossed to enable triggers
to execute programs external to Oracle (I'm not very familiar with it). I
do not know if this product is in production; I would suggest that you
contact an Oracle sales rep and ask them to get more info on this product
(they may not be aware of it either).
Yes, there is a product called PLEX (not Oracle PLEX) that does just this.
It fully automates the creation of pipes-based application servers that,
in short, let you call any user written 3GL functions from within Oracle7
stored procedures (and hence triggers).
Note that PLEX is not a product of Oracle Corporation but was developed
by Oracle Government employees and is now available for general distribution.
For more detailed information please email a request to either
tk...@us.oracle.com or thoe...@us.oracle.com
I am not sure you got the question quite right -- he asked if he could call
a c program, not communicate with one. As to calling, the answer is no
when you refer to database triggers. But the above mentioned solution
will work if you want ot have your c program loop infinitely and check
the pipe each time through the loop :)
Hopefully the next release of PL/SQL will have a host capability.
Also, better signalling would be nice.
Jonathan, who prays for better Oracle every day :)
Well, it's not all that bad. If you do a blocking read in the loop the C
program will be asleep, and therefore not using the processor, until it
needs it.
--
Joe Halpin
jha...@netcom.com
---------------------------------------------------------------------------
>I am not sure you got the question quite right -- he asked if he could call
>a c program, not communicate with one. As to calling, the answer is no
>when you refer to database triggers. But the above mentioned solution
>will work if you want ot have your c program loop infinitely and check
>the pipe each time through the loop :)
This sounds like the C prorgram will be in a busy loop testing for a
new message on the pipe. This is not so, after the pipe process has
issued the "recieve_message" command it goes to sleep until a message
comes down the pipe.
krg.