码迷,mamicode.com
首页 > 数据库 > 详细

oracle远程物化视图

时间:2018-03-19 13:46:15      阅读:252      评论:0      收藏:0      [点我收藏+]

标签:art   limited   to_date   zed   lis   creat   rom   upper   test   

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

源端:

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 pay.db_pay@db_pay;

 

oracle远程物化视图

标签:art   limited   to_date   zed   lis   creat   rom   upper   test   

原文地址:https://www.cnblogs.com/ss-33/p/8601114.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!