goldengate 学习系列2–相关配置说明
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
goldengate 学习系列2–相关配置说明
本站文章除注明转载外,均为本站原创:转载自love wife & love life —Roger 提供oracle技术支持服务本文链接地址:goldengate 学习系列2–相关配置说明
前面进行了goldengate的单向复制(支持ddl),但是很多内容对于新手来说,比较模糊。
这一篇重点描述,在进行goldengate安装时,我们需要进行什么准备工作?
1. 创建user
---你可以直接使用oracle用户
---你可以单独创建用户来管理goldengate,例如:
groupadd ggs
useradd -g oinstall -G dba ggs (必须加到oracle的组里面,因为需要调用$ORACLE_HOME/lib) passwd ggs
2. 配置用户环境变量
---配置SID、数据库字符集、LIB Path
export ORACLE_SID=10gasm
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORACLE_HOME=/home/oracle/oracle/product/10.2.0
export LD_LIBRARY_PATH=/home/ggs/ggs_home:$ORACLE_HOME/lib
3. DDL配置支持
---goldengate ddl支持保护那些操作
+++++ For ogg 10.4:
DDL support for sequences (CREATE, ALTER, DROP, RENAME) is compatible with, but
not required for, replicating sequence values. To replicate just sequence values,
you do not need to install the GoldenGate DDL support environment. You can just
use the SEQUENCE parameter.
我们可以看到是支持sequence的create,alter、drop以及rename等ddl操作。
这里需要说明的是,如果指定了EXCLUDE, TABLEEXCLUDE等参数,针对这些对象
的ddl操作是不会被进程抓取的。
----ddl scripts描述
Object Purpose Default name
DDL marker table Stores DDL information. This table GGS_MARKER
only receives inserts.
Sequence on marker table Used for a column in the marker GGS_DDL_SEQ
table.
DDL history table Stores object metadata history. This GGS_DDL_HIST
table receives inserts, updates,
deletes.
Object ID history table Contains object IDs of configured GGS_DDL_HIST_ALT
objects.
DDL trigger Fires on DDL operations. Writes GGS_DDL_TRIGGER_BEFORE
information about the operation to
the marker and history tables.
Installed with the trigger are some
packages.
DDL schema Contains the DDL synchronization None; must be specified during
objects. installation and in the GLOBALS
file.
User role Establishes the role needed to GGS_GGSUSER_ROLE
execute DDL operations.
Internal setup table Database table for internal use GGS_SETUP
only.
ddl_pin Pins DDL tracing, the DDL ddl_pin
package, and the DDL trigger for
performance improvements.
ddl_cleartrace.sql Removes the DDL trace file. ddl_cleartrace.sql
ddl_status.sql Verifies that the GoldenGate DDL ddl_status.sql
objects are installed
marker_status.sql Verifies that the marker table is marker_status.sql
installed.
ddl_tracelevel.sql Sets the level for DDL tracing. ddl_tracelevel.sql
—-配置ddl支持
顺序执行如下脚本即可:
---保证执行之前回收站是关闭的:
ALTER system SET recyclebin=off; --10.2 or later version
ALTER system SET"_recyclebin"=flase; --10.1