單例項和RAC打造的ORACLE STREAM(一)

season0891發表於2010-04-16


主節點:
rx8640伺服器
HPUX 11.23作業系統
IP地址128.199.38.32
資料 庫:ORACLE 10.2.0.1
ORACLE_SID:ora
Global_name:ora
 
副節點一 (ORACLE RAC):
rx8640伺服器
HPUX 11.23作業系統
IP地址128.199.38.27
資料 庫:ORACLE 10.2.0.1
ORACLE_SID:storm1
Global_name:storm1
 
副節點二(ORACLE RAC):
rx8640伺服器
HPUX 11.23作業系統
IP地址 128.199.38.28
資料庫:ORACLE 10.2.0.1
ORACLE_SID:storm2
Global_name:storm2
 
ORACLE RAC全貌:
diyblPic
 
根據前面的介紹,此次STREAM實驗以單節點資料庫(sid為ora)和ORACLE RAC(sid分別為storm1和storm2)構建而成,前者為主庫,後者為備庫。要達到的目的是基於table級的流 (stream)複製,也就是在主庫ora上面進行的操作能瞬時間同步到ORACLE RAC。下面進行具體操作過程。
 
第一步,修改主庫和備庫的引數檔案:
主庫ora:
SQL> alter system set aq_tm_processes=2 scope=both;
SQL> alter system set global_names=true scope=both;
SQL> alter system set job_queue_processes=10 scope=both;
SQL> alter system set parallel_max_servers=20 scope=both;
SQL> alter system set undo_retention=3600 scope=both;
SQL> alter system set nls_date_format='YYYY-MM-DD HH24:MI:SS' scope=spfile;
SQL> alter system set streams_pool_size=25M scope=spfile;
SQL> alter system set utl_file_dir='*' scope=spfile;
SQL> alter system set open_links=4 scope=spfile;
 
重啟資料庫。
 
備庫storm1:
SQL> create pfile='/arch/pfilestorm.ora' from spfile;
File created.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
 
vi /arch/pfilestorm.ora
*.aq_tm_processes=2
*.global_names=true
*.job_queue_processes=10
*.parallel_max_servers=20
*.undo_retention=3600
*.nls_date_format='YYYY-MM-DD HH24:MI:SS'
*.streams_pool_size=25M
*.utl_file_dir='*'
*.open_links=4
 
SQL> startup pfile='/arch/pfilestorm.ora';
ORACLE instance started.
Total System Global Area  612368384 bytes
Fixed Size                  1995664 bytes
Variable Size             184552560 bytes
Database Buffers          423624704 bytes
Redo Buffers                2195456 bytes
Database mounted.
Database opened.
 
SQL> create spfile from pfile='/arch/pfilestorm.ora';
File created.
 
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
 
SQL> startup
ORACLE instance started.
Total System Global Area  612368384 bytes
Fixed Size                  1995664 bytes
Variable Size             184552560 bytes
Database Buffers          423624704 bytes
Redo Buffers                2195456 bytes
Database mounted.
Database opened.
 
檢視引數修改是否生效:
SQL> show parameter open_links
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
open_links                           integer     4
open_links_per_instance              integer     4
 
備庫storm2:
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup
ORACLE instance started.
Total System Global Area  612368384 bytes
Fixed Size                  1995664 bytes
Variable Size             226495600 bytes
Database Buffers          381681664 bytes
Redo Buffers                2195456 bytes
Database mounted.
Database opened.
 
檢視引數修改是否生效:
SQL> show parameter open_links
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
open_links                           integer     4
open_links_per_instance              integer     4
 
下面要開始講主庫和備庫調整為歸檔模式。
come from :

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-659945/,如需轉載,請註明出處,否則將追究法律責任。

相關文章