ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 高级复制-2、准备工作

高级复制-2、准备工作

原创 Linux操作系统 作者:lirenquan 时间:2011-01-13 18:34:17 0 删除 编辑

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/,如需转载,请注明出处,否则将追究法律责任。

全部评论

注册时间:2010-12-24

  • 博文量
    24
  • 访问量
    109531