拓扑园

  • O&M
    • Universal部署
    • PHP+VUE+Laravel相关
  • Oracle性能优化
  • Oracle项目案例
    • Oracle近期项目案例(目录)
    • Oracle实战问题解析(目录)
    • Oracle数据库名变更流程(2种方式)
    • Oracle数据库目录更换流程(使用Oracle的clone工具)
    • Oracle数据库迁移方案(目录)
    • 标准化文档系列
  • Oracle基础知识
    • LLL的Oracle培训(分类)
    • LLL的docker培训(分类)
    • 标准化文档系列--(分类)
    • Oracle核心经典分析(分类)
    • 图灵小队----(分类并包含以下文章)
    • --MySQL8.0/Oracle/Memcached/Redis等安装配置于RHEL/OL6/7/8.X系列-运行环境最优配置
    • --PG安装配置于RHEL/9X系列-运行环境最优配置
    • --自动维护任务详解-开启、关闭信息统计收集(统计信息)
    • --图灵小队—Oracle/PostgreSQL下创建一个用户测试表(自行定义数据行)
    • --图灵小队-Oracle存储过程导出表的明细_UTL_FILE(文章)
    • --图灵小队-Oracle数据库删除/卸载操作指南(文章)
    • --图灵小队-Oracle常用性能查询SQL语句(文章)
    • --图灵小队-Oracle数据库上线前检查(文章)
    • --图灵小队-Oracle常用SQL语句(文章)
    • --图灵小队—Linux/Oracle脚本/MySQL合集(持续更新)
    • --图灵小队-Oracle技巧记录(文章)
    • ADG
    • RAC
    • ASM
    • OGG
    • RMAN
    • EXPDP/IMPDP
    • 工厂数据导入导出系列
  • MySQL
    • MySQL数据库规范
    • MySQL项目案例
    • MySQL安装配置
    • MYSQL集群项目
    • MySQL常见处理
    • MySQL-Sysbench专题
    • MySQL-Percona Toolkit专题
  • Linux
    • Shell编程
    • kubernetes
    • docker
    • Linux
    • PHP
    • Nginx
    • haproxy
    • mail
    • 网站
    • 域名
    • 网址收藏
  • 数据中心
    • 新框架系统集合
    • 工作文档
    • EBS数据文件扩容
    • VMware虚拟化
    • EBS系列
    • 大数据
    • SVN
    • zabbix
    • SAP
    • 备份相关
    • FC交换机
    • SVN
  • K-Studing
    • D8-Python学习
    • Oracle/MySQl等面试题
    • LG-MySQL
    • LG-Docker/K8S
    • LG-PostgreSQL
    • LG-ORACLE_BBED
    • LG-ORACLE
    • LG-Elasticsearch(ES)+ELK
    • Oracle-19C-OCP
    • WERN_ORACLE培训
    • redis数据库
    • Nginx培训学习系列
  • 其他
    • 外研英语4年级下册-听力
    • 影视系列
    • 如何使用iTunes软件通过抓包下载旧版本的ios的app
天高任鸟飞
Oracle/MySQL数据库恢复/数据迁移/生产规范报告技术交流:TEL:18562510581(微信同号);加微信入群
  1. 首页
  2. Oracle
  3. OGG
  4. 正文

Oracle GoldenGate (OGG)12c for oralce 12c/Centos 7.3 之十五——异常问题解决

2019年6月23日 3835点热度 0人点赞 0条评论

1、启动start psydb001 失败:报错:ERROR: Cannot create process '/data/u01/app/oracle/product/ogg_src/extract'. Child process is no longer alive

GGSCI (ORACLEOGG1) 2> start mgr

Manager started.

GGSCI (ORACLEOGG1) 3> start esydb001

Sending START request to MANAGER ...

ERROR: Cannot create process '/data/u01/app/oracle/product/ogg_src/extract'. Child process is no longer alive

2019-06-19 11:05:57  WARNING OGG-01742  Command sent to MGR MGR returned with an ERROR response.

2、发现需要注册:

GGSCI (ORACLEOGG1) 11> dblogin userid ogg_src,password ogg_src

Successfully logged into database.

GGSCI (ORACLEOGG1 as ogg_src@orclogg1) 12> register extract esydb001 database

2019-06-19 11:15:25  ERROR   OGG-02058  The Oracle source database is not configured properly to support integrated capture. 

The following configuration error must be fixed:  ARCHIVELOG mode must be enabled on this Oracle database.

