GoldenGate配置实例:RHEL 4.7下的Oracle 10g RAC到单实例的单向同步(四)

日常管理和维护


启动关闭使用start和stop ggsci命令,查看状态使用info和status命令,查看统计信息使用stats命令,注意查看discard文件和其他日志文件(比如goldengate安装目录下的ggserror.log和源端user_dump_dest下的ggs_ddl_trace.log)这里不再赘述


故障切换


在RAC环境中,最好将GoldenGate相关的二进制文件、参数文件、trail文件等都放在共享存储上。正常情况下,由其中一个节点来执行GoldenGate进程。当这个节点发生故障时,可以将GoldenGate文件所在目录重新挂载到另一个节点中,这样就可以从中断的地方继续工作。

在这个测试中,extract进程运行在rac1中,如果rac1发生了故障,rac2准备接管(相关os用户和目录应该在先前已经建好)

挂载到rac2上:
[root@rac2 ~]# mount /dev/sdg1 /opt/gg
[root@rac2 ~]# ls -l /opt/gg
total 24
drwxr-xr-x 14 goldengate oinstall 4096 Nov 28 01:57 goldengate
drwxrwxr-x 2 goldengate oinstall 16384 Nov 28 01:05 lost+found
drwxr-xr-x 2 goldengate oinstall 4096 Nov 28 01:57 trails

然后切换到goldengate用户,启动manager和extract进程

[root@rac2 ~]# su - goldengate
[goldengate@rac2 ~]$ cd /opt/gg/goldengate/
[goldengate@rac2 goldengate]$ ./ggsci

GGSCI (rac2) 1> start mgr

Manager started.

GGSCI (rac2) 2> info all

Program Status Group Lag Time Since Chkpt

MANAGER RUNNING
EXTRACT ABENDED DYEXT 00:00:00 00:01:19
EXTRACT ABENDED DYEXTDP 00:00:00 00:01:18

GGSCI (rac2) 3> start ext *

Sending START request to MANAGER ...
EXTRACT DYEXT starting

Sending START request to MANAGER ...
EXTRACT DYEXTDP starting

GGSCI (rac2) 4> info all

Program Status Group Lag Time Since Chkpt

MANAGER RUNNING
EXTRACT RUNNING DYEXT 00:00:00 00:00:01
EXTRACT ABENDED DYEXTDP 00:00:00 00:14:53

此时primary extract进程开始正常工作,data pump进程处于abended状态。这是正常的,这是因为rac1发生了节点故障,相关事务在rac2上执行回滚,但extract不能捕获到回滚动作,这些事务还存在于extract事务列表中。
默认情况下,GoldenGate会花一定的时间确认该事务(默认为10分钟),然后从列表中清除它们。然后再启动data pump进程,可以正常运行:

GGSCI (rac2) 24> start ext dyextdp

Sending START request to MANAGER ...
EXTRACT DYEXTDP starting


GGSCI (rac2) 25> info all

Program Status Group Lag Time Since Chkpt

MANAGER RUNNING
EXTRACT RUNNING DYEXT 00:00:00 00:00:02
EXTRACT RUNNING DYEXTDP 00:00:00 08:23:02


注意rac2中tnsnames.ora和listener.ora里关于ASM已经正确配置,否则extract进程会起不来。



一些错误和警告信息

错误:


OGG-00052 Oracle GoldenGate Delivery for Oracle, dyrep.prm: No replication maps specified.
replicat配置文件中必须指定map , target参数

OGG-00212 Oracle GoldenGate Delivery for Oracle, dyrep.prm: Invalid option for MAP:xxx
replicat参数中map子句语法不正确(,/等符号前加上空格)

OGG-00259 Oracle GoldenGate Delivery for Oracle, dyrep.prm: Schema name cannot be wildcarded.
replicat参数的map ,target参数中,schema不能使用通配符

dblogin登录失败:
dblogin userid goldengate,password goldengate报错 ERROR: Failed to open data source for user GOLDENGATE
以sys、system或其它具有DBA权限的用户可以使用dblogin登录,然后再登录goldengate能成功.
解决办法:授予goldengate用户select any dictionary权限


警告:

OGG-00869 Oracle GoldenGate Command Interpreter for Oracle: No unique key is defined for table xxx. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
xxx表没有唯一键,若数据库中不能对表添加主键或唯一约束,可以使用goldengate的KEYCOLS参数指定能准确标识行的列。否则该表的所有字段都将被保存到redo中用以标识更改的行。

OGG-01756 Oracle GoldenGate Command Interpreter for Oracle: Cannot register EXTRACT DYEXT with database because of the following SQL error: OCI Error ORA-06550: line 1, column 3128: PL/SQL: ORA-00942: table or view does not exist ORA-06550: line 1, column 3117: PL/SQL: SQL Statement ignored (status = 0). See Extract user privileges in the Oracle GoldenGate for Oracle Installation and Setup Guide. You can manually register this group with the REGISTER EXTRACT command.
处理方法请见“数据库方面的准备”中的“创建goldengate数据库用户”后半段




GoldenGate配置实例:RHEL 4.7下的Oracle 10g RAC到单实例的单向同步(一)

http://blog.csdn.net/wildwave/article/details/7053768

GoldenGate配置实例:RHEL 4.7下的Oracle 10g RAC到单实例的单向同步(二)

http://blog.csdn.net/wildwave/article/details/7056362

GoldenGate配置实例:RHEL 4.7下的Oracle 10g RAC到单实例的单向同步(三)

http://blog.csdn.net/wildwave/article/details/7056451

GoldenGate配置实例:RHEL 4.7下的Oracle 10g RAC到单实例的单向同步(四)
http://blog.csdn.net/wildwave/article/details/7056500


你可能感兴趣的:(oracle,数据库,manager,schema,command,Dictionary)