Ora 164
Hi ,
I have following code to insert into remote table and used autonomous transaction like below. When it called from java (XA datasource) getting followoing error - ora 164
ORA-00164: distributed autonomous transaction disallowed within migratable distributed transaction
Cause: A request was made by the application to start a distributed autonomous transaction when the application was in a migratable distributed transaction.
Action: Roll back or commit the current distributed transaction first.
My code is like belwo
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
--INSERT LOB VALUE
INSERT INTO local_work_table (MSG_TYPE_T,APPL_N,MSG_I,XML_DATA_T,STAT_C,CRTE_D,CRTE_USER_I)
VALUES (msg_type_in,app_name_in,msg_id_in,l_v_version||xml_msg_in,'N',sysdate,USER)
RETURNING ROWID
INTO l_r_rowid;
INSERT INTO Table_remote (MSG_TYPE,APP_NAME,MSG_ID,XML_DATA,STATUS,CREATE_DT,CREATED_BY)
SELECT MSG_TYPE_T,APPL_N,MSG_I,XML_DATA_T,STAT_C,CRTE_D,CRTE_USER_I FROM DSTB_MSG_OUT_W
WHERE ROWID=l_r_rowid;
DELETE FROM local_work_table ;
commit;
end;
Table_remote is remote DB insertion using DB link.
Thanks,
Sujeeth