在本文中,介绍了rac环境下配置ogg的单向同步;在配置过程中,2节点的rac数据库做为source端,单实例的数据库作为target端,下面是具体的环境介绍!
source端:
操作系统版本:rhel5.4 64bit
数据库版本:11.2.0.3 64bit
ogg版本:fbo_ggs_Linux_x64_ora10g_64bit.tar
rac数据库名:rac.yang.com
public ip:192.168.1.41/24,192.168.1.42/24
private ip:192.168.122.41/24,192.168.122.42/24
vip:192.168.1.141/24,192.168.1.142/24
scan名:rac-scan.yang.com
scan-ip:192.168.1.144/24,192.168.1.145/24,192.168.1.146/24
target端:
操作系统版本:rhel5.4 64bit
数据库版本:11.2.0.3 64bit
ogg版本:fbo_ggs_Linux_x64_ora10g_64bit.tar
数据库名:dg3.yang.com
ip:192.168.1.63/24
一:首先在两个rac节点上配置ASM动态注册,11g的监听器引入了endpoints_listener.ora文件管理
[grid@rac1 rac1]$ srvctl status listener Listener LISTENER is enabled Listener LISTENER is running on node(s): rac2,rac1 [grid@rac1 rac1]$ lsnrctl services LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 11-JUL-2012 21:09:20 Copyright (c) 1991, 2011, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 state:ready LOCAL SERVER Service "rac.yang.com" has 1 instance(s). Instance "rac1", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 state:ready LOCAL SERVER Service "racXDB.yang.com" has 1 instance(s). Instance "rac1", status READY, has 1 handler(s) for this service... Handler(s): "D000" established:0 refused:0 current:0 max:1022 state:ready DISPATCHER (ADDRESS=(PROTOCOL=tcp)(HOST=rac1.yang.com)(PORT=63054)) The command completed successfully [grid@rac1 rac1]$ cat $TNS_ADMIN/listener.ora LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent LISTENER_SCAN3=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3)))) # line added by Agent LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))) # line added by Agent LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON # line added by Agent ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3=ON # line added by Agent ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent [grid@rac1 rac1]$ cat /u01/app/11.2.0/grid/network/admin/endpoints_listener.ora LISTENER_RAC1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP) (HOST=192.168.1.41)(PORT=1521)(IP=FIRST)))) # line added by Agent [grid@rac1 rac1]$ tail -8 $TNS_ADMIN/listener.ora SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = +ASM) (ORACLE_HOME=/u01/app/11.2.0/grid) (SID_NAME = +ASM1) ) ) [grid@rac2 ~]$ tail -8 $TNS_ADMIN/listener.ora SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = +ASM) (ORACLE_HOME=/u01/app/11.2.0/grid) (SID_NAME = +ASM2) ) ) [oracle@rac1 ~]$ sqlplus sys/123456@192.168.1.41:1521/+ASM as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Wed Jul 11 21:31:30 2012 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Real Application Clusters and Automatic Storage Management options SQL> show parameter name; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_unique_name string +ASM instance_name string +ASM1 lock_name_space string service_names string +ASM SQL> conn sys/123456@192.168.1.42:1521/+ASM as sysdba Connected. SQL> show parameter name; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_unique_name string +ASM instance_name string +ASM2 lock_name_space string service_names string +ASM [oracle@rac1 admin]$ cat tnsnames.ora //节点2的tnsnames.ora文件做相应的配置 RAC = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = rac.yang.com) ) ) ASM = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.41)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = +ASM) (SID_NAME = +ASM1) ) )