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: Lock with dbms_alert

Re: Lock with dbms_alert

From: Connor McDonald <mcdonald.connor.cs_at_bhp.com.au>
Date: Wed, 13 Jan 1999 17:02:16 +0800
Message-ID: <369C6118.2B9A@bhp.com.au>


Olivier Bercovitz wrote:
>
> Hello everybody,
>
> We have a problem with dbms_alert functionnality :
>
> A batch program on 1 db do a distributed insert on a table (tab_vol)
> located on a 2nd db (we us db links)
> A trigger is firing when rows are inserted in this table (tab_vol)
> and this trigger insert into another table (tab_tcf) always on the 2n
> db.
> Another trigger is firing on this table (tab_tcf) and do a dbms_alert to
> notify
> a process.
>
> Sometime we have an error for the first transaction on the first db :
> ORA-2049: timeout: distributed transaction waiting for lock
> ORA-6512: at "SYS.DBMS_ALERT", line 396
> It seems like the dbms_alert on the 2nd db is waiting for a lock
> but we don't see why ?
>
> Can someone explain me how to use dbms_alert and the role
> of the commit with this use ?
>
> Can we used dbms_alert in a trigger ?
>
> Can we replace dbms_alert by dbms_pipe, the goal is only to
> advertise a process to do something ?
>
> What the difference between dbms_pipe and dbms_alert in this case ??
>
> Thanks for your answers
>
> Regards
> Olivier

The time between when you send the alert and commit can cause blocking..since dbms_alert uses an underlying table...

dbms_pipe does not use a table but is not transactional...

For example:

if you send an alert, and then roll back - the alert never happened.. if you send a pipe, and roll back - a pipe listener will still get it..

Cheers
--



Connor McDonald
BHP Information Technology
Perth, Western Australia
"The difference between me and a madman is that I am not mad" Received on Wed Jan 13 1999 - 03:02:16 CST

Original text of this message

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