作者 | JiekeXu
来源 |公众号 JiekeXu DBA之路(ID: JiekeXu_IT)
如需转载请联系授权 | (个人微信 ID:JiekeXu_DBA)
大家好,我是 JiekeXu,很高兴又和大家见面了,今天和大家一起来看看使用 OGG19c 迁移 Oracle11g 到 19C(第二版),欢迎点击上方蓝字“JiekeXu DBA之路”关注我的公众号,标星或置顶,更多干货第一时间到达!
先说为啥是第二版呢,这里有两个原因,一是因为第一版大概是去年这个时候写的,没有考虑到序列同步的问题,如果你的数据库使用了序列,第一版是没有配置序列实时同步的,这样就导致了迁移完成后如果不单独导入系列,业务就没法使用,所以还需要处理序列。第二个原因是因为去年写的第一版大概是因为封面图使用了 O 注册商标,还是说文章抄袭了 O 享有的著作权,被北京某德事务所投诉,微信直接删除了这篇文章并清除了我历史关键字回复功能。。。点背,没办法,我也没办法申诉,只能默默认了。下面开始正文:
前面一篇文章已经对 OGG 基础知识有了大概得掌握,今天这篇属于实战系列,如果你还没有看之前的第一篇可以点此查看 OGG 基础知识,本篇正式介绍 OGG 部署以及数据迁移和实时同步到 19c。
另外:如果你有疑问,我近期也新建了一个微信交流群,有 Oracle 原厂、第三方维保、ACE、OCM等各路大咖,微信群相比较其他社群也算比较活跃,如有需要的可添加我个人微信【JiekeXu_DBA】,备注:加群。我拉你入群,此微信群不定期限时开放,在群里你一定能学到你想要的知识。
OGG 迁移核心思想:前期部署好源端 OGG,然后利用数据泵导入导出所需业务初始化数据,然后目标端部署 OGG 基于 scn 启动通过 OGG 同步增量数据。
我的演示环境数据库信息如下:
源 端:192.168.217.86 数据库为Oracle 11204 版本,端口1521 服务名:test
目标端:192.168.217.87 数据库为Oracle 19.3 版本,端口1521 服务名:testogg
目 录
1、准备数据,源库初始化数据,创建表空间
1.1.导入到源端11g
2、安装 ogg 19.1
2.1.下载 ogg
2.2.配置环境变量
3、数据库源端(11g)相关设置
3.1.设置 enable_ogg_replication为true
3.2.添加补充日志,打开数据库的最小附加日志(数据库级别)
3.3.创建ogg表空间、用户并授权
3.4.配置 DDL 同步
3.4.1 配置 DDL 捕获说明
3.4.1早期版本 11204 之前
3.4.3 Oracle GoldenGate DDL 支持的限制
3.5.两端配置 tns
3.6.打开表级附加日志
3.7 配置 MGR
3.7.1编辑 mgr 并启动
3.8.配置 extract 抽取进程 extu1
3.9.配置extract 传输进程 dpe1
3.10.配置支持序列
4、数据库目标端(19c)相关设置
4.1.创建表空间和用户,并授权
4.2. 配置mgr进程
4.2.1.编辑 mgr 并启动
4.3.配置 replicat 进程 rep1
5. 19c目标端初始化数据
5.1.创建 db_link
5.2.查询源生产库 scn
5.3.数据泵导入数据
5.3.1.使用 dblink 初始化数据
5.4.初始化数据完成后设置
5.4.1.编译无效对象(非必须)
6、简单测试
6.1.DML 测试
6.2.DDL 测试
6.3.序列测试
附:OGG 支持从 ADG 抽取吗?
1、准备数据,源库初始化数据,创建表空间
首先准备同步需要的测试数据(非必要),创建表空间,导出数据到源端 11g。
select file_id,file_name from dba_data_files;
FILE_ID FILE_NAME
---------- ------------------------------------------------------------------
4 /u01/app/oracle/oradata/test/users01.dbf
3 /u01/app/oracle/oradata/test/undotbs01.dbf
2 /u01/app/oracle/oradata/test/sysaux01.dbf
1 /u01/app/oracle/oradata/test/system01.dbf
Create tablespace PROD_TBS datafile '/u01/app/oracle/oradata/test/prod_tbs01.dbf' size 10g;
准备要导入的数据,这里演示使用第三方库导出的数据集
nohup expdp \'/ as sysdba\' directory=PUBLIC_DUMP LOGFILE=test_prod.log dumpfile=expdp_prod-2021-07-14_%U.dmp SCHEMAS=prod COMPRESSION=ALL PARALLEL=4 CLUSTER=N
1.1.导入到源端11g
将上面的导出 dump scp 到源端 11g 的 /u01/backup
create directory expdp_dir as '/u01/backup/';
grant read,write on directory expdp_dir to public;
set linesize 9999
col OWNER for a10
col DIRECTORY_NAME for a30
col DIRECTORY_PATH for a80
select * from dba_directories;
建立表空间导入数据
Create tablespace PROD_TBS datafile '/u01/app/oracle/oradata/testogg/prod_tbs01.dbf' size 2g;
$ nohup impdp \'/ as sysdba\' directory=expdp_dir LOGFILE=imp_prod0714.log dumpfile=expdp_prod-2021-07-14_%U.dmp SCHEMAS=prod PARALLEL=4
2、安装 ogg 19.1
创建 ogg 安装目录,一般会使用 OS 用户 Oracle 作为 ogg 系统安装用户。
2.1.下载 ogg
目前 OGG 最新版本为 Oracle GoldenGate 21.3.0.0,但不是长期支持版本,我这里使用的是 Oracle GoldenGate 19.1 普通版(此版本区别于微服务版),属于长周期支持版本,下载地址如下:
进入 Oracle 官方网址 www.oracle.com
http://www.oracle.com/technetwork/middleware/goldengate/downloads/index.html
但是,官方网站下架了这个安装包,现在已经下载不到了,我这里提前下载了,有需要的可以在公众号后台回复【OGG19c】或者复制下面地址到浏览器点击下载:
https://www.modb.pro/doc/90345
官方指导手册:
https://docs.oracle.com/en/middleware/goldengate/core/19.1/index.html
https://docs.oracle.com/en/middleware/goldengate/core/19.1/oracle-db/index.html
配置参数说明
https://docs.oracle.com/en/middleware/goldengate/core/19.1/reference/index.html
使用 Oracle 用户创建软件安装目录
mkdir -p /ogg
chown -R oracle:oinstall /ogg
上传软件到 /ogg 并解压
191004_fbo_ggs_Linux_x64_shiphome.zip
unzip 191004_fbo_ggs_Linux_x64_shiphome.zip
ls -la --查看解压后文件
-rw-r--r-- 1 oracle oinstall 556240981 Jul 14 11:36 191004_fbo_ggs_Linux_x64_shiphome.zip
drwxr-xr-x 3 oracle oinstall 19 Oct 18 2019 fbo_ggs_Linux_x64_shiphome
-rw-r--r-- 1 oracle oinstall 1413 May 29 2019 OGG-19.1.0.0-README.txt
-rw-r--r-- 1 oracle oinstall 332523 Oct 21 2019 OGG_WinUnix_Rel_Notes_19.1.0.0.4.pdf
2.2.配置环境变量
环境变量如下:
vi .bash_profile
umask 022
export PS1="`whoami`@`hostname`:"'[$PWD]$'
export HOST=`hostname | cut -f1 -d"."`
export PS1='${HOST}:$PWD(${ORACLE_SID})$ '
export LANG=en_US
# +--------------------------+
# | SETUP ORACLE ENVIRONMENT |
# +--------------------------+
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=test
export OGG_HOME=/ogg
export ORACLE_TERM=xterm;
export PATH=.:$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:$OGG_HOME
export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:$OGG_HOME:/lib/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias lsnrctl='rlwrap lsnrctl'
alias asmcmd='rlwrap asmcmd'
alias adrci='rlwrap adrci'
alias ggsci='rlwrap ggsci'
alias sys='sqlplus / as sysdba'
2.3.静默安装
ogg 自 12c 以后可以图形化安装,也可以命令行安装。下面修改响应文件采用命令行静默安装。
vi /ogg/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp
只修改如下两个地方即可。
INSTALL_OPTION=ORA11g
SOFTWARE_LOCATION=/ogg
使用如下命令静默安装:
/ogg/fbo_ggs_Linux_x64_shiphome/Disk1/runInstaller -silent -responseFile /ogg/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 172958 MB Passed
Checking swap space: must be greater than 150 MB. Actual 8063 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2021-07-14_02-10-23PM. Please wait ...Ops-11gOGG-86:/ogg/fbo_ggs_Linux_x64_shiphome/Disk1(test)$ [WARNING] [INS-75003] The specified directory /ogg is not empty.
CAUSE: The directory specified /ogg contains files.
ACTION: Clean up the specified directory or enter a new directory location.
You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2021-07-14_02-10-23PM.log
WARNING:OUI-10030:You have specified a non-empty directory to install this product. It is recommended to specify either an empty or a non-existent directory. You may, however, choose to ignore this message if the directory contains Operating System generated files or subdirectories like lost+found.
Do you want to proceed with installation in this Oracle Home?
Successfully Setup Software.
The installation of Oracle GoldenGate Core was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2021-07-14_02-10-23PM.log' for more details.
cd /ogg
./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Oct 17 2019 23:13:12
Operating system character set identified as US-ASCII.
Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
GGSCI (Ops-11gOGG) 1>
如上图所示则安装成功!!!
目标端 19c 下安装:
191004_fbo_ggs_Linux_x64_shiphome.zip
目标端解压到 /u01/soft
unzip 191004_fbo_ggs_Linux_x64_shiphome.zip
编辑响应文件,也只需修改如下两行:
vi /u01/soft/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp
INSTALL_OPTION=ORA19c
SOFTWARE_LOCATION=/ogg
静默安装
/u01/soft/fbo_ggs_Linux_x64_shiphome/Disk1/runInstaller -silent -responseFile /u01/soft/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp
--等待一分钟即可安装成功。
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 171849 MB Passed
Checking swap space: must be greater than 150 MB. Actual 8062 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2021-07-14_04-09-37PM. Please wait ...Ops-19cOGG-87:/u01/soft(testogg)$ You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2021-07-14_04-09-37PM.log
Successfully Setup Software.
The installation of Oracle GoldenGate Core was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2021-07-14_04-09-37PM.log' for more details
$cd /ogg
$./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 19c on Oct 17 2019 21:16:29
Operating system character set identified as US-ASCII.
Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
3、数据库源端(11g)相关设置
3.1.设置 enable_ogg_replication为true
SQL> show parameter enable_goldengate_replication
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
enable_goldengate_replication boolean FALSE
alter system set enable_goldengate_replication=true scope=both sid='*';
SQL> alter system set enable_goldengate_replication=true scope=both sid='*';
System altered.
Elapsed: 00:00:00.00
SQL> show parameter enable_goldengate_replication
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
enable_goldengate_replication boolean TRUE
3.2.添加补充日志,打开数据库的最小附加日志(数据库级别)
SQL> select log_mode,force_logging,SUPPLEMENTAL_LOG_DATA_MIN,SUPPLEMENTAL_LOG_DATA_PK,SUPPLEMENTAL_LOG_DATA_ALL from v$database;
LOG_MODE FOR SUPPLEME SUP SUP
------------ --- -------- --- ---
ARCHIVELOG NO NO NO NO
alter database add supplemental log data;
alter database force logging;
SQL> select log_mode,force_logging,SUPPLEMENTAL_LOG_DATA_MIN,SUPPLEMENTAL_LOG_DATA_PK,SUPPLEMENTAL_LOG_DATA_ALL from v$database;
LOG_MODE FOR SUPPLEME SUP SUP
------------ --- -------- --- ---
ARCHIVELOG YES YES NO NO
3.3.创建ogg表空间、用户并授权
create tablespace ogg_tbs datafile '+DATA' size 1G autoextend on maxsize 1G; --RAC
create tablespace ogg_tbs datafile '/u01/app/oracle/oradata/test/tbs_ogg01.dbf' size 1G autoextend on maxsize 30G;
create user ogg identified by ogg default tablespace ogg_tbs;
grant connect,resource,unlimited tablespace to ogg;
grant create session,alter session,create sequence,create table to ogg;
grant select any dictionary,select any table to ogg;
grant alter any table to ogg;
grant flashback any table to ogg;
grant execute on dbms_flashback to ogg;
grant execute on utl_file to ogg;
grant select any transaction to ogg;
grant become user to ogg;
exec dbms_streams_auth.grant_admin_privilege('ogg');
3.4.配置 DDL 同步
3.4.1 配置 DDL 捕获说明
Extract 可以通过使用特殊的 DDL 触发器或本地通过 Oracle 日志挖掘服务器从源 Oracle 数据库捕获 DDL 操作。
在集成捕获模式下支持 DDL 捕获
Extract 的集成捕获模式支持两种 DDL 捕获方式:
在集成捕获模式下支持 DDL 捕获
Oracle 11.2.0.4 或更高版本:数据库 COMPATIBLE 参数设置为 11.2.0.4 或更高版本的 Oracle 数据库支持通过数据库日志挖掘服务器进行 DDL 捕获。这种方法称为原生 DDL 捕获(也称为无触发 DDL 捕获)。不需要安装触发器支持对象。本机 DDL 捕获是从多租户容器数据库捕获 DDL 的唯一受支持方法。对于下游挖掘,源数据库还必须将数据库COMPATIBLE设置为 11.2.0.4 或更高版本,以支持通过数据库日志挖掘服务器进行 DDL 捕获。
早于 11.2.0.4 的版本:COMPATIBLE参数设置为早于 11.2.0.4 的 Oracle 数据库需要使用 Oracle GoldenGate DDL 触发器。要使用基于触发器的 DDL 捕获,您必须先安装 DDL 触发器和支持的数据库对象即 跑脚本 marker_setup.sql 和 ddl_setup.sql 及 ddl_enable.sql 等,然后才能为 DDL 支持配置 Extract。
支持经典捕获模式下的 DDL 捕获
经典捕获模式需要使用 Oracle GoldenGate DDL 触发器从 Oracle 数据库捕获 DDL。经典捕获模式不支持原生 DDL 捕获。
经典捕获模式不支持从多租户容器数据库捕获 DDL。
当您使用经典捕获模式并 CREATE USER 使用 DDL 触发器复制时,触发器所有者和 Extract 登录用户必须匹配以避免尝试复制 CREATE USER 命令时出现权限错误。
要使用基于触发器的 DDL 捕获,您必须在为 DDL 支持配置 Extract 之前安装 DDL 触发器和支持的数据库对象。
3.4.1早期版本 11204 之前
根据上一节说明 compatible 参数为 11.2.0.4 之前的版本还需要跑 SQL 脚本配置 DDL,19c 则已经不需要了。我们源端环境是 11.2.0.4 但 compatible 参数小于 11.2.0.4,故需要安装 SQL 脚本支持 DDL。
cd $OGG_HOME
sqlplus / as sysdba
SQL> @marker_setup.sql;
SQL> @ddl_setup.sql;
DDL TRIGGER RUNNING STATUS
------------------------------------------------------------------------------------------------------------------------
ENABLED
STAYMETADATA IN TRIGGER
------------------------------------------------------------------------------------------------------------------------
OFF
DDL TRIGGER SQL TRACING
------------------------------------------------------------------------------------------------------------------------
0
DDL TRIGGER TRACE LEVEL
------------------------------------------------------------------------------------------------------------------------
NONE
LOCATION OF DDL TRACE FILE
------------------------------------------------------------------------------------------------------------------------
/u01/app/oracle/diag/rdbms/test/test/trace/ggs_ddl_trace.log
Analyzing installation status...
VERSION OF DDL REPLICATION
------------------------------------------------------------------------------------------------------------------------
OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054
STATUS OF DDL REPLICATION
------------------------------------------------------------------------------------------------------------------------
SUCCESSFUL installation of DDL Replication software components
Script complete.
SQL> @role_setup.sql; --按提示输入ogg用户
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:ogg
Wrote file role_setup_set.txt
PL/SQL procedure successfully completed.
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 <loggedUser>
where <loggedUser> is the user assigned to the GoldenGate processes.
SQL> grant GGS_GGSUSER_ROLE to ogg;
SQL> @ddl_enable.sql
3.4.3 Oracle GoldenGate DDL 支持的限制
1)、DDL 语句长度
2)、支持的拓扑
3)、过滤、映射和转换
4)、重命名
5)、从表中提取和 DDL 之间的交互
6)、SQL 中的注释
7)、编译错误
8)、间隔分区
9)、在 DDL 触发器内执行的 DML 或 DDL
10)、LogMiner 数据字典维护
DDL 语句长度
Oracle GoldenGate 以字节而不是字符来衡量 DDL 语句的长度。支持的长度约为 4 MB,允许一些内部开销的大小取决于受影响对象的名称及其 DDL 类型,以及其他特征。如果 DDL 长于支持的大小,Extract 将发出警告并忽略 DDL 操作。
如果 Extract 正在通过 DDL 触发器捕获 DDL,则忽略的 DDL 将保存在标记表中。您可以使用ddl_ddl2file.sql脚本捕获被忽略的 Oracle DDL 语句以及任何其他 Oracle DDL 语句,该脚本将 DDL 操作保存到 USER_DUMP_DEST Oracle 目录中的文本文件中。该脚本提示输入以下内容:
包含在 GLOBALS 文件中指定的 Oracle GoldenGate DDL 对象的模式的名称。
Oracle GoldenGate 标记序列号,当在 Extract 参数文件中使用 DDLOPTIONS 该REPORT 选项时,它会记录在 Extract 报告文件中。
支持的拓扑
Oracle GoldenGate 仅在同类配置中支持 DDL 同步。源和目标对象定义必须相同。
DDL 复制仅支持 Oracle 到 Oracle 复制。它在不同的数据库之间不受支持,例如 Oracle 到 Teradata,或 SQL Server 到 Oracle。
Oracle GoldenGate 不支持备用数据库上的 DDL。
Oracle GoldenGate 在所有受支持的单向配置中以及在两个且仅两个系统之间的双向配置中支持 DDL 复制。
其余八项可查看官方文档,这里不在赘述。
3.5.两端配置 tns
注意要是多实例需要配置 tns 登录创建的 ogg 用户,19c PDB 也需要 tns 登录到相应的数据库。示例如下:
vi /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
TEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.217.86)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test)
)
)
3.6.打开表级附加日志
cd $OGG_HOME
./ggsci
dblogin userid ogg,password ogg --注意要是多实例需要配置 tns 登录创建的 ogg 用户
例:dblogin userid ogg@tns配置名字 ,password ogg
ADD TRANDATA PROD.* --注意不要加分号
ADD TRANDATA scott.*
ADD TRANDATA EASYC_READ.*
--查看附加日志是否添加成功
info TRANDATA scott.*
info TRANDATA PROD.*
info TRANDATA EASYC_READ.*
3.7 配置 MGR
create subdirs 创建 GG 工作目录
GGSCI (Ops-11gOGG as ogg@test) 6> create subdirs
Creating subdirectories under current directory /ogg
Parameter file /ogg/dirprm: created.
Report file /ogg/dirrpt: created.
Checkpoint file /ogg/dirchk: created.
Process status files /ogg/dirpcs: created.
SQL script files /ogg/dirsql: created.
Database definitions files /ogg/dirdef: created.
Extract data files /ogg/dirdat: created.
Temporary files /ogg/dirtmp: created.
Credential store files /ogg/dircrd: created.
Masterkey wallet files /ogg/dirwlt: created.
Dump files /ogg/dirdmp: created.
3.7.1编辑 mgr 并启动
edit param mgr
port 7809
DYNAMICPORTLIST 7810-7829
userid ogg@TEST, PASSWORD ogg
AUTOSTART EXTRACT *
AUTORESTART EXTRACT *
PURGEOLDEXTRACTS /ogg/dirdat/*,usecheckpoints, minkeepdays 8
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45
ACCESSRULE, PROG *, IPADDR 192.*.*.*, PRI 1, ALLOW
PORT: 指定 Manager 使用的端口。
Dynamicportliist:配置了捕获和复制进程使用的端口范围。
AUTORESTART: 参数使抽取/复制进程失败后自动重启。
PURGEOLDEXTRACTS 参数指定:当根据 checkpoint 发现已经完成抽取和复制的 trail 文件将被自动删除,但保留最近 10 个。
Purgeddlhistory 和 purgemarkerhistory 分别删除历史 DDL 历史表和 marker 表中的过期数据,以控制他们呢不会过于庞大。
GGSCI (Ops-11gOGG as ogg@test) 8> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER STOPPED
GGSCI (Ops-11gOGG as ogg@test) 9>
GGSCI (Ops-11gOGG as ogg@test) 9> start mgr
Manager started.
GGSCI (Ops-11gOGG as ogg@test) 10> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
3.8.配置 extract 抽取进程 extu1
GGSCI (Ops-11gOGG as ogg@test) 14> add extract extu1, TRANLOG, BEGIN NOW
--RAC配置启动会报错
add extract ext1, TRANLOG, BEGIN NOW, THREADS 4 --(主库有四组日志)
--add extract ext1, TRANLOG, BEGIN 2021-08-17 21:00:56, THREADS 4
select distinct thread# from v$log;
select to_char(scn_to_timestamp(9035744263), 'yyyy-mm-dd hh24:mi:ss') scndate from dual;
SELECT TO_CHAR(MIN(start_scn) ) AS "Please select the minimumSCN" FROM v$transaction
UNION ALL SELECT TO_CHAR(current_scn) FROM v$database;
GGSCI (Ops-11gOGG as ogg@test) 14> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT STOPPED EXTU1 00:00:00 00:00:08
GGSCI (Ops-11gOGG as ogg@test) 15> add exttrail /ogg/dirdat/ss, extract extu1, megabytes 1024
EXTTRAIL added.
GGSCI (Ops-11gOGG as ogg@test) 16> edit param extu1
EXTRACT extu1
setenv (NLS_LANG=AMERICAN_AMERICA.AL32UTF8)
setenv (ORACLE_SID=test)
setenv (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
setenv (TNS_ADMIN=/u01/app/oracle/product/11.2.0/dbhome_1/network/admin)
userid ogg@TEST, password ogg
REPORTCOUNT EVERY 30 MINUTES, RATE
DISCARDFILE /ogg/dirrpt/extu_ss.dsc, APPEND, MEGABYTES 1024
DISCARDROLLOVER AT 9:00
EXTTRAIL /ogg/dirdat/ss
GETTRUNCATES
--DYNAMICRESOLUTION
TRANLOGOPTIONS EXCLUDEUSER ogg
NOCOMPRESSUPDATES
NOCOMPRESSDELETES
GETUPDATEBEFORES
STATOPTIONS REPORTFETCH
DDL INCLUDE ALL
DDLOPTIONS ADDTRANDATA
DDLOPTIONS REPORT
table PROD.*;
table SCOTT.*;
参数说明:
GETUPDATEBEFORES:是否在队列中写入后镜像,也可进行维护事务历史表。默认是复制;
GETTRUNCATES:是否在队列中进行复制 truncate 操作, 默认是不复制;
BR BRINTERVAL:对于存在长事务恢复情况下,恢复到检查点时间界限;
CACHEMGR CACHESIZE:主要用于控制存放未提交事务的虚拟内存和文件缓存空间;
WARNLONGTRANS:长事务警告频率, 用于收集监控长事务情况;
CHECKINTERVAL:同样也是作为长事务 WARNLONGTRANS 监控频率;
#频率格式
S|SEC|SECS|SECOND|SECONDS
M|MIN|MINS|MINUTE|MINUTES
H|HOUR|HOURS
D|DAY|DAYS
NUMFILES: 控制用于存储Oracle GoldenGate有关需要处理和map 表的信息的内存的初始分配,类似于缓存数目;
EOFDELAYCSECS:控制extract进程在数据源检查新数据的频度;
TRANLOGOPTIONS DBLOGREADER:该参数用于直接访问重做日志和归档日志,不需要通过连接到ASM 实例访问;
TRANLOGOPTIONS MINEFROMACTIVEDG:该参数用于从ADG 中读取到日志信息;
TRANLOGOPTIONS PURGEORPHANEDTRANSACTIONS;清除孤立的事务。解释:通过将其启动时间与节点的启动时间进行比较,事务在清除之前被验证为孤立的; 如果交易开始较早,则会被清除;
TRANLOGOPTIONS _DISABLESTREAMLINEDDBLOGREADER:这个参数在11.2.1.0.26以后才有,用于DBLOGREADER模式下,处理一些异常丢失事务的情况;
DYNAMICRESOLUTION:extract 进程启动后, 快速处理指定的表和map(开启这个参数,遇到记录中的表是才加载表的源数据到内存中);
Discardfile:指定discard 目录, 用于记录无法处理的日志信息 。
LOGALLSUPCOLS:该参数为 extract capture 进程记录补充日志中 update 和 delete 操作前的镜像信息。
启动 extu1 捕获进程
start extu1
如果启动后有报错,view report extu1 可查看错误日志,检查相关参数和按提示修改。
3.9.配置extract 传输进程 dpe1
GGSCI (Ops-11gOGG as ogg@test) 18> add extract dpe1, exttrailsource /ogg/dirdat/ss
EXTRACT added.
GGSCI (Ops-11gOGG as ogg@test) 19> add rmttrail /ogg/dirdat/ss, EXTRACT dpe1, MEGABYTES 1024
RMTTRAIL added.
GGSCI (Ops-11gOGG as ogg@test) 20> edit param dpe1
EXTRACT dpe1
DYNAMICRESOLUTION
PASSTHRU
RMTHOST 192.168.217.87, MGRPORT 7809, COMPRESS
RMTTRAIL /ogg/dirdat/ss
TABLE scott.*;
TABLE prod_scfop.*;
参数说明:PASSTHRU:不登录到数据库操作(数据投递不必登录数据库)
DYNAMICRESOLUTION:动态解析
Rmthost:远端主机(IP 或者主机名解析)
Rmttrail:目标端 trail 文件存储位置以及名称
启动投递进程 dpe1(目标端 MGR 需要先启动)
start dpe1
如果启动后有报错,view report dpe1 可查看错误日志,检查相关参数和按提示修改。
3.10.配置支持序列
1)在配置支持 DDL 的前提下,需要对 OGG 给予 DBA 权限。
CREATE USER OGG IDENTIFIED BY password;
GRANT CONNECT, RESOURCE, DBA TO OGG;
2)然后 ggsci登录 OGG
EDIT PARAMS ./GLOBALS
在文件中,输入下列参数并指定您之前在此过程中创建的 DDL 用户。
GGSCHEMA ogg
3)运行 sequence.sql
在源和目标两个系统上的 SQL*Plus 中,从 Oracle GoldenGate 安装目录的根目录运行脚本 sequence.sql。这个脚本创建了一些供 Oracle GoldenGate 进程使用的过程。(不要自己运行它们,系统将提示您输入用户信息,您在第一步中创建的用户,我这里是 OGG)
SQL> @sequence.sql
Elapsed: 00:00:00.07
Please enter the name of a schema for the GoldenGate database objects:
OGG
Setting schema name to OGG
Elapsed: 00:00:00.07
Elapsed: 00:00:00.84
Elapsed: 00:00:00.08
Elapsed: 00:00:00.26
Elapsed: 00:00:00.09
UPDATE_SEQUENCE STATUS:
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
Elapsed: 00:00:00.11
GETSEQFLUSH
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
Elapsed: 00:00:00.04
SEQTRACE
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
Elapsed: 00:00:00.03
REPLICATE_SEQUENCE STATUS:
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
Elapsed: 00:00:00.04
STATUS OF SEQUENCE SUPPORT
--------------------------------------------------------------
SUCCESSFUL installation of Oracle Sequence Replication support
4)在源系统上的 SQL*Plus中,将该过程的权限授予可用于发出命令的数据库用户。记住或记录这个用户。在发出调用该过程的命令之前登录到数据库。
eg:GRANT EXECUTE on DDLuser.updateSequence TO DBLOGINuser;
GRANT EXECUTE on ogg.updateSequence TO ogg;
5)在目标系统上的 SQL*Plus 中,将该过程的权限授予 Replicat 数据库用户
eg:GRANT EXECUTE on DDLuser.replicateSequence TO Replicatuser;
GRANT EXECUTE on ogg.replicateSequence TO ogg;
6)在源系统的SQLPlus中,在SQLPlus中发出以下语句
ALTER TABLE sys.seq$ ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
注意:如果是多租户容器环境,以上需要切到 PDB下执行,另外执行完 sequence.sql,还需要在 GGSCI 中 FLUSH SEQUENCE。
sqlplus / as sysdba
SQL> alter session set container=CERTMISSN;
SQL> @sequence
Flush Sequence
GGSCI> DBLOGIN USERIDALIAS GGADMIN DOMAIN GOLD_QC_CDB$ROOT
GGSCI> FLUSH SEQUENCE CERTMISSNPDB.SRCSCHEMA1. ##----PDB.schema
更多内容可去官方文档参考链接:https://docs.oracle.com/en/middleware/goldengate/core/19.1/oracle-db/additional-oracle-goldengate-configuration-considerations.html#GUID-2FBECF4E-1D8D-42A7-B4B1-A1FDE56039D8
4、数据库目标端(19c)相关设置
4.1.创建表空间和用户,并授权
create tablespace tbs_ogg datafile '/u01/app/oracle/oradata/TESTOGG/tbs_ogg01.dbf' size 1G autoextend on maxsize 30G;
create user ogg identified by ogg default tablespace tbs_ogg;
grant connect,resource,unlimited tablespace to ogg;
grant create session,alter session to ogg;
grant select any dictionary,select any table to ogg;
grant alter any table to ogg;
grant flashback any table to ogg;
grant execute on dbms_flashback to ogg;
grant execute on utl_file to ogg;
grant dba to ogg;
grant select any transaction to ogg;
exec DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE('ogg');
4.2. 配置mgr进程
--登录数据库
GGSCI (Ops-19cOGG) 1> dblogin userid ogg@TESTOGG,password ogg
Successfully logged into database.
GGSCI (Ops-19cOGG as ogg@testogg) 2> create subdirs
Creating subdirectories under current directory /ogg
Parameter file /ogg/dirprm: created.
Report file /ogg/dirrpt: created.
Checkpoint file /ogg/dirchk: created.
Process status files /ogg/dirpcs: created.
SQL script files /ogg/dirsql: created.
Database definitions files /ogg/dirdef: created.
Extract data files /ogg/dirdat: created.
Temporary files /ogg/dirtmp: created.
Credential store files /ogg/dircrd: created.
Masterkey wallet files /ogg/dirwlt: created.
Dump files /ogg/dirdmp: created.
4.2.1.编辑 mgr 并启动
edit param mgr
port 7809
DYNAMICPORTLIST 7810-7829
userid ogg@TESTOGG, password ogg
--AUTOSTART EXTRACT *
AUTORESTART EXTRACT *,RETRIES 3,WAITMINUTES 7,RESETMINUTES 60
PURGEOLDEXTRACTS /ogg/dirdat/*,usecheckpoints, minkeepdays 8
PURGEDDLHISTORY MINKEEPDAYS 7, MAXKEEPDAYS 10
PURGEMARKERHISTORY MINKEEPDAYS 7, MAXKEEPDAYS 10
LAGREPORTHOURS 1
--LAGINFOMINUTES 30
--LAGCRITICALMINUTES 45
AUTORESTART 参数表示每7分钟尝试重新启动所有进程,共尝试三次。以后每60分钟清零,再按照每7分钟尝试一次共试三次。
start mgr
GGSCI (Ops-19cOGG as ogg@testogg) 7> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER STOPPED
GGSCI (Ops-19cOGG as ogg@testogg) 8>
GGSCI (Ops-19cOGG as ogg@testogg) 8> start mgr
Manager started.
GGSCI (Ops-19cOGG as ogg@testogg) 9> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
GGSCI (Ops-19cOGG as ogg@testogg) 10> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
4.3.配置 replicat 进程 rep1
注意:先不启,初始化完成之后再起进程
GGSCI (Ops-19cOGG as ogg@testogg) 4> add checkpointtable ogg.rep1_ckpt
Successfully created checkpoint table ogg.rep1_ckpt.
GGSCI (Ops-19cOGG as ogg@testogg) 5> add replicat rep1, exttrail /ogg/dirdat/ss, checkpointtable ogg.rep1_ckpt
REPLICAT added.
GGSCI (Ops-19cOGG as ogg@testogg) 6> edit param rep1
REPLICAT rep1
setenv (NLS_LANG=AMERICAN_AMERICA.AL32UTF8)
--setenv (ORACLE_SID=)
userid ogg@TESTOGG, password ogg
REPORT AT 08:59
REPORTCOUNT EVERY 30 MINUTES, RATE
CACHEMGR CACHESIZE 2048MB, CACHEDIRECTORY /ogg/dirtmp
REPERROR DEFAULT, ABEND
DISCARDFILE /ogg/dirrpt/rep1.dsc, APPEND, MEGABYTES 1024
DISCARDROLLOVER AT 3:00
GETTRUNCATES
ALLOWNOOPUPDATES
APPLYNOOPUPDATES
ASSUMETARGETDEFS
DBOPTIONS DEFERREFCONST
DBOPTIONS SUPPRESSTRIGGERS
DDL INCLUDE MAPPED
DDLOPTIONS REPORT
DDLERROR 942 IGNORE
MAP PROD.* TARGET PROD.*;
MAP SCOTT.* TARGET SCOTT.*;
参数说明:
dbOptions IntegratedParams:设置并行度;
EOFDELAYCSECS:控制 replicat 进程检查新数据的频度;
Reportrollover:指定何时生成 report 文件;
Reperror:控制记录 MAP 发生错误时的信息,这里指定 default 和 abendDefault:设置对所有错误的响应记录Abend:回滚事务并终止处理异常。ABEND 是默认值。
CACHEMGR CACHESIZE :可以来控制OGG进程的内存使用。
列映射转换:
5. 19c目标端初始化数据
5.1.创建 db_link
先要配置好 tns TEST_LINK
TEST_LINK =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 源端IP)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test)
)
)
SQL> create public database link TEST_LINK connect to system identified by Oracle_11g using 'TEST_LINK'; --这里写源库用户和密码
--用完可删除此 dblink
DROP PUBLIC DATABASE LINK TEST_LINK;
--测试 db_link
SQL> select * from dual@TEST_LINK;
D
-
X
SQL> select instance_name from v$instance@TEST_LINK;
INSTANCE_NAME
----------------
test
5.2.查询源生产库 scn
SQL> SELECT TO_CHAR(MIN(start_scn) ) AS "Please select the minimum SCN" FROM v$transaction
UNION ALL
SELECT TO_CHAR(current_scn) FROM v$database;
Please select the minimum SCN
----------------------------------------
2181214
5.3.数据泵导入数据
目标端创建表空间
Create tablespace PROD_TBS datafile '/u01/app/oracle/oradata/TESTOGG/prod_tbs01.dbf' size 2g;
目标创建 dump 数据目录
create directory expdp_dir as '/u01/backup/';
grant read,write on directory expdp_dir to public;
查看数据目录
set linesize 9999
col OWNER for a10
col DIRECTORY_NAME for a30
col DIRECTORY_PATH for a80
select * from dba_directories;
5.3.1.使用 dblink 初始化数据
nohup impdp system/Oracle_19C@TESTOGG directory=EXPDP_DIR version=11.2.0.4 NETWORK_LINK=TEST_LINK flashback_scn=2181214 exclude=statistics parallel=4 cluster=no schemas=PROD,SCOTT logfile=impdp_scott.log logtime=ALL TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y &
注意:Dblink+BLOB 大字段会特别慢有问题,先启动 extu1 捕获进程在初始化数据。
期间在源库启动 extract 进程并模拟插入一条数据。
GGSCI (Ops-11gOGG as ogg@test) 22> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT STOPPED DPE1 00:00:00 01:48:58
EXTRACT STOPPED EXTU1 00:00:00 02:03:02
GGSCI (Ops-11gOGG as ogg@test) 23>
GGSCI (Ops-11gOGG as ogg@test) 23> start extu1
Sending START request to MANAGER ...
EXTRACT EXTU1 starting
GGSCI (Ops-11gOGG as ogg@test) 24>
GGSCI (Ops-11gOGG as ogg@test) 24> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT STOPPED DPE1 00:00:00 01:49:13
EXTRACT RUNNING EXTU1 02:03:13 00:00:04
GGSCI (Ops-11gOGG as ogg@test) 25> start dpe1
Sending START request to MANAGER ...
EXTRACT DPE1 starting
启动报错,没有加入表的 map 信息。如上,在 dpe1 配置文件最后两行添加。然后在此启动,报错由于目标端 mgr 进程没有启动,目标端启动 mgr 进程,源端已自动启动 dpe1.
GGSCI (Ops-11gOGG as ogg@test) 35> start dpe1
Sending START request to MANAGER ...
EXTRACT DPE1 starting
GGSCI (Ops-11gOGG as ogg@test) 36> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT ABENDED DPE1 00:00:00 01:53:04
EXTRACT RUNNING EXTU1 00:00:00 00:00:02
GGSCI (Ops-11gOGG as ogg@test) 37> view report dpe1
2021-07-14 20:01:50 ERROR OGG-01224 TCP/IP error 111 (Connection refused), endpoint: 12.0.217.87:7809.
2021-07-14 20:01:50 ERROR OGG-01668 PROCESS ABENDING.
GGSCI (Ops-11gOGG as ogg@test) 38> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING DPE1 00:00:00 00:00:03
EXTRACT RUNNING EXTU1 00:00:00 00:00:08
SQL> conn scott/scott
Connected.
SQL>
SQL> insert into test values(3);
1 row created.
SQL>
SQL> commit;
Commit complete.
SQL> select * from test;
ID
----------
2
3
1
5.4.初始化数据完成后设置
5.4.1.编译无效对象(非必须)
@?/rdbms/admin/utlrp.sql
5.4.2.收集统计信息
exec dbms_stats.gather_database_stats(degree =>8);
5.4.3.启动replicat进程
start REP1, aftercsn 2181214
5.4.4.查看状态
GGSCI (Ops-19cOGG) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING REP1 00:00:00 00:00:01
GGSCI (Ops-19cOGG) 2> SEND REPLICAT rep1 STATUS
Sending STATUS request to REPLICAT REP1 ...
Current status: At EOF
Sequence #: 1
RBA: 20,053
0 records in current transaction.
6、简单测试
6.1.DML 测试
源端插入一条语句提交;
SQL> select * from test;
ID
----------
2
3
1
Elapsed: 00:00:00.00
SQL> insert into test values(4);
1 row created.
Elapsed: 00:00:00.00
SQL>
SQL> commit;
Commit complete.
--目标端查看
SQL> select * from scott.test;
ID NAME
---------- ----------
1
2
3
4
6.2.DDL 测试
源端添加字段,修改字段长度
SQL> desc test
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NUMBER(38)
SQL>
SQL> alter table test add name varchar(10);
Table altered.
Elapsed: 00:00:00.14
SQL>
SQL> desc test
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NUMBER(38)
NAME VARCHAR2(10)
SQL> alter table test modify name varchar2(32);
--添加、删除列
alter table test add changeTime date default sysdate;
Alter table test drop column changeTime;
目标端查看结果
源端 OGG 正常
GGSCI (Ops-11gOGG as ogg@test) 41> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING DPE1 00:00:00 00:00:06
EXTRACT RUNNING EXTU1 00:00:00 00:00:05
目标 OGG 正常
GGSCI (Ops-19cOGG as ogg@testogg) 26> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING REP1 00:00:00 00:00:07
创建表也可以正常同步,下面是创建后获取的建表语句。
SQL> set long 9999 pages 456 line 456
SQL> select dbms_metadata.get_ddl('TABLE','T_OGG_TEST','SCOTT') from dual;
DBMS_METADATA.GET_DDL('TABLE','T_OGG_TEST','SCOTT')
--------------------------------------------------------------------------------
CREATE TABLE "SCOTT"."T_OGG_TEST"
("ID" NUMBER(10,0) NOT NULL ENABLE,
"T_CHAR" CHAR(100),
"T_VARCHAR" VARCHAR2(100),
"T_NUMBER" NUMBER(10,0),
"T_LONG" LONG,
"T_BLOB" BLOB,
"T_DATE" DATE DEFAULT SYSDATE,
"T_TIMESTAMP" TIMESTAMP (6),
PRIMARY KEY ("ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ENABLE,
SUPPLEMENTAL LOG GROUP "GGS_93612" ("ID") ALWAYS) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS"
LOB ("T_BLOB") STORE AS BASICFILE (
TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
NOCACHE LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT))
6.3.序列测试
源端创建表、序列、插入数据,检查目标端是否正常同步。
CREATE TABLE "SCOTT"."TEST"
("ID" NUMBER,
"NAME" VARCHAR2(32),
"ADDR" VARCHAR2(50));
CREATE SEQUENCE "SCOTT"."SEQ_TEST" MINVALUE 1 MAXVALUE 99999999999 INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE;
INSERT INTO SCOTT.TEST VALUES(1,'JiekeXu','Beijing');
INSERT INTO SCOTT.TEST VALUES("SCOTT"."SEQ_TEST".nextval,'Jieke','Tianjing');
INSERT INTO SCOTT.TEST VALUES("SCOTT"."SEQ_TEST".nextval,'Jie','GSAU');
commit;
----查看两端序列值
select SEQ_TEST.nextval from dual;
select SEQ_TEST.currval from dual;
或者检查原有序列当前值,下一个值是否和目标端一致,如果一致说明正常同步,如所有表都不一致,则需要单独处理序列,本次只是一个简单的测试,实际情况更复杂,更多信息还得阅读官方文档。不过一般情况下的处理办法就是原端先导出序列,然后目标端删除序列,再导入序列,然后进行业务数据比对测试等后续操作。
OGG 支持从 ADG 备库抽取吗?
最后就是有一个经常问的问题,OGG 能不能支持在备库抽取,答案是可以的,只是仅限于 OGG 12.1.2 以上版本的经典模式官方文档有配置说明,第 11.6 节有说明,但是也有很多限制哦。https://docs.oracle.com/goldengate/1212/gg-winux/GIORA/classic_capture.htm#GIORA997
19c 官方文档:I.6.2 Configuring Classic Extract for ADG Mode
https://docs.oracle.com/en/middleware/goldengate/core/19.1/oracle-db/configuring-classic-extract-adg-mode.html#GUID-FC91F877-217A-4156-A250-2D8081FFE986
ogg 21c 经典模式 7.4 一节 Enabling Downstream Extract Registration Using ADG Redirection in Downstream Configuration
https://docs.oracle.com/en/middleware/goldengate/core/21.3/oracle-db/configuring-downstream-mining-database.html#GUID-77F675AA-3E7E-4ACB-94E0-72A8983D1F46
全文完,希望可以帮到正在阅读的你,如果觉得此文对你有帮助,可以分享给你身边的朋友,同事,你关心谁就分享给谁,一起学习共同进步~~~
欢迎关注我的公众号【JiekeXu DBA之路】,第一时间一起学习新知识!
———————————————————————————
公众号:JiekeXu DBA之路
CSDN :https://blog.csdn.net/JiekeXu
墨天轮:https://www.modb.pro/u/4347
腾讯云:https://cloud.tencent.com/developer/user/5645107
———————————————————————————
分享几个数据库备份脚本
Oracle 表碎片检查及整理方案
OGG|Oracle GoldenGate 基础2022 年公众号历史文章合集整理
Oracle 19c RAC 遇到的几个问题
OGG|Oracle 数据迁移后比对一致性
OGG|Oracle GoldenGate 微服务架构
Oracle 查询表空间使用率超慢问题一则
Oracle 11g升级到19c需要关注的几个问题
国产数据库|TiDB 5.4 单机快速安装初体验
Oracle ADG 备库停启维护流程及增量恢复
Linux 环境搭建 MySQL8.0.28 主从同步环境