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

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
A
Arctic Wolf
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
Threatpost
P
Proofpoint News Feed
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
www.infosecurity-magazine.com
www.infosecurity-magazine.com
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
V
Vulnerabilities – Threatpost
V
V2EX
Webroot Blog
Webroot Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Privacy & Cybersecurity Law Blog
P
Privacy International News Feed
T
Tor Project blog
P
Proofpoint News Feed
T
Tailwind CSS Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Vercel News
Vercel News
Security Archives - TechRepublic
Security Archives - TechRepublic
MongoDB | Blog
MongoDB | Blog
T
Troy Hunt's Blog
Google DeepMind News
Google DeepMind News
NISL@THU
NISL@THU
C
CERT Recently Published Vulnerability Notes
W
WeLiveSecurity
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
GbyAI
GbyAI
Y
Y Combinator Blog
T
Threat Research - Cisco Blogs
S
Security Affairs
Google Online Security Blog
Google Online Security Blog
S
Securelist
Spread Privacy
Spread Privacy
Recent Announcements
Recent Announcements
The Register - Security
The Register - Security
C
Cybersecurity and Infrastructure Security Agency CISA
爱范儿
爱范儿
H
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Scott Helme
Scott Helme
The Cloudflare Blog
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog RSS Feed
AWS News Blog
AWS News Blog

博客园 - margiex

OGG的一些常用网址 ogg初始化抽取的快速配置方法一: 将存量数据落地为标准trail 利用GoldenGate 21实现mysql8远程DDL同步 GoldenGate 21c发布 GoldenGate基于中间队列文件的初始化 一次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
OGG配置文件中参数化的运用
margiex · 2021-04-25 · via 博客园 - margiex

    在日常的运维中,运行期间OGG的配置一般不会动态调整。如果要使用批量配置,一般使用obey。如果针对同一个配置文件,每次运行时,需要调整某些属性值,如队列文件名或进程名,则可以使用参数化配置。意思是只需要创建一份配置文件,但可以在每次运行时从操作系统的环境信息中读取变量的值,从而在OGG开始运行后产生不同的执行情况。
如下:

--ex1.prm
extract ex1
setenv(oracle_sid='?ORA_SID')
userid ogg, password ogg
exttrail ./dirdat/?TRAIL_FILE
table schema.tb1;

    在上面的配置文件中,有指定两个变量,一个是ORA_SID,一个是TRAIL_FILE,那么在每次运行前,设置好相应变量的值,则可以让OGG抽取不同的SID和生成不同的trail.

如下示例:
export ORA_SID=testdb
export TRAIL_FILE=tb
./extract pf dirprm/ex1.prm rf dirrpt/ex1.rpt 之后.

则会生成
./dirdat/tb

并且在EX1.rpt中,可以看到:

2021-04-19 15:13:13  INFO    OGG-01889  Flush size (max message size) is set to 27,985.
ex1
setenv(oracle_sid='?ORA_SID')
?ORA_SID = testdb
userid ogg, password ***
exttrail ./dirdat/?TRAIL_FILE
?TRAIL_FILE = tb
table schema.tb1;

2021-04-19 15:13:13  INFO    OGG-01851  filecaching started: thread ID: 1029.

    如果我们有多个不同的参数需要执行,且又不希望每次运行前修改配置文件,则可以使用上面的方法批量执行。

主要应用场景:基于OGG的初始化时,可通过命令行配置不同的参数,在每次调用时读取不同的数据行。

ref: https://www.ateam-oracle.com/oracle-goldengate-parameter-substitution