Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: UNIX shell command from ORACLE
I'm not sure you can have Oracle 7.3 launch a program outside of itself. However, you can write a server application (in Pro*C, say) that checks for requests to run an external application. For example, if you use dbms_pipe, a stored procedure could write the app name to the pipe. Then the external server app reads the pipe, gets the app name and launches it.
A stored procedure can call an external C function; the C function might then in turn run the app. Problem with this is the stored procedure doesn't complete until the C function returns. Maybe you could have it spawn another thread and then return.
I kinda like the first solution better because it requires very little overhead from the database server, and it's easily extensible. Make the server app multi-threaded so it can run lots of requested apps (or instances of same) simultaneously.
kestas.sereiva_at_aspentech.com wrote in article
<874660482.26474_at_dejanews.com>...
> Environment: ORACLE 7.3 on UNIX
> I want to create a trigger on the table that fires each time the UPDATE
> or the SELECT statement is executed on this table. The trigger would run
> a stored procedure, which, in turn, would launch the program on UNIX. How
> do I execute a UNIX command from a stored procedure?
Received on Fri Sep 19 1997 - 00:00:00 CDT
![]() |
![]() |