oracle goldengate报错解决之OGG-00446、OGG-00529、OGG-00014
admin
2023-04-30 18:03:49
0

OGG测试:无法启动ext进程,报错OGG-00446


报错日志【截取重要部分】

2016-10-28 16:51:40  ERROR   OGG-00446  Missing filename opening checkpoint file.
2016-10-28 16:51:40  ERROR   OGG-01668  PROCESS ABENDING.

日志意思很明显:在打开checkpoint file 时缺少文件名

查看参数:

oracle@a-test30 dirprm]$ more ext1.prm 
UserId ogg, Password ogg
ExtTrail ./dirdat/eo
GetTruncates
TranLogOptions ExcludeUser ogg 
--DDL Include All
DDL &
INCLUDE MAPPED OBJTYPE 'table' &
INCLUDE MAPPED OBJTYPE 'index' &
EXCLUDE OPTYPE COMMENT
DDLOptions AddTranData Retryop Retrydelay 10 Maxretries 10
Table TMP.test1;
Table TMP.test2;
Table TMP.test3
[oracle@a-test30 dirprm]$ more pump1.prm 
Extract pump1
PassThru
RmtHost 192.168.10.61, MgrPort 7809
RmtTrail ./dirdat/go

Table TMP.test1;
Table TMP.test2;
Table TMP.test3;

发现ext1.prm没有文件头名

加上Extract ext1

GGSCI (a-test30 as ogg@qatest30) 27> view params ext1
Extract ext1
UserId ogg, Password ogg
ExtTrail ./dirdat/eo
GetTruncates
TranLogOptions ExcludeUser ogg 
--DDL Include All
DDL &
INCLUDE MAPPED OBJTYPE 'table' &
INCLUDE MAPPED OBJTYPE 'index' &
EXCLUDE OPTYPE COMMENT
DDLOptions AddTranData Retryop Retrydelay 10 Maxretries 10
Table TMP.test1;
Table TMP.test2;
Table TMP.test3;

再去启动又继续报错OGG-00529

016-10-28 17:02:15  ERROR   OGG-00529  DDL Replication is enabled but table goldengate.GGS_DDL_HIST is not found. Please check DDL installation in the database.
2016-10-28 17:02:15  ERROR   OGG-01668  PROCESS ABENDING.

分析:

查阅各种资料分析可能原因

根据日志可以看出DDL复制操作已经打开,但没有找到安装复制DDL执行脚本产生的表GGS.GGS_DDL_HIST导致的故障,会不会是因为安装复制DDL是使用用户ogg,执行脚本后会在该用户产生跟踪goldengate运行的表,所以要实现支持DDL操作,在参数文件中登录数据库必须使用GGDLL和对应的密码登录。

【针对rac多节点:USERID ogg@qatest30,PASSWORD ogg】

实际原因:

原因是配置源端mgr参数文件时用的是用户名和密码是ogg,且配置支持DDL复制时输入的用户名也是ogg。但目标端mgr参数文件中配置的用户名密码是goldengate,源端目标端不匹配,找不到验证信息。


解决方法:

卸载ogg,并使支持DDL功能失效

运行脚本即可

注意:一定要在ogg软件安装目录下登陆数据库,运行脚本,否则是打不开文件的~~

SQL>  @ddl_disable.sql
SP2-0310: 无法打开文件 "ddl_disable.sql"
[oracle@a-test30 softogg1]$ !sql
sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 11月 1 11:35:04 2016
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
连接到: 
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> @ddl_disable.sql
触发器已更改
SQL> @ddl_remove.sql
DDL replication removal script.
WARNING: this script removes all DDL replication objects and data.
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
Enter Oracle GoldenGate schema name:ogg
Working, please wait ...
Spooling to file ddl_remove_spool.txt
Script complete.
SQL> 
SQL> @marker_remove.sql
Marker removal script.
WARNING: this script removes all marker objects and data.
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
Enter Oracle GoldenGate schema name:ogg
PL/SQL 过程已成功完成。
序列已删除。
表已删除。

Script complete.

重新安装:

