Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> dbms_alert triggered processing
Hi Group,
I'm thinking about an efficient and elegant solution for the following problem (Oracle 9i):
I've got 3 tables that are filled once a day by some process outside of the database. I don't exactly know, when this happens, but after all 3 of them are filled up, I want some processing to take place, i.e. start up a procedure.
I thought about utilizing DBMS_ALERT for this task, that is, having a trigger on each of these tables that signals an alert. The procedure would then need to wait until all 3 of these alerts have arrived.
procedure postprocess IS
l_message varchar2(100); l_status varchar2(100); l_tab1 boolean:=false; l_tab2 boolean:=false; l_tab3 boolean:=false;
dbms_alert.waitone('my.alert', l_message, l_status); if l_message='t1' then l_tab1:=true; end if; if l_message='t2' then l_tab2:=true; end if; if l_message='t3' then l_tab3:=true; end if; if l_tab1=true and l_tab2=true and l_tab3=true then exit;
Are there better ways to handle this task? Any caveats with this solution?
Thanks,
Stephan
Received on Mon Nov 19 2007 - 11:40:25 CST
![]() |
![]() |