3、发现仍然报错:ARCHIVELOG mode must be enabled on this Oracle database,需要开启archivelog   

SQL> shutdown immediate   ;

SQL> startup mount;

SQL> alter database archivelog;

SQL> alter database open;

SQL> archive log list;

   4、继续注册,仍然报错:" enable_goldengate_replication is not set to true."

GGSCI (ORACLEOGG1 as ogg_src@orclogg1) 3>  register extract esydb001 database

2019-06-19 11:26:46  ERROR   OGG-02060  The Oracle mining database is not configured properly to support integrated capture. The following configuration error must be fixed:  Operation not supported because enable_goldengate_replication is not set to true.

 SQL> alter system set  enable_goldengate_replication=true scope=both; --(源端和目标daunt都要enable)

SQL> alter system switch logfile;

5、继续注册,成功,启动也成功

GGSCI (ORACLEOGG1 as ogg_src@orclogg1) 3>  register extract esydb001 database 

GGSCI (ORACLEOGG1 as ogg_src@orclogg1) 9> start esydb001

Sending START request to MANAGER ...

EXTRACT ESYDB001 starting

GGSCI (ORACLEOGG1 as ogg_src@orclogg1) 10> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           

EXTRACT     RUNNING     ESYDB001    04:23:04      00:00:10    

EXTRACT     STOPPED     PSYDB001    00:00:00      04:01:16

6、 启动PSYDB001一直报错,还是需要enable_goldengate_replication=true并注册,

7、PSYDB001删除重建操作

GGSCI (ORACLEOGG1 as ogg_src@orclogg1) 6> delete PSYDB001

GGSCI (ORACLEOGG1) 14> ADD EXTRACT PSYDB001, EXTTRAILSOURCE /data/u01/app/oracle/product/ogg_src/dirdat/es

GGSCI (ORACLEOGG1) 15> ADD RMTTRAIL /data/u01/app/oracle/product/ogg_trg/dirdat/ps, EXTRACT PSYDB001

8、DML操作后,查看更新状态stats esydb001,提示"No active extraction maps."

 查看view params esydb001 ,参数“table ogg_src.togg;”写的是“table ogg_src.*",无法捕捉DML动作,需要查看问题

    查看trandata,是否开启了日志提取:info trandata ogg_src.*(或某张表)

    2019-07-18 14:36:58  INFO    OGG-10471  ***** Oracle Goldengate support information on table OGG_SRC.GGS_DDL_PRIMARY_KEYS ***** 

    Oracle Goldengate support native capture on table OGG_SRC.GGS_DDL_PRIMARY_KEYS.

    Oracle Goldengate marked following column as key columns on table OGG_SRC.GGS_DDL_PRIMARY_KEYS: SEQNO, COLUMN_NAME

    No unique key is defined for table OGG_SRC.GGS_DDL_PRIMARY_KEYS.

9、 Cannot create process '/data/u01/app/oracle/product/ogg_src/extract'. Child process is no longer alive,在ggserror.log的错误

    2019-07-19T10:14:28.393+0800  ERROR   OGG-00303  Oracle GoldenGate Capture for Oracle, esydb001.prm:  Unable to connect to database using user ogg_src. Ensure that the necessary privileges are granted to the user.

    Login to the database as user ogg_src failed because of error ORA-01034: ORACLE not available

      ORA-27101: shared memory realm does not exist

      Linux-x86_64 Error: 2: No such file or directory

       Additional information: 3701

       Additional information: 1851999539

       Process ID: 0

       Session ID: 0 Serial number: 0.

2019-07-19T10:14:28.393+0800  ERROR   OGG-01668  Oracle GoldenGate Capture for Oracle, esydb001.prm:  PROCESS ABENDING.

    解决:发现是edit params esydb001中的ORACLE_SID写错了,所以连不上。SETENV(ORACLE_SID="sorclogg1")改为SETENV(ORACLE_SID="orclogg1")空了

10.DDL问题:

报错:2019-07-26T09:05:05.393+0800  ERROR   OGG-00519  Oracle GoldenGate Delivery for Oracle, rsydb001.prm:  Fatal error executing DDL replication: error [Error code [1435], ORA-01435: user does not exist], no error handler present.

环境:

    源端:ogg_src

    目标端:ogg_trg

解决方法:

由于源端使用ogg_src用户执行“create tablespace tbs_test datafile '/data/u01/app/oracle/oradata/ORCLOGG1/datafile/tbs_test.dbf' size 10m;”操作,在目标端没有这个用户,需要session schema进行转换。解决办法使用:

