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: notify clients on database updates

Re: notify clients on database updates

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Fri, 24 Oct 2003 09:53:58 -0700
Message-ID: <1067014454.263734@yasure>


roger wrote:

>Daniel Morgan <damorgan_at_x.washington.edu> wrote in news:1066971957.112378
>@yasure:
>
>
>
>>That was intended as two independent suggestions. Sorry if it looked
>>like step 1, step 2.
>>
>>
>>
>
>Right. Got it.
>
>My remaining question is that of whether it is possible to
>get a trigger to fire only when the transaction is committed.
>(see below)
>
>If not, then I'll probably have to go the way of writing to
>a notification table (from the update trigger, using the same
>transaction context) and then polling the table (separate process)
>to look for new rows that will show up as transactions are comitted.
>
>Any thoughts on that part?
>
>I'm not wild about the polling approach, so if there's
>any other options...
>
>
>Thanks again.
>
>
>
>>>Either way - one wrinkle I forsee is that the pipe
>>>reader will potentially be notified before the
>>>change to the table is comitted, or perhaps even rolled back.
>>>
>>>Is there any mechanism to cause a trigger like this
>>>to fire only after the transaction is comitted?
>>>
>>>I don't see it off hand.
>>>
>>>Thanks.
>>>
>>>
>>>
>>>
>>>

Triggers in Oracle are atomic just like the rest of the code. It does not work like SQL Server
where they are all independent. So ignore whether the trigger fires ... it is irrelevant. If the
code or procedure commits the actions of the trigger are commited. If they rollback they
rollback the trigger's actions too.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Fri Oct 24 2003 - 11:53:58 CDT

Original text of this message

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