ogg中的MV问题
来源:互联网 发布:网络视频直播设备 编辑:程序博客网 时间:2024/05/16 10:01
最近在搭建生产环境的ogg时,遇到了MVIEW的问题
If your source system has materialized views, please pay attention to the following:
Limitations of support for materialized views (MVs)
● Materialized views created WITH ROWID are not supported.
● The materialized view log can be created WITH ROWID.
● The source table must have a primary key.
● Truncates of materialized views are not supported. You can use a DELETE FROM statement.
● Some Oracle GoldenGate initial-load methods do not support LOBs in a materialized view.
● For Replicat, the materialized view must be updateable.
● Full refreshes are supported for Oracle 10g and later.
A solution is to change the materialized views “FOR UPDATE” before replicating this table.
If you don’t do this REPLICAT will abend with this message:
2011-10-15 21:14:44 WARNING OGG-00869 OCI Error ORA-01732: data manipulation operation not legal on this view (status = 1732), SQL <INSERT INTO "SCHEMA_TAR"."MV_TABEL" ("ID","STR","DATUM") VALUES (:a0,:a1,:a2)>.
You can also enable DDL support and exclude the SNAPSHOTS (if they are in your mapping):
DDL INCLUDE all, EXCLUDE OBJTYPE 'SNAPSHOT'
http://mverzijl.wordpress.com/2011/10/15/materialized-views-with-goldengate/
我测试了rowid的MV,replicat会abend,我就把MV和MV_log都mapexclude了,然后在target端重新生成日志和MV(基础表是数据一致的),未见异常。
经过测试发现,加上for update也是可以的,但是要看业务需要了。
如果有要这样做的,还希望做下实验哦
SQL> select * from ttt;
T1 T2
---------- ----------
10 2
4 2
SQL> alter table ttt modify (t1 number primary key);
SQL> create materialized view log on ttt with primary key;
SQL> create materialized view mv_ttt
build immediate
refresh fast on demand
with primary key
start with to_date('2014-12-24 23:28:50','YYYY-MM-DD HH24:MI:SS') NEXT SYSDATE + 10/1440
as
select * from ttt;
可以,没有问题
尝试rowid的for update
SQL> create table forr as select * from ttt;
SQL> create materialized view log on forr with rowid;
SQL> create materialized view mv_forr
build immediate
refresh fast on demand
with rowid
start with to_date('2014-12-24 23:28:50','YYYY-MM-DD HH24:MI:SS') NEXT SYSDATE + 10/1440
for update
as
select * from forr;
可以,没有问题
If your source system has materialized views, please pay attention to the following:
Limitations of support for materialized views (MVs)
● Materialized views created WITH ROWID are not supported.
● The materialized view log can be created WITH ROWID.
● The source table must have a primary key.
● Truncates of materialized views are not supported. You can use a DELETE FROM statement.
● Some Oracle GoldenGate initial-load methods do not support LOBs in a materialized view.
● For Replicat, the materialized view must be updateable.
● Full refreshes are supported for Oracle 10g and later.
A solution is to change the materialized views “FOR UPDATE” before replicating this table.
If you don’t do this REPLICAT will abend with this message:
2011-10-15 21:14:44 WARNING OGG-00869 OCI Error ORA-01732: data manipulation operation not legal on this view (status = 1732), SQL <INSERT INTO "SCHEMA_TAR"."MV_TABEL" ("ID","STR","DATUM") VALUES (:a0,:a1,:a2)>.
You can also enable DDL support and exclude the SNAPSHOTS (if they are in your mapping):
DDL INCLUDE all, EXCLUDE OBJTYPE 'SNAPSHOT'
http://mverzijl.wordpress.com/2011/10/15/materialized-views-with-goldengate/
我测试了rowid的MV,replicat会abend,我就把MV和MV_log都mapexclude了,然后在target端重新生成日志和MV(基础表是数据一致的),未见异常。
经过测试发现,加上for update也是可以的,但是要看业务需要了。
如果有要这样做的,还希望做下实验哦
SQL> select * from ttt;
T1 T2
---------- ----------
10 2
4 2
SQL> alter table ttt modify (t1 number primary key);
SQL> create materialized view log on ttt with primary key;
SQL> create materialized view mv_ttt
build immediate
refresh fast on demand
with primary key
start with to_date('2014-12-24 23:28:50','YYYY-MM-DD HH24:MI:SS') NEXT SYSDATE + 10/1440
as
select * from ttt;
可以,没有问题
尝试rowid的for update
SQL> create table forr as select * from ttt;
SQL> create materialized view log on forr with rowid;
SQL> create materialized view mv_forr
build immediate
refresh fast on demand
with rowid
start with to_date('2014-12-24 23:28:50','YYYY-MM-DD HH24:MI:SS') NEXT SYSDATE + 10/1440
for update
as
select * from forr;
可以,没有问题
0 0
- ogg中的MV问题
- linux中的mv命令
- ogg 遇到的问题
- OGG-03510问题处理
- OGG 字符转换问题
- Unix/Linux中的mv命令
- 详解Linux中的mv命令
- ogg sde 空间索引问题
- OGG-00665权限设置问题
- mv unzip 的选项问题
- Linux mv 重命名文件问题
- ogg
- OGG
- ogg
- OGG
- ogg
- ogg
- ogg
- 正确理解ThreadLocal
- Android Studio中增加google-service-lib
- cuda 1000 开 32 block 256 threads
- Populating Next Right Pointers in Each Node
- SQL语句中的Create
- ogg中的MV问题
- 等比例缩放图片js
- jxl的运用
- TextView实现跑马灯的效果
- 网页左右两则固定对联广告
- android 平台下,省略号为一个点,而不是3个点的解决方法
- Linux——iscsiadm基本用法
- 浅谈Ceph纠删码
- What day is it(逻辑问题)