说明:本文为Oracle GoldenGate进程模式转换指定手册
模式:抓取进程集成模式转经典模式(integrated转classic)
温馨提示:如果您发现本文哪里写的有问题或者有更好的写法请留言或私信我进行修改优化
组类型 |
模式名称 |
简要说明 |
extract |
classic(经典模式) |
在经典捕获模式下,Oracle GoldenGate Extract进程从源系统上的Oracle重做或归档日志文件或备用系统上附带的归档日志中捕获数据更改 |
integrated(集成模式) |
在集成捕获模式下,Oracle GoldenGate Extract流程与数据库日志挖掘服务器直接交互,以逻辑更改记录(LCR)的形式接收数据更改 |
|
replicate |
integrated(集成模式) |
在集成模式下,复制过程利用了Oracle数据库中可用的应用处理功能。 |
nonintegrated(非集成模式) 又叫classic(经典模式) |
在非集成模式下,复制过程是一个单线程进程,它使用标准SQL将数据应用于目标表 |
|
coordinated(协作模式) |
经典模式和协作模式之间的区别在于,复制在协作模式下是多线程的。在单个Replicat实例中,多个线程独立读取跟踪并并行应用事务。每个线程都为其分配的工作负载处理过滤,映射,转换,SQL构造和错误处理。一个协调线程协调跨线程的交易帐户的线程之间的依赖关系。 |
下图为:集成模式
下图为:经典模式
★ 知识点
/
※ 原来的trail文件可以继续使用,转换模式不涉及trail格式的更改
※ 该模式转换仅对当前进程有影响,对源端其他抓取进程、投递进程和目标端应用进程没有影响,不需要做改动
★ 集成模式环境要求
/
※ 摘要:数据库版本≥11.2.0.3,最好是≥11.2.0.4
※ 详情:
① 要支持所有Oracle数据和存储类型,源数据库的兼容性设置必须至少为11.2.0.3与Integrated Extract 11.2.x的11.2.0.3数据库特定的捆绑软件补丁(My Oracle Support文档ID 1557031.1)。要从My Oracle Support获得此补丁,请转到:https://support.oracle.com/oip/faces/secure/km/DocumentDisplay.jspx?id=1557031.1
② 要在不安装DDL支持对象的情况下支持DDL捕获,源数据库必须至少为Oracle 11.2.0.4或更高版本。对于早期的数据库版本,DDL支持对象是必需的,请参阅“ 安装基于触发器的DDL Capture”。
★ 大致步骤和命令
/
※ 向挖掘数据库反向注册提取组。除此之外,它还会删除已经创建了的日志挖掘服务器。
※ 查看OGG状态,直到状态为“is ready”后停止并进行模式切换
※ 验证对比
OGG > dblogin userid ogg,password ogg
OGG > INFO EXTRACT ex_scott DOWNGRADE
OGG > stop ex_scott
OGG > ALTER EXTRACT ex_scott DOWNGRADE INTEGRATED TRANLOG
OGG > unregister extract ex_scott database
OGG > start ex_scott
★ 常见问题
/
※ 参数不支持
提示:2020-04-17 12:25:32 ERROR OGG-10144 (ex_scott.prm) line 13: Parameter [logretention] is not valid for this configuration.
原因:集成模式不支持部分classic的参数:tranlogoptions logretention sr
※ 打补丁
提示:2020-04-17 14:48:23 ERROR OGG-02912 Patch 17030189 is required on your Oracle mining database for trail format RELEASE 12.2 or later.
原因:对于trail格式12.2或更高版本的Oracle挖掘数据库,需要使用补丁17030189
★ 操作详情
/
✔ 进入OGG并查看原始状态(集成模式)
[root@rac1 ~]# su - oggos
[oggos@rac1 ~]$ rlwrap /ogg123/ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.3.0.1.4 30547022_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 27 2019 17:52:01
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
GGSCI (rac1) > info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EX_SCOTT 00:00:10 00:00:05
EXTRACT RUNNING PU_SCOTT 00:00:00 00:00:09
GGSCI (rac1) > info *
EXTRACT EX_SCOTT Last Started 2020-04-17 15:02 Status RUNNING
Checkpoint Lag 00:00:10 (updated 00:00:07 ago)
Process ID 9133
Log Read Checkpoint Oracle Integrated Redo Logs 【集成模式的redo带“Integrated”前缀】
2020-04-17 15:11:12
SCN 0.1184429 (1184429)
EXTRACT PU_SCOTT Last Started 2020-04-17 15:02 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:01 ago)
Process ID 9134
Log Read Checkpoint File /ogg123/dirdat/es000000007
2020-04-17 15:06:41.000000 RBA 23605
✔ 执行转换
GGSCI (rac1) > dblogin userid ogg,password ogg
Successfully logged into database.
GGSCI (rac1 as ogg@rac1) > INFO EXTRACT ex_scott DOWNGRADE
Extract EX_SCOTT is ready to be downgraded from integrated capture. Archive logs corresponding to SCN 1184268 and higher must be accessible by the downgraded extract.
GGSCI (rac1 as ogg@rac1) 6> ALTER EXTRACT ex_scott DOWNGRADE INTEGRATED TRANLOG
Extract EX_SCOTT successfully downgraded from integrated capture.
GGSCI (rac1 as ogg@rac1) 7> unregister extract ex_scott database
2020-04-17 15:14:15 INFO OGG-01750 Successfully unregistered EXTRACT EX_SCOTT from database.
✔ 启动并查验
GGSCI (rac1 as ogg@rac1) > start EX_SCOTT
Sending START request to MANAGER ...
EXTRACT EX_SCOTT starting
GGSCI (rac1 as ogg@rac1) 10> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EX_SCOTT 00:00:03 00:01:23
EXTRACT RUNNING PU_SCOTT 00:00:00 00:00:04
GGSCI (rac1 as ogg@rac1) 11> info *
EXTRACT EX_SCOTT Last Started 2020-04-17 15:14 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:01 ago)
Process ID 9521
Log Read Checkpoint Oracle Redo Logs 【非集成模式的redo不带“Integrated”前缀】
First Record Seqno 24, RBA 36408848
SCN 0.1184497 (1184497)
EXTRACT PU_SCOTT Last Started 2020-04-17 15:02 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:07 ago)
Process ID 9134
Log Read Checkpoint File /ogg123/dirdat/es000000007
2020-04-17 15:06:41.000000 RBA 23605
※ 如果您觉得文章写的还不错, 别忘了在文末给作者点个赞哦 ~
over