OGG-02064 OGG-01755 Cannot register or unregister EXTRACT错误
Nov012013
今天来测试OGG 11.2的新特性Integrated Extract模式,在注册extract进程的时候遇到OGG-02064和OGG-01755错误。
实验环境:
源端:OEL 5.7 for 32bit,oracle 10.2.0.4.0 for linux 32bit
mining端:OEL 5.7 for 32bit,oracle 11.2.0.4.0 for linux 32bit
GGSCI (mining) 1> DBLOGIN USERID ggadm1@source PASSWORD ggs123 Successfully logged into database. GGSCI (mining) 2> MININGDBLOGIN USERID ggadmcap PASSWORD ggs123 Successfully logged into mining database. GGSCI (mining) 3> REGISTER EXTRACT ext1 DATABASE 2013-10-27 23:05:31 WARNING OGG-02064 Oracle compatibility version 10.2.0.3.0 has limited datatype support for integrated capture. Version 11.2.0.3 required for full support. 2013-10-27 23:05:39 ERROR OGG-01755 Cannot register or unregister EXTRACT EXT1 because of the following SQL error: OCI Error 26,947. See Extract user privileges in the Oracle GoldenGate for Oracle Installation and Setup Guide.
分析这样的错误其实很简单,一般OGG报的错误都和数据库有关,比如这个错误,重点看的是OCI Error 26,947部分,26947其实就是ORA-26947,只需要知道ORA-26947是什么错误,就好解决了。
ORA-26947是11.2.0.4.0版本新增的错误号,通过oerr命令可以清楚的看到该错误的原因和解决方案。
[oracle@mining ogg]$ oerr ora 26947 26947, 00000, "Oracle GoldenGate replication is not enabled." // *Cause: The 'enable_goldengate_replication' parameter was not set to 'true'. // *Action: Set the 'enable_goldengate_replication' parameter to 'true' // and retry the operation. // Oracle GoldenGate license is needed to use this parameter.
原来是11.2.0.4版本的ORACLE数据库,要使用OGG需要设置enable_goldengate_replication参数为TRUE,这也是11.2.0.4版本的ORACLE数据库新增的参数,看来ORACLE数据库和OGG结合的越来越紧密了。
SQL> show parameter enable_goldengate_replication NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ enable_goldengate_replication boolean FALSE SQL> alter system set enable_goldengate_replication=true; System altered.
将enable_goldengate_replication参数为TRUE后,成功注册extract。
GGSCI (mining) 3> REGISTER EXTRACT ext1 DATABASE 2013-10-28 00:05:57 WARNING OGG-02064 Oracle compatibility version 10.2.0.3.0 has limited datatype support for integrated capture. Version 11.2.0.3 required for full support. 2013-10-28 00:06:15 INFO OGG-02003 Extract EXT1 successfully registered with database at SCN 445985.
在这段提示中可以看到,在注册extract进程时,会记录当时的SCN信息,所以这一步骤需要在OGG ADD EXTRACT…begin now过程之前,否则就会报错。