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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Trigger on shared tables

Re: Trigger on shared tables

From: Stefan Rupp <st.rupp_at_t-online.de>
Date: Thu, 21 Aug 2003 20:34:18 +0200
Message-ID: <bi33bb$lfj$05$1@news.t-online.com>


Good evening,

Harald Maier schrieb:
> As far as I understand, waitone should be enough. But I would not use
> 'for each row' in the trigger definition and also you should think
> about Anruag's words: it might be _overkill_. The trigger will be
> executed on commit.

Okay, if a trigger with dbms_alert is considered as overkill, what other mechanisms are more appropriate? I would be grateful for suggestions.

> Here an fragment.
>
> ,----[ signal ]
> | create or replace trigger dept_aiud
> | after insert or update or delete on dept
> | begin
> | -- Needs execute rights.
> | dbms_alert.signal( 'dept_modify', 'dept is modified' );
> | end;
> | /
> `----
>
> ,----[ Test ]
> | declare
> | proc varchar2(20) := 'dept_modify';
> | msg varchar2(256);
> | stat number := 0;
> | begin
> | dbms_alert.register(proc);
> | dbms_alert.waitone(proc,msg,stat,60);
> | if stat = 0 then
> | null; -- do something
> | end if;
> | dbms_alert.remove(proc);
> | end;
> `----

Thanks. It's similar to what I tried this afternoon.

Regards,
Stefan Received on Thu Aug 21 2003 - 13:34:18 CDT

Original text of this message

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