前言:
Ogg集成模式降级为经典模式的场景比较少,因为降级为经典模式会导致无法支持压缩表同步,XA事务,多线程模式,PDB模式同步等功能,除非遇到集成模式暂时无法解决的bug或者环境不支持集成模式,比如DG备库环境
配置介绍:
OGG软件:19.1.0.0.4
源端:
extract :ext_text
pump :pum_test
目标端:
replicat:rep_test
replicat进程降级:
1 关闭replicat进程
GGSCI> stop replicat rep_test
2 删除集成复制的参数
GGSCI> edit params rep_test
--删除
DBOPTIONS INTEGRATEDPARAMS (MAX_SGA_SIZE 100, PARALLELISM 2)
3 添加检查表
GGSCI> DBLOGIN userid ogg, password "go_20230_W506"
GGSCI> delete CHECKPOINTTABLE ogg.REP_CHKPT
GGSCI> ADD CHECKPOINTTABLE ogg.REP_CHKPT
4 修改为经典复制模式
GGSCI> ALTER REPLICAT rep_test, NONINTEGRATED, CHECKPOINTTABLE ogg.REP_CHKPT
5 启动应用进程
GGSCI> start rep_test
6 确认使用了经典模式
查看replicat进程信息已经没有没有INTEGRATED Replicat
GGSCI> info rep_test,detail
REPLICAT REP_TEST Last Started 2023-11-03 16:15 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:05 ago)
Process ID 20588
Log Read Checkpoint File /u01/ogg/dirdat/ro000000003
2023-11-03 16:24:31.583771 RBA 314432158
查询应用进程的数据字典也返回为空
GGSCI> select * from DBA_APPLY;
GGSCI> select * from DBA_GG_INBOUND_PROGRESS;
extract进程降级:
1 关闭extract进程
GGSCI> STOP EXT_TEST
2 确认当前进程是否可以进行downgrade,需要确保在downgrade之前的事务已经写入队列文件
GGSCI> DBLOGIN userid ogg, password "go_20230_W506"
GGSCI> INFO EXT_TEST DOWNGRADE
表示可以进行降级
Extract EXT_TEST is ready to be downgraded from integrated capture. Archive logs corresponding to SCN 8145010 and higher must be accessible by the downgraded extract.
3 降级extract进程
注意如果是RAC 要写对应的threads数量
GGSCI> alter EXT_TEST downgrade tranlog threads 2
Extract EXT_TEST successfully downgraded from integrated capture
4 extract取消注册到数据库
GGSCI> UNREGISTER extract EXT_TEST DATABASE
2023-11-03 16:24:22 INFO OGG-01750 Successfully unregistered EXTRACT EXT_TEST from database.
5 删除集成模式的参数,添加经典模式参数tranlogoptions
删除集成模式的参数
TRANLOGOPTIONS INTEGRATEDPARAMS (MAX_SGA_SIZE 100, PARALLELISM 2)
6 开启extract进程
GGSCI> START EXT_TEST
7 确认使用了经典模式
GGSCI> info EXT_TEST
EXTRACT EXT_TEST Last Started 2023-11-03 16:25 Status RUNNING
Checkpoint Lag 00:00:23 (updated 00:00:04 ago)
Process ID 17271
Log Read Checkpoint Oracle Redo Logs
2023-11-03 16:21:37 Thread 1, Seqno 256, RBA 2394476
SCN 0.8145013 (8145013)
Log Read Checkpoint Oracle Redo Logs
2023-11-03 16:25:14 Thread 2, Seqno 163, RBA 272912
SCN 0.8701078 (8701078)