一.Checkpoints 理论说明

有关GG的Checkpoints 在系列一, GG的架构中以说明:

OracleGolden Gate 系列一 --GG 架构 说明

http://blog.csdn.net/tianlesoftware/article/details/6925907

这里在单独拿出来说明一下,因为这是一个较为重要的概念。

Checkpoints storethe current read and write positions of a process to disk for recovery purposes.These checkpoints ensure that data changes that are marked for synchronizationactually are extracted by Extract and replicated by Replicat, and they preventredundant processing.

--Checkpoint 存储了进程当前读和写的位置。 Checkpoints 保证已经改变的数据已经同步,从而阻止其他冗余的操作。

They providefault tolerance by preventing the loss of data should the system, the network,or an Oracle GoldenGate process need to be restarted. For complexsynchronization configurations, checkpoints enable multiple Extract or Replicatprocesses to read from the same set of trails.

--通过Checkpoints 可以在以下情况下的数据丢失:系统或者网络故障,重启GG进程。Checkpoints支持多个Extact 或者Replicat 进程读取同一个trail 文件。

Checkpoints workwith inter-process acknowledgments to prevent messages from being lost in thenetwork. Oracle GoldenGate has a proprietary guaranteed-message delivery technology.

Extract createscheckpoints for its positions in the data source and in the trail. Replicat createscheckpoints for its position in the trail.

--默认情况下Extract 和 Replicat 进程都会在trail文件里记录checkpoints 的位置。

A checkpointsystem is used by Extract and Replicat processes that operate continuously, butit is not required by Extract and Replicat processes that run in batch mode. Abatch process can be re-run from its start point, whereas continuous processingrequires the support for planned or unplanned interruptions that is provided bycheckpoints.

--checkpoints 机制保证了Extract 和 Replicat 进程可以连续的操作。

Replicat storesits checkpoints in a checkpoint table in the target database to couple the commitof its transaction with its position in the trail file. This ensures that atransaction will only be applied once, even if there is a failure of theReplicat process or the database process. For reporting purposes, Replicat alsohas a checkpoint file on disk in the dirchk subdirectory of the OracleGoldenGate directory.

--Replicat 在Target 库的checkpoint 表里记录了已经提交了事务在trail 文件里的位置。这样就可以保证事务只被应用一次,即使在replicat 进程或者DB 出现故障的情况下。 为了做报告,Replicat也会在GG 安装目录的dirchk 目录里存放一个checkpoint 文件。

You canoptionally configure Replicat to use this file as its sole checkpoint store,and not use a checkpoint table at all. In this mode, however, there can becases where the checkpoint in the file is not consistent with what was appliedafter a database recovery, if the failure either rolled back or rolled forwarda transaction that was considered applied by Replicat. The checkpoint table guaranteesconsistency after recovery.

--我们可以在不使用checkpoint 的情况下,配置Replicat 进程使用这个本地的文件来存储checkpoint,但是使用本地的checkpoint 文件, 在数据库做了recover的情况下,不能保证数据的一致性。

在事务rolled back 或 rolledforward失败的情况下,使用本地checkpoint 文件还是可以保证一致性。

而如果使用checkpoint table,在databaserecover 的情况下也可以保证数据的一致性。 所以推荐也是使用checkpont。

Replicatmaintains checkpoints that provide a known position in the trail from which to startafter an expected or unexpected shutdown. To store a record of its checkpoints,Replicat uses a checkpoint table in the target database. This enables theReplicat checkpoint to be included within the Replicat transaction itself, toensure that a transaction will only be applied once, even if there is a failureof the Replicat process or the database process. Thecheckpoint table remains small because rows are deleted when no longer needed, andit does not affect database performance.

--Checkpoint 保留了很少的记录,对于哪些很长时间内不需要的的数据会自动删除,所以checkpoint 不会对数据库造成性能上的影响。

GoldenGate的检查点信息有两种存放方式:

1.     存放在GGHOME\dirchk下的文件中。

这种是默认的方法,一个进程对应一个文件。提取进程可以只使用这种模式。不需要checkpoint table。 但是这种方式在db recovery 之后可能出现数据不一致。

