Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: After-Insert-Trigger must call external application
On Wed, 30 Oct 2002 19:02:33 +0100, Dieter Ratsch
<dieter.n-o-s-p-a-m.ratsch_at_epost.de> wrote:
>Hi there,
>is it possible, to start an external application on the DB-Server after
>inserting a row???
>Example:
>I insert a row in a table. After inserting the row I would like to start
>PHP.EXE or on our NT-Web-/DB-Server.
>
>I've read and tried out several hours to build triggers and
>PL/SQL-Procedures but I'm not able to get access to the OS to start
>external programs. The HOST-command is only available in SQL*PLUS - not
>in PL/SQL - or am i wrong?
>Any hints for a bloody beginner????
>
>best regards
>Dieter (mailto:kdr_at_epost.de)
I would consider starting up php on after-insert an extremely bad idea and a sign of an application hold together by ropes and sellotape. Brrr... Are you really sure you *have* to use php and you can't do it in ordinary pl/sql. I would strongly advise you to reconsider.
That said: yes it can be done. Oracle comes with an external procedure facility (which you can look up in the doco) and for which the listener has to be configured. Just be aware, obviously, those external procedures run *on the server*, *NOT* on the client.
Hth
Sybrand Bakker, Senior Oracle DBA
To reply remove -verwijderdit from my e-mail address Received on Wed Oct 30 2002 - 14:12:30 CST