- 最后登录
- 2017-6-20
- 在线时间
- 12 小时
- 威望
- 0
- 金钱
- 110
- 注册时间
- 2013-1-14
- 阅读权限
- 10
- 帖子
- 28
- 精华
- 0
- 积分
- 0
- UID
- 865
|
1#
发表于 2016-9-23 16:34:14
|
查看: 5048 |
回复: 4
本帖最后由 zxjlqh 于 2016-9-23 16:38 编辑
RAC 双节点 11.2.0.4
Redhat5.8 64位
问题: 直接在数据库中对sd_merch_base_info做操作,会更新视图. 用管理后台插入数据后不能更新视图.
报错:
Following on-commit snapshots not refreshed :
SZT.MV_MERCH_INFO
Error 2051 trapped in 2PC on transaction 30.16.43853. Cleaning up.
Error stack returned to user:
ORA-02054:事务处理有问题30.16.43853
ORA-02051: 同一事务处理中的另一会话失败
创建物化视图sql
create materialized view mv_merch_info
refresh fast on commit as
select t.merch_id as merchId,
t.register_name as registerName,
t.name_short as nameShort,
mt.typename as merType,
mt2.typename as childType,
tsc.areaname as provice,
tsc2.areaname as region,
t.deal_time as contractDate,
te.empname as contracter,
t.status,
t.contractno,
t.merchsys_status as merchsysStatus,
t.rowid t_rowid,
mt.rowid mt_rowid,
mt2.rowid mt2_rowid,
tsc.rowid tsc_rowid,
tsc2.rowid tsc2_rowid,
te.rowid te_rowid
from sd_merch_base_info t,
sd_merch_type mt,
sd_merch_type mt2,
tsys_area_code tsc,
tsys_area_code tsc2,
tsys_employee te
where mt.typecode(+) = t.mertype
and mt2.typecode(+) = t.childtype
and tsc.areacode(+) = t.provice
and tsc2.areacode(+) = t.region
and te.empno(+) = t.contracter
|
|