Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Call ProC from a trigger on a table

Re: Call ProC from a trigger on a table

From: <bialik_at_wis.weizmann.ac.il>
Date: Sun, 31 May 1998 09:48:49 GMT
Message-ID: <6kr921$mf6$1@nnrp1.dejanews.com>


In article <6kltit$dk1_at_romeo.logica.co.uk>,   "Antoine Hemon-Laurens" <hemona_at_logica.com> wrote:
>
> Does anyone know how to invoke a ProC script from a triggers on a table?
> 1-Is it feasible?
> 2-How should I do it?
> 3-Do you have sort of example?
>
> Thanks,
> Antoine Hemon-Laurens
>
>

Hi.
The same message was sent to you as e-mail. 1-Is it feasible?

   Yes, but be ready for troubles.
2-How should I do it?
  Are you using Oracle7 or Oracle8?
  2.1. For Oracle7 you must use package DBMS_PIPE, because there is no

       way to call ProC directly from PL/SQL code.
       You do following:
       a. Send a message from trigger to pipe using DBMS_PIPE package
          and wait until receiving an answer.
          You can get an example in Application Developer Guide ( Look
          for DBMS_PIPE package description ).
       b. A ProcC deamon process ( you have to write it ) will read
          the message from a pipe, call your ProC program as
          subroutine and return the answer to USER's pipe.
  2.2. For Oracle8 you can call C programs from PL/SQL. See PL/SQL
       manual - EXTERNAL PROCEDURES.
       Even in that case is difficult to call ProC, so I would advise
       to make all data access in trigger using PL/SQL and pass it to C
       program.


   Good luck. Michael.

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Sun May 31 1998 - 04:48:49 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US