博客
关于我
oracle ogg 单实例双向复制搭建(oracle-oracle)--Oracle GoldenGate
阅读量:793 次
发布时间:2023-02-24

本文共 3248 字,大约阅读时间需要 10 分钟。

Oracle GoldenGate?OGG????????

Oracle GoldenGate?OGG?????

???????????? Oracle GoldenGate?OGG??????????????????orcl????????ogg????????????????????????????????????

1. Oracle GoldenGate?OGG?????

??????????????????????????????

  • ?????????????orcl????????ogg??? Oracle 11.2.0.4?
  • ??????????? CentOS 6.5?
  • Oracle GoldenGate ?????? /u01/app/ogg ???

2. DDL ????

Oracle GoldenGate ?? DDL ????????????????

2.1 DDL ??????

?? Oracle GoldenGate ???ogg????????? DDL ????????? SQL ???

grant CONNECT, RESOURCE 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 INSERT ANY TABLE to ogg;grant UPDATE ANY TABLE to ogg;grant DELETE ANY TABLE to ogg;grant EXECUTE on UTL_FILE to ogg;grant CREATE TABLE, CREATE SEQUENCE to ogg;grant CREATE VIEW to ogg;grant CREATE PROCEDURE to ogg;grant CREATE INDEX to ogg;grant CREATE TRIGGER to ogg;

2.2 ????

????????? DDL ?????

# Marketer SetupSYS@ orcl > @/u01/app/ogg/marker_setup.sql# DDL SetupSYS@ orcl > @/u01/app/ogg/ddl_setup.sql# Role SetupSYS@ orcl > @/u01/app/ogg/role_setup.sql# Enable DDL ReplicationSYS@ orcl > @/u01/app/ogg/ddl_enable.sql

2.3 ??????

????????????????????

# ???? 1SYS@ orcl > @/u01/app/ogg/ddl_setup.sqlLine/pos: 126/9, PL/SQL: SQL ?????

??????????????????????????

3. ??????

??? DDL ????????????????????????????????

3.1 ??????

??????? archive mode??????????????

# ??????mkdir -p /u01/app/oracle/dump

3.2 ??????

?????????????

# ?????????expdp scott@orcl /orcl schemas=scott directory=/u01/app/oracle/dump dumpfile=scott_schemas_%Y%m%d.dmp# ??????impdp scott@ogg /orcl schemas=scott directory=/u01/app/oracle/dump dumpfile=scott_schemas_%Y%m%d.dmp

4. Oracle GoldenGate Manager ??

?? Oracle GoldenGate Manager????????????

# ?? params ??> edit params mgrport 7839> DYNAMICPORTLIST 7840-7850> AUTOSTART EXTRACT *> AUTORESTART EXTRACT *> RETRIES 5> WAITMINUTES 3> PURGEOLDEXTRACTS ./dirdat/*> usecheckpoints> minkeepdays 7> LAGREPORTHOURS 1> LAGINFOMINUTES 30> LAGCRITICALMINUTES 45

5. Extract ? Replicat ??

?? Extract ? Replicat ?????

5.1 Extract ??

# ?? Extract ????> add extract ext1, tranlog, begin now> edit param ext1> MEGABYTES 100> REPORTCOUNT EVERY 1 MINUTES> DISCARDFILE ./dirrpt/ext1.dsc> APPEND> MEGABYTES 1024> DISCARDROLLOVER AT 3:00> exttrail ./dirdat/r1,megabytes 100> include all ddl & include mapped objtype 'table' & include mapped objtype 'index'> table scott.emp_ogg; table scott.dept_ogg; table scott.dept

5.2 Replicat ??

# ?? Replicat ????> add replicat rep1> edit param rep1> MEGABYTES 1000> REPORTCOUNT EVERY 30 MINUTES> DISCARDFILE ./dirrpt/rep1.dsc> APPEND> DISCARDROLLOVER AT 3:00> checkpointtable ogg.ggschkpt> map scott.emp_ogg, target scott.emp_ogg> map scott.dept_ogg, target scott.dept_ogg> map scott.dept, target scott.dept> start rep1

6. ?? Extract ? Replicat

# ?? Extract> start ext1# ?? Pump> start pump1# ?? Replicat> start rep1

7. ????

???????????????

# ?? Extract ??GGSCI (DSI) 5 > info all

8. ????

?????????????????

  • ??????? /u01/app/ogg/ggserr.log ???
  • ??????? Oracle GoldenGate ???ogg????????
  • ??????????????????

??

?????????????????? Oracle GoldenGate?OGG???????????????Oracle GoldenGate ????????????????????????????????????????????????? Oracle ????????????

转载地址:http://jvpfk.baihongyu.com/

你可能感兴趣的文章
OJ中处理超大数据的方法
查看>>
OJ中常见的一种presentation error解决方法
查看>>
OK335xS UART device registe hacking
查看>>
ok6410内存初始化
查看>>
Okhttp3添加拦截器后,报错,java.io.IOException: unexpected end of stream on okhttp3.Address
查看>>
OKR为什么到今天才突然火了?
查看>>
OLAP在大数据时代的挑战
查看>>
OLEDB IMEX行数限制的问题
查看>>
ollama-python-Python快速部署Llama 3等大型语言模型最简单方法
查看>>
ollama本地部署DeepSeek(Window图文说明)
查看>>
ollama运行多模态模型如何进行api测试?
查看>>
Omi 多端开发之 - omip 适配 h5 原理揭秘
查看>>
On Error GOTO的好处
查看>>
onclick事件的基本操作
查看>>
oncopy和onpaste
查看>>
onCreate中的savedInstanceState作用
查看>>
onCreate()方法中的参数Bundle savedInstanceState 的意义用法
查看>>
One good websit for c#
查看>>
OneASP 安全公开课,深圳站, Come Here, Feel Safe!
查看>>
OneBlog Shiro 反序列化漏洞复现
查看>>