Golden Gate配置实例:RHEL 4.7下的Oracle 10g RAC到单实例的单向同步

2014-11-24 18:37:38 · 作者: · 浏览: 0

goldengate版本11.1.1.0




























Database log mode Archive Mode
Automatic archival Enabled
Archive destination +RECOVERY_DG
Oldest online log sequence 120
Next log sequence to archive 121
Current log sequence 121


若处于非归档模式,则改为归档模式:
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.


SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL>











切换日志,使更改生效
SQL> alter system switch logfile;

System altered.

SQL> select supplemental_log_data_min from v$database;

SUPPLEME
--------
YES






SQL> alter system set recyclebin=off;

System altered.

SQL> show parameter recyclebin

NAME TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
recyclebin string
OFF









在源端TNSNAMES.ORA中配置ASM实例信息
vi $ORACLE_HOME/network/admin/tnsnames.ora

ORADB_ASM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = +ASM)
)
)



在源端LISTENER.ORA中配置ASM实例的相关信息
vi $ORACLE_HOME/network/admin/listener.ora

SID_LIST_LISTENER_RAC1 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = oradb)
(ORACLE_HOME = /opt/app/oracle/product/10.2.0/db_1)
(SID_NAME = oradb1)
)
(SID_DESC =
(GLOBAL_DBNAME = +ASM)
(ORACLE_HOME = /opt/app/oracle/product/10.2.0/db_1)
(SID_NAME = +ASM1)
)

)

上面是rac1中的配置,rac2中的SID_LIST_LISTENER_xxx 和SID_NAME要相应修改



重启监听
lsnrctl reload



通过sqlplus sys/xxx@oradb_asm as sysdba来连接asm实例,能连上则说明配置成功






SQL> SHOW PARAMETER NLS_TERRITORY

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
nls_territory string CHINA



SQL> SELECT name, value$ from SYS.PROPS$ WHERE name = 'NLS_CHARACTERSET';

NAME
------------------------------
VALUE$
--------------------------------------------------------------------------------
NLS_CHARACTERSET
ZHS16GBK



SQL> SHOW PARAMETER NLS_LENGTH_SEMANTICS

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
nls_length_semantics string BYTE



SQL>

设置终端的字符集:
root用户登录,源(rac1和rac2)和目标端都做
cat >>/etc/bashrc<NLS_LANG="SIMPLIFIED CHINESE_CHINA".ZHS16GBK
export NLS_LANG
EOF















建议设置如下:
UNDO_MANAGEMENT=AUTO
UNDO_RETENTION=86400
undo表空间的大小按如下公式估计设置
= * +
is the number of undo blocks.
is the value of the UNDO_RETENTION parameter (in seconds).
is the number of undo blocks for each second.
is the minimal overhead for metadata (transaction tables, etc.).
Use the system view V$UNDOSTAT to estimate and .


该步骤在源端数据库执行即可


SQL> show parameter undo


NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1


SQL> alter system set undo_retention=86400;


System altered.


将flashback any table 权限赋给extract用户


SQL> grant flashback any table to goldengate;


Grant succeeded.


SQL>