发布于:2021-02-04 14:10:20
0
113
0
本说明概述了将GoldenGate 12.3升级到最新18c版本(18.1.0.0.0)所遵循的步骤。
注意:
如果要从Oracle GoldenGate 11.2.1.0.0或更早版本升级,还需要通过GGSCI命令upgrade checkpoint table升级Replicat checkpoint表[所有者表]
如果我们使用基于触发器的DDL复制支持,然后需要执行其他步骤,这些步骤在下面的URL中概述的GoldenGate升级文档中有更详细的描述:https://docs.oracle.com/en/middleware/goldengate/core/18.1/upgrade/upgrading-release-oracle-database.html#GUID-9B490BE5-F0AE-44D1-B63C-F5299B9DFD16
在本例中,源数据库版本高于11.2.0.4,我们使用集成的Extract,其中DDL捕获支持集成到数据库日志挖掘服务器中。
确认没有未结和未提交的交易。
GGSCI (rac01.localdomain) 2> send ext1 showtrans
Sending SHOWTRANS request to EXTRACT EXT1 ...
No transactions found.
GGSCI (rac01.localdomain) 3> send ext1 logend
Sending LOGEND request to EXTRACT EXT1 ...
YES
停止提取(和抽水)。
GGSCI (rac01.localdomain) 5> stop extract *
Sending STOP request to EXTRACT EXT1 ...
Request processed.
Sending STOP request to EXTRACT PUMP1 ...
Request processed.
在停止Replicat之前,请确保Replicat已处理完Oracle GoldenGate跟踪中的所有当前DML和DDL数据。
发出带有STATUS选项的SEND REPLICAT命令,直到它返回“At EOF”状态,表示它已完成对trail文件中所有数据的处理。
GGSCI (rac01.localdomain) 4> send rep1 status
Sending STATUS request to REPLICAT REP1 ...
Current status: At EOF
Sequence #: 2
RBA: 1,538
0 records in current transaction.
GGSCI (rac01.localdomain) 6> stop replicat *
Sending STOP request to REPLICAT REP1 ...
Request processed.
停止管理器进程。
GGSCI (rac01.localdomain) 7> stop mgr !
Sending STOP request to MANAGER ...
Request processed.
Manager stopped.
备份源系统和目标系统上的当前Oracle GoldenGate安装目录,以及为共享文件系统(例如dirprm,dircrd,dirchk,BR,dirwlt,dirrpt等)上的集群配置安装的所有工作目录。
我们不需要备份包含跟踪文件的dirdat文件夹。
建议同时升级源环境和目标Oracle GoldenGate环境。
如果我们不是在升级源系统的同时升级目标系统上的Replicat,请将以下参数添加到提取参数文件中,以指定在目标系统上运行的Oracle GoldenGate的版本。
此参数导致Extract写入与旧版本的Replicat兼容的trail版本。
{EXTTRAIL | RMTTRAIL} file_name FORMAT RELEASE major.minor
例如:
EXTTRAIL ./dirdat/lt FORMAT RELEASE 12.3
在源和目标Goldengate环境上,都使用Oracle Universal Installer(OUI)将Oracle GoldenGate 18c(18.1.0)安装到现有的Oracle GoldenGate目录中。
注意:确保启动管理器的复选框没有勾选。
[oracle@rac01 sf_software]$ cd 181000_fbo_ggs_Linux_x64_shiphome
[oracle@rac01 181000_fbo_ggs_Linux_x64_shiphome]$ cd fbo_ggs_Linux_x64_shiphome/
[oracle@rac01 fbo_ggs_Linux_x64_shiphome]$ cd Disk1
oracle@rac01 Disk1]$ ./runInstaller
将GoldenGate软件根目录中的ulg.sql脚本作为SYSDBA执行。该脚本将现有的补充日志组转换为新版本要求的格式。
[oracle@rac01 goldengate]$ sqlplus sys as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue Jan 8 11:26:34 2019
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> @ulg.sql
Oracle GoldenGate supplemental log groups upgrade script.
Please do not execute any DDL while this script is running. Press ENTER to continue.
PL/SQL procedure successfully completed.
安装/升级完成后,通过etrolover命令更改主提取过程以及相关的数据泵提取过程,以写入新的跟踪序列号。
重新定位现有的提取泵和Replicat进程,以开始读取和处理新的trail文件。
[oracle@rac01 goldengate]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 18.1.0.0.0 OGGCORE_18.1.0.0.0_PLATFORMS_180928.0432_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Sep 29 2018 04:22:21
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
GGSCI (rac01.localdomain) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER STOPPED
EXTRACT STOPPED EXT1 00:00:00 01:13:55
EXTRACT STOPPED PUMP1 00:00:00 01:13:55
GGSCI (rac01.localdomain) 2> alter extract ext1 etrollover
2019-01-08 00:44:13 INFO OGG-01520 Rollover performed. For each affected output trail of Version 10 or higher format, after starting the source extract, issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file; it will not happen automatically.
EXTRACT altered.
GGSCI (rac01.localdomain) 3> alter extract pump1 etrollover
2019-01-08 00:44:51 INFO OGG-01520 Rollover performed. For each affected output trail of Version 10 or higher format, after starting the source extract, issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file; it will not happen automatically.
EXTRACT altered.
GGSCI (rac01.localdomain) 4> info ext1 detail
EXTRACT EXT1 Initialized 2019-01-07 14:36 Status STOPPED
Checkpoint Lag 00:00:00 (updated 00:00:53 ago)
Log Read Checkpoint Oracle Integrated Redo Logs
2019-01-07 23:29:38
SCN 0.3272690 (3272690)
Target Extract Trails:
Trail Name Seqno RBA Max MB Trail Type
./dirdat/ogg1/lt 3 0 500 EXTTRAIL
GGSCI (rac01.localdomain) 5> alter pump1 extseqno 3 extrba 0
EXTRACT altered.
GGSCI (rac01.localdomain) 6> info pump1 detail
EXTRACT PUMP1 Initialized 2019-01-08 00:45 Status STOPPED
Checkpoint Lag 00:00:00 (updated 00:00:08 ago)
Log Read Checkpoint File /acfs_oh/app/goldengate/dirdat/ogg1/lt000000003
First Record RBA 0
Target Extract Trails:
Trail Name Seqno RBA Max MB Trail Type
./dirdat/ogg2/rt 3 0 500 RMTTRAIL
GGSCI (rac01.localdomain) 7> alter rep1 extseqno 3 extrba 0
2019-01-08 00:46:08 INFO OGG-06594 Replicat REP1 has been altered. Even the start up position might be updated, duplicate suppression remains active in next startup. To override duplicate suppression, start REP1 with NOFILTERDUPTRANSACTIONS option.
REPLICAT (Integrated) altered.
在新的GoldenGate 18c环境中启动所有GoldenGate流程
GGSCI (rac01.localdomain) 8> start mgr
Manager started.
GGSCI (rac01.localdomain) 9> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT STARTING EXT1 00:00:00 00:02:06
EXTRACT STARTING PUMP1 00:00:00 00:00:50
REPLICAT STARTING REP1 00:00:00 00:00:11
GGSCI (rac01.localdomain) 10>
GGSCI (rac01.localdomain) 10> !
info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:06
EXTRACT RUNNING PUMP1 00:00:00 00:00:07
REPLICAT RUNNING REP1 00:00:00 00:00:03
作者介绍