Insert code in Trigger causes ORA01591 lock held by in doubt transaction
Posted on 2005-04-07
We use the Oracle transparent gateway for informix to access an informix db from oracle.
This is generally working.
When I create a trigger on the oracle db and it is fired, it causes the ORA-01591 error message. It looks like there is a problem with the 2point commit phase.
Here the trigger code:
CREATE OR REPLACE TRIGGER BTO_QMAP.AI_CELLS
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
new.CELLID like '%G'
insert into "qmap_groups_cells"@IFMX_METRICA ("fk_subgroup_name","fk_user_id","cellid")
VALUES (:new.fk_subgroup_name, :new.fk_user_id, :new.cellid);
The values are inserted correctly into the informix database. But in oracle a lock is created for this dirstributed transaction. After accessing the involved table, the ORA-01591 "lock held by in-doubt transaction" is raised. After a COMMIT force 'transaction id', the lock is released.
When I execute a similar insert statement directly (not via trigger), then everything works fine.
Any ideas would be appreciated....