oracle远程物化视图

Posted 钱若离花落

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle远程物化视图相关的知识,希望对你有一定的参考价值。

一、创建远程物化视图日志

源端:

CREATE MATERIALIZED VIEW LOG ON tozwdb.test tablespace tozwdb_data WITH ROWID;

二、付权限

目标库

Create user tozwdb identified by tozwdb_dev;
Grant create session to tozwdb;
Grant resource to tozwdb;
Grant connect to tozwdb;
Grant unlimited tablespace to tozwdb;
Grant create database link to tozwdb;
Grant create public database link to tozwdb;
Grant create materialized view to tozwdb;
Grant select any table to tozwdb;
Grant create table to tozwdb;

查询权限:

select * from user_sys_privs t where t.privilege like upper(‘%link%‘);

三、创建DB_LINK

Create public database link db_pay connect to pay identified by pay
using ‘(DESCRIPTION= (ADDRESS_LIST=(ADDRESS = (PROTOCOL = TCP)(HOST =172.16.13.25)(port=1521)))
(CONNECT_DATA = (SERVICE_NAME= ACCOUNT )))‘;

四、创建远程物化视图

Create materialized view tozwdb.T_IF_tozwdb TABLESPACE to pay_data 
refresh fast ON DEMAND with rowid START WITH TO_DATE(‘08-02-2017 15:50:00‘, ‘DD-MM-YYYY HH24:MI:SS‘)
 NEXT SYSDATE + 1/1440 as select * from [email protected]_pay;

 














以上是关于oracle远程物化视图的主要内容,如果未能解决你的问题,请参考以下文章

物化视图

物化视图

Oracle 10g通过创建物化视图实现不同数据库间表级别的数据同步

oracle物化视图不会自动更新是怎么回事

Oracle物化视图

物化视图和普通视图的区别