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:k...@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
Sure - the external procedure must run on the server, that's what I'm
looking for!
Regards (excuse my bad english - I'm still learning...)
Dieter Ratsch
Aside from external routines, you could also use Java Stored Procedures.
HTH,
Brian
that is an article at asktom.oracle.com in which you setup a java
stored procedure to run external commands. I am currently using it
for a few fun things and it works very well. All of the source is
there all You need to make sure of is that you have the JVM installed
on your oracle database.
Adam
Dieter Ratsch <dieter.n-o-s...@epost.de> wrote in message news:<appiub$77l$03$1...@news.t-online.com>...
Thanks Adam,
that seems to be an easy way and JVM is installed.
My application will not fire the trigger more than once per
10 minutes (i think so), so IMHO the STP looks interesting.
On the other hand a scheduled job (thanks Brian Reasland))
is more OS-independent but must start up an application
very often to see, if there is something to do.
regards
Dieter
One of the way to execute external program code after database trigger
fired is to use dbms_alert package. I like this way because database
well separated from external application. And external application
may be of any type on any languge.
To do this you should:
1. Add to database trigger procedure dbms_alert.signal
2. external application execute dbms_alert.register
3. external procedure call dbms_alers.wait in infinitive loop and wait
for signal from database.
Regards,
Michael
Brainbench MVP for Oracle Programming
http://www.brainbench.com
Dieter Ratsch <dieter.n-o-s...@epost.de> wrote in message news:<app6pj$4fg$00$1...@news.t-online.com>...