高階複製-2、準備工作

lirenquan發表於2011-01-13

1、配置主體定義站點和非主體定義站點的TNSNAME配置,並測試之:
1.1、在主體定義節點,在$ORACLE_HOME/network/admin/tnsnames.ora,在檔案後面新增如下內容:
##ADVANCED REPLICATION,master definition site
MASTER_SITE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 133.37.58.154)(PORT = 1521))
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

REPLICATION_SITE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 133.37.58.107)(PORT = 1521))
    (CONNECT_DATA =
      (SERVICE_NAME = christ)
    )
  )
1.2、測試連線:
-bash-3.2$ sqlplus sys/admin@replication_site as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on 星期二 12月 7 18:52:33 2010

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production

SQL>

同樣的操作,再在非主體定義站點(複製站點)執行一次,兩個資料庫節連線沒有問題
 
2、確認主站點庫和複製站點庫是否支援高階複製(使用語句select value from v$option where parameter='Advanced replication'):
經測試,結果均為true,說明兩個庫均支援高階複製特性

3、確認初始化引數global_name為true,job_queue_processes大於0,open_links大於0
 
 主站點原值 主站點修改值 複製站點原值 複製站點修改值   
global_names false true false true   
job_queue_processes 10 50 50 50   
open_links 4 4 4 4 

4、檢視兩個庫的global_name(select * from global_names)
主站點庫:ORCL.REGRESS.RDBMS.DEV.US.ORACLE.COM,修改成master.com

SQL> select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
ORCL.REGRESS.RDBMS.DEV.US.ORACLE.COM

SQL> alter database rename global_name to master.com
    ;

Database altered.

SQL> select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
MASTER.COM

複製站點庫:CHRIST,修改成snap.com
SQL> alter database rename global_name to snap.com;

Database altered.

SQL> select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
SNAP.COM


 

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

相關文章