ORA-02054 ORA-02051 同库on commit物化视图报错
967004Oct 9 2012 — edited Oct 12 2012我在用户A中创建了一个物化视图,语句如下:
create materialized view core_userprofile refresh fast on commit
as select t1.*,t1.rowid trowid,'e' mark from elearning.core_userprofile t1
union all
select t2.*,t2.rowid trowid,'s' mark from screentool.core_userprofile t2
但是程序在操作elearning.core_userprofile表时,报错,日志中看到如下信息:
Tue Oct 09 10:55:59 2012
Following on-commit snapshots not refreshed :
DATACENTER.CORE_USERPROFILE11
Error 2051 trapped in 2PC on transaction 2.1.5539. Cleaning up.
Error stack returned to user:
ORA-02054: 未决事务处理 2.1.5539
ORA-02051: 同一事务处理中的另一会话或分支失败或已完成
Tue Oct 09 10:55:59 2012
DISTRIB TRAN 44444444.A9181AE516C26D45B1D989FAD2277AAC00000000
is local tran 2.1.5539 (hex=02.01.15a3)
insert pending prepared tran, scn=7591815 (hex=0.0073d787)
Tue Oct 09 10:55:59 2012
Errors in file d:\oracle\diag\rdbms\orcl\orcl\trace\orcl_reco_1940.trc:
ORA-24756: transaction does not exist
Errors in file d:\oracle\diag\rdbms\orcl\orcl\trace\orcl_reco_1940.trc:
ORA-24756: transaction does not exist
用户elearning和screentool和用户A在同一个数据库上,却引发了分布式事务问题,不解,请高手指点指点。。。