DDLOPTIONS MAPSESSIONSCHEMA source_schema TARGET target_schema

例如:DDLOPTIONS MAPSESSIONSCHEMA ogg_src target ogg_trg


11.DDL问题:解决上述问题后,又出现如下问题:

2019-07-26T09:37:27.435+0800  ERROR   OGG-00519  Oracle GoldenGate Delivery for Oracle, rsydb001.prm:  Fatal error executing DDL replication: error [Error code [1119], ORA-01119: error in creating database file '/data/u01/app/oracle/oradata/ORCLOGG1/datafile/tbs_test.dbf' ORA-27040: file create error, unable to create file Linux-x86_64 Error: 2: No such file or directory Additional information: 1 ], no error handler present.

原因:在目标端没有路径“/data/u01/app/oracle/oradata/ORCLOGG1/datafile/”,只有”/data/u01/app/oracle/oradata/ORCLOGG2/datafile/“,临时创建ORCLOGG1路径


12.DDL问题:在OGG同步过程中,经常会碰上有创建表或表空间的同步,往往因为源和目标的平台不同,如aix->linux or linux->windows,这两个平台的表空间也经常不同,在目标端执行DDL时,可能会报错:

OGG-00495 Oracle GoldenGate Delivery for Oracle, erep5.prm: DDL error ignore for next retry: error code [DEFAULT], filter [include all (default)], error text [Error code [959], ORA-00959: tablespace 'D_724ACCESS' does not exist, SQL CREATE INDEX "OGGADM"."CUSTMER_PK" ON CUSTMER (CUST_ID) TABLESPACE D_724ACCESS /* GOLDENGATE_DDL_REPLICATION */]

针对这种情况,一般是使用DDLSUBST进行源和目标端的表空间名称替换,即在目标端先建立好目标端需要的表空间,然后在rep参数文件中添加如下语句:

DDLSUBST 'src-tablespace-name' WITH 'target-tablespace-name' INCLUDE ALL


13.双向复制出现无限循环情况(转)

一、双向复制避免数据循环复制的参数

首先说明一下循环复制,官网上的描述:

In a bidirectional configuration, SQL change s that are replicated from one system to
another must be prevented from being replicat ed back to the first system. Otherwise, it
moves back and forth in an endless loop, as in this example:
1. A user application updates a row on system A.
2. Extract extracts the row on system A and sends it to system B.
3. Replicat updates the row on system B.
4. Extract extracts the row on system B and sends it back to system A.
5. The row is applied on system A (for the second time).
6. This loop continues endlessly.
To prevent data loopback, you may need to provide instructions that:
● prevent the capture of SQL operations that are generated by Replicat, but enable the
capture of SQL operations that are generated by business applications if they contain
objects that are specified in the Extract parameter file.
● identify local Replicat transactions, in or der for the Extract process to ignore them.

意译:主端对数据的修改,被应用到了备端。但是备端在执行这个主端传递过来的数据改变时,又被备端的extract 进程
      扑获到,并且又反给主端。然后主端又给备端,这样形成了循环复制,会一直循环下去。
     
      一定要理解原因:主端执行修改数据的用户是和业务应用对应的用户(不是ogg用户),但是备端在执行主端传递过来的
      对数据修改的用户是ogg复制用户,也就是我前面配置的ogg 用户。(ogg schema)而实际上这个用户发起的对数据的修改
      只是对主端的应用,只是复制主端的事务。而不能再被作为对数据的修改,返回给主端。所以在参数文件中加入参数
      过滤掉这个用户发起的对数据的修改。
    
以oralce  数据库为例,说明参数如下:

Do either of the following to  specify the Replicat database us er. All transactions generated
by this user will be excluded from being captured. This information is available to Extract
in the transaction record.
● Identify the Replicat database user by name with the following parameter statement
in the Extract parameter file.
TRANLOGOPTIONS EXCLUDEUSER <user name>

该参数加到主端和备端的extract 参数文件中。

例如:
     
USERID ogg, PASSWORD AACAAAAAAAAAAADAHBLDCCIIOIRFNEPB, ENCRYPTKEY default
TRANLOGOPTIONS EXCLUDEUSER ogg

本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: 暂无
最后更新:2019年7月27日

admin

这个人很懒,什么都没留下

打赏 点赞
< 上一篇
下一篇 >

文章评论

您需要 登录 之后才可以评论

COPYRIGHT © 2022 拓扑园. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

鲁ICP备2021020523号

鲁ICP备2021020523号