[oracle@a-test30 softogg1]$ !sql
sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 11月 1 14:44:53 2016
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
连接到: 
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> @marker_setup.sql
Marker setup script
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter Oracle GoldenGate schema name:goldengate
Marker setup table script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to GOLDENGATE
MARKER TABLE
-------------------------------
OK
MARKER SEQUENCE
-------------------------------
OK
Script complete.
SQL> @ddl_setup.sql
Oracle GoldenGate DDL Replication setup script
Verifying that current user has privileges to install DDL Replication...
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: For an Oracle 10g source, the system recycle bin must be disabled. For Oracle 11g and later, it can be enabled.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter Oracle GoldenGate schema name:goldengate
Working, please wait ...
Spooling to file ddl_setup_spool.txt
Checking for sessions that are holding locks on Oracle Golden Gate metadata tables ...
Check complete.
WARNING: Tablespace OGG does not have AUTOEXTEND enabled.
declare
*
第 1 行出现错误:
ORA-20783:
ORA-20783:
Oracle GoldenGate DDL Replication setup:
*** Please move GOLDENGATE to its own tablespace
ORA-06512: 在 line 34
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开
报错说需要将goldengate迁移到自己的表空间上
改就是了:
[oracle@a-test30 softogg1]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 11月 1 15:57:12 2016
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
连接到: 
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> 
SQL> create tablespace goldengate datafile '/oradata01/qatest30/goldengate_data_01.dbf' size 30g autoextend off;
表空间已创建。
SQL> alter user ogg default tablespace goldengate;
用户已更改。
SQL> @ddl_setup.sql
Oracle GoldenGate DDL Replication setup script
Verifying that current user has privileges to install DDL Replication...
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: For an Oracle 10g source, the system recycle bin must be disabled. For Oracle 11g and later, it can be enabled.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter Oracle GoldenGate schema name:goldengate
Working, please wait ...
Spooling to file ddl_setup_spool.txt
Checking for sessions that are holding locks on Oracle Golden Gate metadata tables ...
Check complete.
WARNING: Tablespace OGG does not have AUTOEXTEND enabled.
Using GOLDENGATE as a Oracle GoldenGate schema name.
Working, please wait ...
DDL replication setup script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to GOLDENGATE
CLEAR_TRACE STATUS:
Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
CREATE_TRACE STATUS:
Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
TRACE_PUT_LINE STATUS:
Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
INITIAL_SETUP STATUS:
Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
DDLVERSIONSPECIFIC PACKAGE STATUS:
Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
DDLREPLICATION PACKAGE STATUS:
Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
DDLREPLICATION PACKAGE BODY STATUS:
Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
DDL IGNORE TABLE
-----------------------------------
OK
DDL IGNORE LOG TABLE
-----------------------------------
OK
DDLAUX  PACKAGE STATUS:
Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
DDLAUX PACKAGE BODY STATUS:
Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
SYS.DDLCTXINFO  PACKAGE STATUS:
Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
SYS.DDLCTXINFO  PACKAGE BODY STATUS:
Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
DDL HISTORY TABLE
-----------------------------------
OK
DDL HISTORY TABLE(1)
-----------------------------------
OK
DDL DUMP TABLES
-----------------------------------
OK
DDL DUMP COLUMNS
-----------------------------------
OK
DDL DUMP LOG GROUPS
-----------------------------------
OK
DDL DUMP PARTITIONS
-----------------------------------
OK
DDL DUMP PRIMARY KEYS
-----------------------------------
OK
DDL SEQUENCE
-----------------------------------
OK
GGS_TEMP_COLS
-----------------------------------
OK
GGS_TEMP_UK
-----------------------------------
OK
DDL TRIGGER CODE STATUS:
Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
DDL TRIGGER INSTALL STATUS
-----------------------------------
OK
DDL TRIGGER RUNNING STATUS
----------------------------------------------------------------------
ENABLED
STAYMETADATA IN TRIGGER
----------------------------------------------------------------------
OFF
DDL TRIGGER SQL TRACING
----------------------------------------------------------------------
0
DDL TRIGGER TRACE LEVEL
----------------------------------------------------------------------
0
LOCATION OF DDL TRACE FILE
------------------------------------------------------------------------------------------------------------------------
/oracle/diag/rdbms/qatest30/qatest30/trace/ggs_ddl_trace.log
Analyzing installation status...
VERSION OF DDL REPLICATION
------------------------------------------------------------------------------------------------------------------------
OGGCORE_12.1.2.1.0_PLATFORMS_140727.2135.1
STATUS OF DDL REPLICATION
------------------------------------------------------------------------------------------------------------------------
SUCCESSFUL installation of DDL Replication software components
Script complete.
SQL> 
SQL> @role_setup.sql
GGS Role setup script
This script will drop and recreate the role GGS_GGSUSER_ROLE
To use a different role name, quit this script and then edit the params.sql script to change the gg_role parameter to the preferred name. (Do not run the script.)
You will be prompted for the name of a schema for the GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter GoldenGate schema name:goldengate
已写入 file role_setup_set.txt
PL/SQL 过程已成功完成。
Role setup script complete
Grant this role to each user assigned to the Extract, GGSCI, and Manager processes, by using the following SQL command:
GRANT GGS_GGSUSER_ROLE TO 
where  is the user assigned to the GoldenGate processes.
SQL> GRANT GGS_GGSUSER_ROLE to goldengate;
授权成功。
SQL> @ddl_enable.sql
触发器已更改

可以了,再去启动,报错OGG-00014

