惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - margiex

OGG的一些常用网址 ogg初始化抽取的快速配置方法一: 将存量数据落地为标准trail 利用GoldenGate 21实现mysql8远程DDL同步 GoldenGate 21c发布 OGG配置文件中参数化的运用 一次linux中毒,挖矿病毒 goldengate新版本中查看日志读取点 ogg同步Oracle数据库用户验证 GoldenGate在MySQL 集群中的应用 Oracle GoldenGate现在支持从 PostgreSQL 捕获数据 GoldenGate 2020.7 发布新特性 - 19.1.0.0.200714 GoldenGate如何修改抽取进程的读取点? 使用AutoHotKey提升工作效率 InnoDB和NDB,MySQL群集和InnoDB群集之间有什么区别? GoldenGate 19.1实时文本文件加载攻略 windows 10 excel 打开超连接提示 组织策略阻止... 验证ogg同步数据库表无主键表且目标表包含隐藏字段 配置ogg从Oracle到PostgreSQL的同步复制json数据 pi
GoldenGate基于中间队列文件的初始化
margiex · 2021-04-09 · via 博客园 - margiex

适用场景:异构平台的初始化,如oracle到db2, db2到mysql,oracle到big data/kafka/hdfs等。
原理:通过OGG抽取源系统的数据,再投递加载到目标平台,从而避免人工数据导出、导入。
限制:OGG的初始化无法与增量抽取进程无缝集成,这块需要单独考虑。

方法一,抽取与传输分开

--源端配置抽取进程, einit.prm

sourceistable
userid ogg, password ogg
extfile ./dirdat/et, maxfiles 999999, megabytes 2000, append
reportcount every 60 seconds, rate
table scott.dept;


--传输进程, puinit.prm

extract puinit
rmthost 10.0.0.100, mgrport 7809
rmtfile ./dirdat/t2
reportcount every 60 seconds, rate
table scott.*;

GGSCI>add ext puinit, exttrailSource ./dirdat/et
GGSCI>add rmttrail ./dirdat/t2, ext puinit, megabytes 2000
GGSCI>start puinit

#启动初始化进程
$ nohup ./extract pf dirprm/einit.prm rf dirrpt/einit.rpt &
$ tail -f ./dirrpt/einit.rpt

抽取完成之后,einit会自动停止;同时,可以查看puinit的状态和目标端trail的情况。

以上做法要考虑本地空间是否够用,初始化时,会在本地保存初始表的所有数据,如果表非常大,则需要准备相应的磁盘空间,或根据puinit传输进程的读取点,手工删除已经传输完成的队列文件。

方法二,抽取与传输同一进程

如果确认网络没问题,也可以不考虑在本地保存trail,即OGG抽取之后直接传输到目标端,不在本地落盘。

 但此方法有两个缺点:

1. 实践中,此做法效率较低,因为OGG在本地抽取很快,如果网络传输慢,则整个初始化过程会延时。
2. 如果传输网络中断或其它问题造成抽取进程宕机,则需要重新开始初始化。(OGG初始化进程没有检查点机制)

以下是抽取与传输合并之后的进程参数,供参考:
--einit2.prm

sourceistable
userid ogg, password ogg
rmthost 10.0.0.100, mgrport 7809
rmtfile ./dirdat/t2, maxfiles 999999, megabytes 2000, append
reportcount every 60 seconds, rate
table scott.dept;

$ nohup ./extract pf dirprm/einit2.prm rf dirrpt/einit2.rpt &
$ tail -f ./dirrpt/einit2.rpt

抽取完成之后,einit2会自动停止;同时,可以查看目标端trail的情况了解数据量的大小。

--目标端进程, rinit.prm

specialrun
end runtime
replicat rinit
userid ogg, password ogg
extfile ./dirdat/t2
--handleCollisions
reportcount every 1 minutes, rate
map scott.dept,target scott.dept;

--rinit进程的启动,可以在目标端有trail即可开始,不用等待源端抽取完成。
$ nohup ./replicat pf dirprm/rinit.prm rf dirrpt/rinit.rpt &
$ tail -f ./dirrpt/rinit.rpt

rinit执行完成之后,会自动停止,可查看其对应的输出日志,也可以检查目标端的数据量。


官方参考:
https://docs.oracle.com/en/middleware/goldengate/core/19.1/admin/instantiating-oracle-goldengate-initial-load.html