(一)OGG-03542
GGSCI (localhost.localdomain) 5> dblogin userid gguser,password gguser
2022-08-05 09:10:49 INFO OGG-03542 Failed to connect to the database. Verify that the connection string and following environment variables are correct:.
Error: OCI Error ORA (status = 12545-ORA-12545: Connect failed because target host or object does not exist
解决:
1、tnsping 发现没有问题
2、sqlplus gguser/gguser@orcl 可以登录没有发现问题
3、GGSCI (localhost.localdomain) 6> dblogin userid gguser@192.168.176.140:1521/orcl,password gguser
Successfully logged into database.
这样可以成功登录,说明环境变量配置的有问题。
在环境变量中添加了export TNS_ADMIN=/oracle/app/product/19.3.0/db_1/network/admin后,再次dblogin userid gguser@ORCL,password gguser 成功登录,问题解决。
(二)OGG-00396
GGSCI (localhost.localdomain as gguser@orcl) 20> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT STOPPED TEST_EXT 00:00:00 00:02:48
进程起不来查看ggserr.log中的日志:
2022-08-23T17:16:34.346+0800 ERROR OGG-00396 Oracle GoldenGate Capture for Oracle, test_ext.prm: Command 'TABLE' not terminated by semi-colon.
解决:edit params test_ext 的配置,发现配置文件最后没有以分号结尾,添加分号结尾并保存,报错OGG-00396解决。
(三)OGG-00303
2022-08-23T17:19:44.245+0800 ERROR OGG-00303 Oracle GoldenGate Capture for Oracle, test_ext.prm: Unable to connect to database using user gguesr@ORCL. Ensure that the necessary privileges are granted to the 2022-08-23T17:19:44.245+0800 ERROR OGG-00303 Oracle GoldenGate Capture for Oracle, test_ext.prm: Unable to connect to database using user gguesr@ORCL. Ensure that the necessary privileges are granted to the user.
Login to the database as user gguesr failed because of error ORA-12154: TNS:could not resolve the connect identifier specified.
解决:
1、SQL> exec DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE('gguser');
PL/SQL procedure successfully completed.
收集后依然报错
2、etc/hosts文件中的名字和主机名对不上,使用hostnamectl修改并和文件中对应上问题解决。
hostnamectl set-hostname ogg1
(四)OGG-02022
2022-08-24T02:10:17.201+0800 ERROR OGG-02022 Oracle GoldenGate Capture for Oracle, test_ext.prm: Logmining server does not exist on this Oracle database.
2022-08-24T02:10:17.245+0800 ERROR OGG-01668 Oracle GoldenGate Capture for Oracle, test_ext.prm: PROCESS ABENDING.
解决:
GGSCI (ogg1 as gguser@orcl) 19> register extract test_ext database
2022-08-24 17:10:13 INFO OGG-02003 Extract group TEST_EXT successfully registered with database at SCN 4728489.
(五)OGG-00662
2022-08-24T17:13:05.613+0800 ERROR OGG-00662 Oracle GoldenGate Capture for Oracle, test_ext.prm: OCI Error ORA-04031: unable to allocate bytes of shared memory ("","","","")
(status = 4031).
2022-08-24T17:13:05.767+0800 ERROR OGG-02078 Oracle GoldenGate Capture for Oracle, test_ext.prm: Extract encountered a fatal error in a processing thread and is abending.
解决:
修改数据库的相关参数解决。
(六)数据不同步
搭建完成OGG后,测试数据的同步,发现在源端插入一条数据后,目标端并没有同步过来,日志中也没有报错。
GGSCI (ogg1) 4> view param TEST_EXT
extract test_ext
userid gguser@ORCL,password gguser
exttrail /goldengate/dirdat/te <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
table test.*;
GGSCI (ogg1) 8> info TEST_P,detail
Extract TEST_P Last Started 2022-08-25 00:35 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:00 ago)
Process ID 22206
Log Read Checkpoint File /goldengate/dirdate/te000000000<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
First Record RBA 0
Target Extract Trails:
Trail Name Seqno RBA Max MB Trail Type
/goldengate/dirdat/tp 0 0 500 RMTTRAIL
Extract Source Begin End
/goldengate/dirdate/te000000000 * Initialized * First Record<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
/goldengate/dirdate/te000000000 * Initialized * First Record<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
/goldengate/dirdate/te000000000 * Initialized * First Record<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
/goldengate/dirdate/te000000000 * Initialized * First Record<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
/goldengate/dirdate/te000000000 * Initialized * First Record<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Current directory /goldengate
Report file /goldengate/dirrpt/TEST_P.rpt
Parameter file /goldengate/dirprm/test_p.prm
Checkpoint file /goldengate/dirchk/TEST_P.cpe
Process file /goldengate/dirpcs/TEST_P.pce
Error log /goldengate/ggserr.log
检查发现目录有问题,在add extract test_p,exttrailsource /goldengate/dirdat/te 时将目录写错,将TEST_P进程删除重新添加进程并重启,同步问题解决。