gg2:/u01/backup> cd /u01/ggate/dirchk

gg2:/u01/ggate/dirchk> ls

REP1.cpr  REPT2.cpr

2.     存放在数据库指定的表中,需要单独配置。

配置步骤如下:

(1)在./GLOBALS文件里添加checkpoint 表名

CHECKPOINTTABLE [<owner>.<table>]   --指定的检查点记录表

(2)连上DB,创建checkpoint 表

GGSCI> DBLOGIN [SOURCEDB <dsn>][,USERID <db_user>[, PASSWORD <pw>]]

GGSCI> ADD CHECKPOINTTABLE [<owner>.<table>]   --生成这个检查点记录表

(3)在新增复制进程时可以在添加时指定checkpointtable[<owner>.<table>] 替代nodbcheckpoint,使用数据库记录检查点信息。

二.示例

2.1   配置./GLOBALS 参数

GGSCI (gg2) 65> view params ./GLOBALS

GGSCHEMA ggate

CHECKPOINTTABLE ggate.checkpoint

当我们在GLOBALS 文件里指定了默认的checkpoint 之后,新的Replicat groups 在创建时会自动使用这个参数,不需要其他指令。

2.2 连上数据库,创建checkpoint表

GGSCI (gg2) 58> dblogin useridggate@gg2,password ggate

Successfully logged into database.

GGSCI (gg2) 59> add checkpointtableggate.checkpoint

Successfully created checkpoint tableGGATE.CHECKPOINT.

2.3 在创建Replicat进程时,指定checkpoint 表

GGSCI (gg2) 14> add replicatrep1,exttrail /u01/ggate/dirdat/lt, checkpointtable ggate.checkpoint

REPLICAT added.

至此,Checkpoint 的配置就完成。 我们查看一下checkpoint 表。

SQL> conn ggate/ggate

deConnected.

SQL> desc checkpoint

Name                                     Null?    Type

------------------------------------------------- ----------------------------

GROUP_NAME                                NOT NULLVARCHAR2(8)

GROUP_KEY                                 NOT NULLNUMBER(19)

SEQNO                                             NUMBER(10)

RBA                                       NOT NULLNUMBER(19)

AUDIT_TS                                          VARCHAR2(29)

CREATE_TS                                 NOT NULL DATE

LAST_UPDATE_TS                            NOT NULL DATE

CURRENT_DIR                               NOT NULLVARCHAR2(255)

SQL> select * from checkpoint;

GROUP_NA GROUP_KEY      SEQNO        RBA AUDIT_TS                      CREATE_TS    LAST_UPDATE_ CURRENT_DIR

-------- ---------- ---------- --------------------------------------- ------------ ------------ ----------------------

REP1    3987940558         12       1564 2011-11-17 17:21:55.471376    17-NOV-11   17-NOV-11    /u01/ggate

-------------------------------------------------------------------------------------------------------

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!

Blog:     http://blog.csdn.net/tianlesoftware

Weibo: http://weibo.com/tianlesoftware

Email:   tianlesoftware@gmail.com

Skype: tianlesoftware

-------加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请----

DBA1 群:62697716(满);   DBA2 群:62697977(满)  DBA3 群:62697850(满)

DBA 超级群:63306533(满);  DBA4 群:83829929(满) DBA5群: 142216823(满)

DBA6 群:158654907(满)   DBA7 群:69087192(满)  DBA8 群:172855474

DBA 超级群2:151508914  DBA9群:102954821     聊天 群:40132017(满)

转载于:https://www.cnblogs.com/zlja/archive/2011/11/17/2449537.html

