單例項和RAC打造的ORACLE STREAM(三)
第三步,建立用於管理stream的使用者和對應的表空間並賦予使用者相應許可權: 主庫: SQL> create tablespace tbs_stream datafile '/home/db/oracle/10g/oradata/tbs_stream01.dbf' 2 size 100m autoextend on maxsize unlimited segment space management auto; Tablespace created. #將logminer的資料字典從system表空間轉移到新建的表空間,防止撐滿system表空間 execute dbms_logmnr_d.set_tablespace('tbs_stream'); #建立Stream管理使用者 create user strmadmin identified by strmadmin default tablespace tbs_stream temporary tablespace temp; #授權Stream管理使用者 grant connect,resource,dba,aq_administrator_role to strmadmin; begin dbms_streams_auth.grant_admin_privilege( grantee => 'strmadmin', grant_privileges => true); end; / PL/SQL procedure successfully completed. 備庫(這裡只需要在例項storm1上操作即可,之後所有提到備庫的操作都是在例項storm1上進行): SQL> create tablespace tbs_stream datafile '/dev/vgdata/rstream' 2 size 100m autoextend on maxsize unlimited segment space management auto; Tablespace created. NOTE:因為ORACLE RAC資料庫是以裸裝置方式構建的,所以在建表空間的時候要指定到對應的裸裝置,這和主庫上建表空間所指定的路徑略有不同。 SQL> execute dbms_logmnr_d.set_tablespace('tbs_stream'); PL/SQL procedure successfully completed. SQL> create user strmadmin identified by strmadmin 2 default tablespace tbs_stream temporary tablespace temp; User created. SQL> grant connect,resource,dba,aq_administrator_role to strmadmin; Grant succeeded. SQL> begin 2 dbms_streams_auth.grant_admin_privilege( 3 grantee => 'strmadmin', 4 grant_privileges => true); 5 end; 6 / PL/SQL procedure successfully completed. 第四步,修改主庫以及備庫的tnsnames.ora檔案,讓兩庫能夠互訪: 主庫: STORM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 128.199.38.27)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 128.199.38.28)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = storm) ) ) ORA = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = hpvm5)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ora) ) ) 備庫: STORM = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = hpvm1_vip)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = hpvm2_vip)(PORT = 1521)) (LOAD_BALANCE = yes) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = storm) ) ) LISTENERS_STORM = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = hpvm1_vip)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = hpvm2_vip)(PORT = 1521)) ) STORM2 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = hpvm2_vip)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = storm) (INSTANCE_NAME = storm2) ) ) STORM1 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = hpvm1_vip)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = storm) (INSTANCE_NAME = storm1) ) ) ORA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 128.199.38.32)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ora) ) ) 網路連線測試: oracle@hpvm5:/home/db/oracle/10g/network/admin$sqlplus system/oracle@storm SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 19 14:57:05 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> select instance_name from v$instance; INSTANCE_NAME ---------------- storm1 $ sqlplus system/oracle@ora SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 19 15:14:52 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, OLAP and Data Mining options SQL> select instance_name from v$instance; INSTANCE_NAME ---------------- ora |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-659947/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 單例項和RAC打造的ORACLE STREAM(完)單例Oracle
- 單例項和RAC打造的ORACLE STREAM(四)單例Oracle
- 單例項和RAC打造的ORACLE STREAM(二)單例Oracle
- 單例項和RAC打造的ORACLE STREAM(一)單例Oracle
- oracle單例項轉RACOracle單例
- Oracle DataBase單例項遷移到Oracle RACOracleDatabase單例
- oracle rac及單例項開啟歸檔Oracle單例
- Oracle 11g RAC 配置單例項 DataGuardOracle單例
- RAC起單例項make單例
- oracle單例項通過dataguard遷移到RAC 轉Oracle單例
- 單例項恢復RAC資料庫步驟(三)單例資料庫
- RAC 例項 遷移到 單例項 -- 使用RMAN Duplicate單例
- oracle 10g rac 單例項恢復至ORACLE10G RAC RMANOracle 10g單例
- RAC+DG(asm單例項)ASM單例
- rac恢復到單例項單例
- 搭建RAC到單例項DG單例
- 單例項恢復至RAC單例
- Oracle 11g RAC到單例項OGG同步Oracle單例
- RAC+單例項DG的切換單例
- rac到單例項的rman恢復單例
- oracle rac 單個例項不能生成awr報告的問題Oracle
- Oracle11g使用rman從單例項遷移到racOracle單例
- Oracle 9i RAC向單例項遷移手記Oracle單例
- oracle10g單例項遷移至3節點RACOracle單例
- Oracle 10g 安裝及單例項遷移到RACOracle 10g單例
- 單例項和RAC下建立表空間的小區別單例
- 單例項opatch出現RAC資訊單例
- OGG搭建(rac到-->單例項)單例
- RAC asm恢復到單例項ASM單例
- 從單例項資料庫轉換到RAC環境——RAC的建立和配置單例資料庫
- 判斷oracle是否是rac例項Oracle
- Oracle 11g RAC 配置單例項 DataGuard(通過 DUPLICATE 方式)Oracle單例
- 單例項環境利用備份恢復RAC資料庫(三)單例資料庫
- 單例項備份恢復成RAC單例
- rac asm 恢復到 單例項 1ASM單例
- rac asm 恢復到 單例項 2ASM單例
- RAC從帶庫到單例項的恢復單例
- ORA-29702複製RAC Oracle軟體啟動單例項Oracle單例