2016-11-01 17:26:46  ERROR   OGG-00014  Unrecognized parameter: chema. Parameter could be misspelled or unsupported.
2016-11-01 17:26:46  ERROR   OGG-01668  PROCESS ABENDING.
2016-11-01 17:26:46  WARNING OGG-00543  Unexpected threading library failure. Error code 16 (Device or resource busy).

报错说不能识别参数,chema,怀疑是./globals参数有问题

GGSCI (a-test30 as goldengate@qatest30) 10> view Params ./GLOBALS
chema goldengate
CheckpointTable goldengate.checkpoint
UnlockedTrailFiles

果然写错了,chema前面少东西,真是粗心。。。

重新编辑:

GGSCI (a-test30 as goldengate@qatest30) 12> view params ./GLOBALS
GGSchema goldengate
CheckpointTable goldengate.checkpoint
UnlockedTrailFiles

编辑完后需要删除checkpoint table再重新添加

GGSCI (a-test30) 5> DbLogin UserId goldengate, Password goldengate
Successfully logged into database.
GGSCI (a-test30 as goldengate@qatest30) 6> Add CheckpointTable
No checkpoint table specified. Using GLOBALS specification (goldengate.checkpoint)...
ERROR: Failed creating checkpoint table goldengate.checkpoint.
OCI Error ORA-00955: 鍚嶇О宸茬敱鐜版湁瀵硅薄浣跨敤 (status = 955), SQL .
GGSCI (a-test30 as goldengate@qatest30) 7> delete CheckpointTable
No checkpoint table specified. Using GLOBALS specification (goldengate.checkpoint)...
This checkpoint table may be required for other installations.  Are you sure you want to delete this checkpoint table? yes
Successfully deleted checkpoint table goldengate.checkpoint.
GGSCI (a-test30 as goldengate@qatest30) 8> exit
[oracle@a-test30 softogg1]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.1.2.1.0 OGGCORE_12.1.2.1.0_PLATFORMS_140727.2135.1_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Aug  7 2014 09:14:25
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
GGSCI (a-test30) 1> 
GGSCI (a-test30) 1> DbLogin UserId goldengate, Password goldengate
Successfully logged into database.
GGSCI (a-test30 as goldengate@qatest30) 2> Add CheckpointTable
No checkpoint table specified. Using GLOBALS specification (goldengate.checkpoint)...
Successfully created checkpoint table goldengate.checkpoint.

添加完成后一定要退出重新进来

启动进程,终于可以了

GGSCI (a-test30 as goldengate@qatest30) 10> info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
MANAGER     RUNNING                                           
EXTRACT     RUNNING     EXT1        00:42:42      00:00:09    
EXTRACT     RUNNING     PUMP1       00:00:00      00:42:34

总结:复制粘贴之后一定要再确认一遍没有问题,出现报错可能都是因为一些基本参数没有配置正确。












相关内容

热门资讯

烈焰熊熊,堪比“原子弹”,欧洲... 据美国有线电视新闻网(CNN)7月29日报道,席卷法国西南部的大片野火燃烧得如此猛烈,以至于形成了一...
外交部:对日本熊本县地震遇难者... 据凤凰卫视报道,针对日本熊本县发生强震造成人员伤亡,中国外交部发言人毛宁7月29日在例行记者会上表示...
高铁喧哗被劝阻后叫嚣全家体制内... “女子高铁喧哗被劝阻后叫嚣全家体制内”一事迎来官方通报。据新京报报道,7月29日,辽宁北票市公安局发...
广东专业蓝牙耳机定制厂家推荐,... 在珠三角腹地,广东早已成为全球蓝牙耳机产业链的“心脏地带”。从深圳华强北的声学元件批发,到东莞、惠州...
格雷厄姆葬礼变地缘竞价场!两大... 有些葬礼,送别的是逝者;有些葬礼,演的却是活人最现实的政治博弈。当地时间7月28日,美国老牌鹰派参议...
一道小学数学题难住3名医学博士... 3名不同学校的博士同做一道数学题,谁最厉害?近日,一陕西网友发布的视频引发热议。29日,视频发布者“...
华为全新“小艺任务”亮相:整合... 7月29日,在华为鸿蒙电脑新品技术沟通会上,终端云服务小艺业务部总裁贾永利宣布,小艺将迎来“从对话到...
广西日报特稿《王的猜想》火了,... 澎湃新闻记者 蒋子文 实习生 汤煜炜为应对外界购买纸质版特稿《王的猜想》的热情,《广西日报》宣布紧急...
月租20元内!2026年平价云... 不少手游玩家、账号运营从业者挑选云手机时,首要诉求就是低价够用,想要控制每月支出在20元以内,同时兼...
诺奖得主如何看待王虹境遇?“我... 中村修二(2014年诺贝尔物理学奖得主)【导读】近日王虹与邓煜双双获得2026年菲尔兹奖,成为了首批...