單例項和RAC打造的ORACLE STREAM(完)
第十二步,備庫下建立應用程式:
USER is "SCOTT"
SQL> conn strmadmin/strmadmin
Connected.
SQL> begin
2 dbms_streams_adm.add_schema_rules(
3 schema_name => 'scott',
4 streams_type => 'apply',
5 streams_name => 'apply_storm',
6 queue_name => 'strmadmin.storm_queue',
7 include_dml => true,
8 include_ddl => true,
9 include_tagged_lcr => false,
10 source_database => 'ora',
11 inclusion_rule => true);
12 end;
13 /
PL/SQL procedure successfully completed.
第十三步,主庫備庫分別啟動stream:
備庫:
SQL> begin
2 dbms_apply_adm.start_apply(
3 apply_name => 'apply_storm');
4 end;
5 /
PL/SQL procedure successfully completed.
主庫:
SQL> begin
2 dbms_capture_adm.start_capture(
3 capture_name => 'capture_ora');
4 end;
5 /
PL/SQL procedure successfully completed.
第十四步,測試過程:
1,主庫下以scott使用者登陸並建立一張表:
SQL> conn scott/tiger
Connected.
SQL> CREATE TABLE TTT(id NUMBER PRIMARY KEY,name VARCHAR2(50));
Table created.
2,備庫下進行檢視是否有相應表:
$ sqlplus scott/tiger
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 19 15:45:54 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> desc ttt
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER
NAME VARCHAR2(50)
storm2:
SQL> desc ttt;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER
NAME VARCHAR2(50)
3,主庫下插入資料:
SQL> insert into ttt values (1,'storm is a good guy');
1 row created.
SQL> select * from ttt;
ID NAME
---------- --------------------------------------------------
1 storm is a good guy
4,備庫下進行檢驗:
SQL> select * from ttt;
no rows selected
這時看到沒有任何資料生成,在這個地方需要注意的是,主庫插入了資料但是並沒有提交,所以備庫無法檢視資料生成結果。
5,主庫進行提交:
SQL> commit;
Commit complete.
6,備庫再次檢視:
SQL> select * from ttt;
ID NAME
---------- --------------------------------------------------
1 storm is a good guy
storm2:
SQL> select * from ttt;
ID NAME
---------- --------------------------------------------------
1 storm is a good guy
至此,整個實驗過程宣告結束。仔細對比兩次實驗可以發現,兩個單例項構建的stream和單例項、RAC構建的stream的基本步驟都是相同 的,所不同的地方只是體現在歸檔模式的設定,只要本著一個資料庫的概念,一切都能順利完成了。
全文畢。
USER is "SCOTT"
SQL> conn strmadmin/strmadmin
Connected.
SQL> begin
2 dbms_streams_adm.add_schema_rules(
3 schema_name => 'scott',
4 streams_type => 'apply',
5 streams_name => 'apply_storm',
6 queue_name => 'strmadmin.storm_queue',
7 include_dml => true,
8 include_ddl => true,
9 include_tagged_lcr => false,
10 source_database => 'ora',
11 inclusion_rule => true);
12 end;
13 /
PL/SQL procedure successfully completed.
第十三步,主庫備庫分別啟動stream:
備庫:
SQL> begin
2 dbms_apply_adm.start_apply(
3 apply_name => 'apply_storm');
4 end;
5 /
PL/SQL procedure successfully completed.
主庫:
SQL> begin
2 dbms_capture_adm.start_capture(
3 capture_name => 'capture_ora');
4 end;
5 /
PL/SQL procedure successfully completed.
第十四步,測試過程:
1,主庫下以scott使用者登陸並建立一張表:
SQL> conn scott/tiger
Connected.
SQL> CREATE TABLE TTT(id NUMBER PRIMARY KEY,name VARCHAR2(50));
Table created.
2,備庫下進行檢視是否有相應表:
$ sqlplus scott/tiger
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 19 15:45:54 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> desc ttt
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER
NAME VARCHAR2(50)
storm2:
SQL> desc ttt;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER
NAME VARCHAR2(50)
3,主庫下插入資料:
SQL> insert into ttt values (1,'storm is a good guy');
1 row created.
SQL> select * from ttt;
ID NAME
---------- --------------------------------------------------
1 storm is a good guy
4,備庫下進行檢驗:
SQL> select * from ttt;
no rows selected
這時看到沒有任何資料生成,在這個地方需要注意的是,主庫插入了資料但是並沒有提交,所以備庫無法檢視資料生成結果。
5,主庫進行提交:
SQL> commit;
Commit complete.
6,備庫再次檢視:
SQL> select * from ttt;
ID NAME
---------- --------------------------------------------------
1 storm is a good guy
storm2:
SQL> select * from ttt;
ID NAME
---------- --------------------------------------------------
1 storm is a good guy
至此,整個實驗過程宣告結束。仔細對比兩次實驗可以發現,兩個單例項構建的stream和單例項、RAC構建的stream的基本步驟都是相同 的,所不同的地方只是體現在歸檔模式的設定,只要本著一個資料庫的概念,一切都能順利完成了。
全文畢。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-659949/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 11g RAC到單例項OGG同步Oracle單例
- oracle rac 單個例項不能生成awr報告的問題Oracle
- rac恢復到單例項單例
- RAC+DG(asm單例項)ASM單例
- RAC+單例項DG的切換單例
- ORA-29702複製RAC Oracle軟體啟動單例項Oracle單例
- 記錄一次Oracle 11.2.0.4 RAC異地恢復到單例項Oracle單例
- Oracle 資料庫巡檢指令碼 單例項 RAC 輸出HTML格式Oracle資料庫指令碼單例HTML
- oracle資料庫跨平臺(AIX)從RAC恢復至(linux)下的單例項Oracle資料庫AILinux單例
- Oracle 例項和RAC叢集下資料庫日誌目錄合集Oracle資料庫
- 將RAC軟體轉換為單例項軟體單例
- ORACLE11GR2 RAC解除安裝ASM例項步驟OracleASM
- oracle之 單例項監聽修改埠Oracle單例
- 將RAC備份集恢復為單例項資料庫單例資料庫
- 單例項Primary快速搭建Standby RAC參考手冊(19.16 ADG)單例
- Oracle搭建rac到單庫的adgOracle
- jq+css+html打造下拉導航選單例項CSSHTML單例
- oracle 11g 單例項資料庫的安裝Oracle單例資料庫
- 4.1. Oracle例項Oracle
- Oracle Far Sync例項Oracle
- oracle 12c RAC安裝,例項不能多節點同時啟動Oracle
- oracle資料庫與oracle例項Oracle資料庫
- ORACLE-LINUX環境字元介面單例項安裝OracleLinux字元單例
- Oracle 11G資料庫單例項安裝Oracle資料庫單例
- 【PSU】Oracle打PSU及解除安裝PSU(單例項)Oracle單例
- MySQL和Oracle的後設資料抽取例項分析KRGXMySqlOracle
- 從nub備份恢復(同平臺)恢復RAC至單例項單例
- 多個資料庫是否可以共有一個Oracle 11g RAC例項KG資料庫Oracle
- ORACLE事務和例項恢復過程梳理Oracle
- oracle 例項表查詢Oracle
- Networker恢復oracle rac到單機Oracle
- oracle11g安裝 單例項 系統centos7Oracle單例CentOS
- 從例項出發,瞭解單例模式和靜態塊單例模式
- oracle RACOracle
- C#中WebService的建立、部署和呼叫的簡單例項C#Web單例
- 類和例項
- Oracle RAC Cache Fusion 系列十七:Oracle RAC DRMOracle
- 【Oracle】ASM例項安裝入門OracleASM
- oracle 10203啟動例項報警Oracle