Oracle Golden Gate 系列十三 -- 配置GG进程检查点(checkpoint) 说明相关推荐

  1. Oracle Golden Gate 系列十一 -- 配置 GG DDL 同步 说明 与 示例

    一.DDL 说明 1.1 说明 这部分的说明,在系列四和系列六中已经说明: Oracle Golden Gate 系列六 --11gR2 Ora2Ora 单向复制GG 示例 www.2cto.com/ ...

  2. Oracle Golden Gate 系列七 -- 配置 GG Manager process

    在上篇GG 单向复制的示例中,有配置Manager process,这篇具体来看一下Manager Process 的配置. Oracle Golden Gate 系列六 --11gR2 Ora2Or ...

  3. Oracle Golden Gate 系列十五 -- GG Trails 说明

    一.Trails 说明 理论知识在系列一里有说明,这里在拿出来看一下: Oracle Golden Gate 系列一 -- GG 架构 说明 http://blog.csdn.net/tianleso ...

  4. Oracle Golden Gate 系列十二 -- GG 数据初始化装载二 基于SCN 的初始化 说明 与 示例...

    一.初始化说明 GG实施过程中,初始化是一个重要的工作,尤其是要初始化的数据较多,并且系统又是7*24的时. 对于静态初始化,把业务停掉,DB 上的数据就不会有变化,这时候,我们可以用expdp/im ...

  5. Oracle Golden Gate 系列十七 -- GG 一对多 real-time data distribution 说明 与 示例

    一.官网说明 A datadistribution configuration is a one-to-many configuration. Oracle GoldenGatesupports sy ...

  6. Oracle Golden Gate 系列 小结

    花了大半个月的时间小研究了一下Oracle Golden Gate. 先简单的说说自己学习GG的一个过程. 参考资料都是官方文档,官网的链接如下: http://download.oracle.com ...

  7. Oracle Golden Gate 系列十六 -- 配置 GG 安全 说明 与 示例

    由于GoldenGate所需的用户权限较大,而每个GoldenGate进程配置文件中都需要设置该用户和密码用于数据库登陆,出于安全性的考虑,建议将密码进行加密. 官方文档上介绍的加密有如下三种方法: ...

  8. Oracle Golden Gate 系列一 -- GG 架构 说明

    一. GoldenGate 下载地址 官网可以直接下载: http://www.oracle.com/technetwork/middleware/goldengate/downloads/index ...

  9. Oracle Golden Gate 系列十四 -- 监控 GG 状态 说明

    一.使用命令查看 主要有如下命令: 这里注意STATS 指静态的信息,而STATUS 是运行时的信息. 1.1 Monitoring an Extract recovery If Extractabe ...

最新文章

  1. SQL Server 预编译执行SQLs
  2. hdu 5157(manacher+前缀和+树状数组)
  3. php用array_merge实现无限级分类
  4. oracle中用户连接相关
  5. SAP CRM category search的实现
  6. arcgis建立拓扑分析(检验矢量图)
  7. redis 能不能监听特定的key失效_php监听redis key失效触发回调事件
  8. Linux CAN通信
  9. matlab中平均函数用法,matlab中怎样在X的指定范围内求y的平均值
  10. PCL1.8.0+Windows+VS2013配置
  11. python入门指南阅读答案_【python】入门指南1
  12. jQuery过滤选择器 通过过滤条件选取需要的元素
  13. Nginx 配置文件 nginx.conf 说明、内置变量、常用命令
  14. SQL经典50题练习
  15. 将R Markdown文档变成互动体验
  16. opencv学习笔记(一) 环境配置/打开一张图片/github(git)初探
  17. win7家庭版升级为Win7旗舰版
  18. Matplotlib系列(八):嵌入Python Qt界面
  19. 哪几款车型?适合狮子座的车友?
  20. MyBatis万能插入语句

热门文章

  1. php 对象 final,PHP7_OOP_对象重载以及魔术方法_对象遍历_final关键字
  2. 【渝粤题库】陕西师范大学151210 成本会计作业 (专升本)
  3. 【渝粤题库】国家开放大学2021春2625调剂学题目
  4. 【渝粤题库】国家开放大学2021春1356高级英语听说(2)题目
  5. zigbee物联网模块标准:LTE标准Cat.1和nbiot无线通信模块差异
  6. 【无线串口模块快速选型指南】通信频点、芯片、通信距离、功率灵敏度、电流 空中速率
  7. zune自搭虚拟服务器离线升级,Zune 30g 固件更新至 3.3 记录
  8. DC/DC开关电源设计
  9. CSAPP:Attack lab
  10. BCH码和m序列参数估计(梅西迭代算法求多项式的MATLAB实现)