亚洲AV无码乱码在线观看不卡|最新大伊香蕉精品视频在线|亚洲不卡av一区二区|国产美女无遮挡免费

登錄論壇 | 注冊會員 設為首頁 | 收藏本站
當前位置 : 首頁>軟件學院>數(shù)據(jù)庫>ORACLE>正文
 
Oracle 復制方法逐步精細

http://www.yibo1263.com 2009/10/4 8:33:02  來源:東北IT網(wǎng)  編輯:東三省
 

create user mvadmin identified by

mvadmin;

begin

dbms_repcat_admin.

grant_admin_any_schema(username=> ’mvadmin’);

end;

/

grant comment any table to mvadmin;

grant lock any table to mvadmin;

grant select any dictionary to mvadmin;

2.注冊傳播方:


begin

dbms_defer_sys.register_propagator(

username => ’mvadmin’);

end;

/

3.公共數(shù)據(jù)庫連接。需要每個復制需要創(chuàng)建三個數(shù)據(jù)庫連接。公共數(shù)據(jù)庫連接指定數(shù)據(jù)庫的全局名稱:

 

create public database link ORACLSH using ’Oracle.shanghai.

com’;

Using子句后跟的是全局數(shù)據(jù)庫名或者是連接字符串。

 

create public database link ORACLSH using ’(description=

(address=(protocol=tcp)(host=127.0.0.1)(port=1521))

(connect_data=(service_name=oracl)))’

4.建立清除延遲事務隊列調度作業(yè):


disconnect;

connect mvadmin/mvadmin@BJ;

begin

dbms_defer_sys.schedule_purge(

next_date => sysdate,

interval => ’/*1:hr*/ sysdate + 1’,

delay_seconds => 0,

rollback_segment => ’’);

end;


5.建立復制管理員mvadmin的數(shù)據(jù)庫連接:


create database link ORACLSH connect to proxy_bjOracle

identified by proxy_bjoralce

Connect to ... Identified by ...子句指明用什么用戶連接遠程數(shù)據(jù)庫

6.建立復制調度數(shù)據(jù)庫連接作業(yè):


begin

dbms_defer_sys.schedule_push(

destination => ’ora92zjk’,interval => ’/*1:hr*/ sysdate + 1’,

next_date => sysdate,stop_on_error => false,

delay_seconds => 0,parallelism => 0);

end;

/

7.授予SHORACL用戶(對應SHORACL方案)相應的權限建立實體化視圖:


disconnect;

connect system/passwd@BJ;

grant alter session to crm;

grant create cluster to crm;

grant create database link to crm;

grant create sequence to crm;

grant create session to crm;

grant create synonym to crm;

grant create table to crm;

grant create view to crm;

grant create procedure to crm;

grant create trigger to crm;

grant unlimited tablespace to crm;

grant create type to crm;

grant create any snapshot to crm;

grant alter any snapshot to crm;

8.建立復制方案的數(shù)據(jù)庫連接:


disconnect;

connect SHORACL/SHORACL@BJ;

create database link ORACLSH connect to ORACL identified

by ORACL;

復制方案的數(shù)據(jù)庫連接和復制管理員的數(shù)據(jù)庫連接要和system用戶間里的對應公共數(shù)據(jù)庫連接使用相同的名字,在調度連接時將使用公共數(shù)據(jù)庫連接中指定的數(shù)據(jù)庫全局名或者連接字符串。


9.建立實體化視圖:


disconnect;

connect mvadmin/mvadmin@BJ;

create materialized view SHORACL.CREDIT_CARD refresh fast

wit h pr imar y key as sele ct * from ORA CL.

CREDIT_CARD@ORACLSH;

@后面是數(shù)據(jù)庫連接名。如果該表沒有主鍵則使用rowid來刷新。


create materialized view SHORACL. CREDIT_CARD refresh

fast with rowid as select * from ORACL. CREDIT_CARD@ORACLSH;

10.為多個視圖建立刷新組:


begin

dbms_refresh.make (

name => ’mvadmin.sh_refresh’,list => ’’,

next_date => sysdate,interval => ’sysdate + 1’,

implicit_destroy => false,rollback_seg => ’’,

push_deferred_rpc => true,refresh_after_errors => false);

end;

本新聞共4頁,當前在第3頁  1  2  3  4  

收藏】【打印】【進入論壇
  相關文章:

·Oracle企業(yè)管理器增強對Oracle融合中間件的
·Oracle企業(yè)管理器可管理Oracle VM服務器虛擬
·新版Oracle企業(yè)管理器降低應用管理成本
·Oracle商務智能應用軟件推出新功能
·Oracle iGovernment即將亮相甲骨文大會
·‘芯’動力,新極限 甲骨文在沈陽發(fā)布全新O
·教你簡便實現(xiàn)Oracle數(shù)據(jù)庫文件移動方法
·Oracle數(shù)據(jù)庫并行處理技術詳解
·關于Oracle數(shù)據(jù)庫備份與恢復 
·Oracle密碼文件使用與維護技巧
·Oracle數(shù)據(jù)庫管理員經(jīng)常使用的表和視圖

 
 
 
最新文章

搶先蘋果,消息稱英特爾芯片采用臺積電
三星揭曉業(yè)內(nèi)首款單條 512GB DDR5 內(nèi)存
vivo 高端新機爆料:120Hz 曲面屏 + 天
vivo Y21 在印度正式上市:Helio P35 芯
微星推出 GeForce RTX 3080 Sea Hawk X
消息稱三星 Galaxy Tab S8 系列平板將放
機械革命推出 F6 輕薄本:16 英寸全面屏
英特爾 12 代 Alder Lake CPU 600 系列
雷軍:向小米手機 1 首批用戶每人贈送價
小米李明談用戶被踢出 MIUI 測試版:大

推薦文章
1
2
3
4
5
6
7
8
9
10
叛逆嫩模性感寫真
宮如敏不雅照瘋傳 看張馨予韓一菲獸獸誰
不懼孔子搶位 阿凡達游戲影音配置推薦
2015第十七屆“東北安博會”火爆招商
第十六屆東北國際公共安全防范產(chǎn)品博覽
2016年第五屆中國國際商業(yè)信息化博覽會
2016年第五屆中國國際POS機及相關設備展
互聯(lián)網(wǎng)電視熟了嗎 2013最火電視深解析
桑達獲邀出席2015中國(廣州)國際POS機
寶獲利報名參加“2015年度中國POS機行業(yè)
八卦圖解 More>>
叛逆嫩模性感寫真 宮如敏不雅照瘋傳 看張馨予韓一菲
周偉童魔鬼身材日本性感寫真圖  聯(lián)想V360筆記本模特寫真