GoldenGate准确修改抽取进程checkpoint

获取现有队列文件的checkpoint信息并清理旧进程
GGSCI (IBM_P740-3) 9> info ext_cen,showch

EXTRACT    EXT_CEN   Last Started 2014-04-12 17:39   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:03 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2014-04-15 13:56:41  Seqno 18257, RBA 10356224
                     SCN 3200.2635987478 (13746531334678)


Current Checkpoint Detail:

Read Checkpoint #1

  Oracle Redo Log

  Startup Checkpoint (starting position in the data source):
    Thread #: 1
    Sequence #: 18171
    RBA: 38392336
    Timestamp: 2014-04-12 17:39:22.000000
    SCN: 3200.2634381277 (13746529728477)
    Redo File: /sdata4/ngcen/redo03.log

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 1
    Sequence #: 18257
    RBA: 10355216
    Timestamp: 2014-04-15 13:56:41.000000
    SCN: 3200.2635987477 (13746531334677)
    Redo File: /sdata4/ngcen/redo02.log

  Current Checkpoint (position of last record read in the data source):
    Thread #: 1
    Sequence #: 18257
    RBA: 10356224
    Timestamp: 2014-04-15 13:56:41.000000
    SCN: 3200.2635987478 (13746531334678)
    Redo File: /sdata4/ngcen/redo02.log

  BR Previous Recovery Checkpoint:
    Thread #: 0
    Sequence #: 0
    RBA: 0
    Timestamp: 2014-04-12 17:39:49.370711
    SCN: Not available
    Redo File:

  BR Begin Recovery Checkpoint:
    Thread #: 1
    Sequence #: 18257
    RBA: 7540224
    Timestamp: 2014-04-15 13:40:48.000000
    SCN: 3200.2635983297 (13746531330497)
    Redo File:

  BR End Recovery Checkpoint:
    Thread #: 1
    Sequence #: 18257
    RBA: 7540224
    Timestamp: 2014-04-15 13:40:48.000000
    SCN: 3200.2635983297 (13746531330497)
    Redo File:

Write Checkpoint #1

  GGS Log Trail

  Current Checkpoint (current write position):
    Sequence #: 79
    RBA: 212814411
    Timestamp: 2014-04-15 13:56:47.153573
    Extract Trail: ./dirdat/et
    Trail Type: EXTTRAIL

Header:
  Version = 2
  Record Source = A
  Type = 10
  # Input Checkpoints = 1
  # Output Checkpoints = 1

File Information:
  Block Size = 2048
  Max Blocks = 100
  Record Length = 2048
  Current Offset = 0

Configuration:
  Data Source = 3
  Transaction Integrity = 1
  Task Type = 0

Status:
  Start Time = 2014-04-12 17:39:49
  Last Update Time = 2014-04-15 13:56:47
  Stop Status = A
  Last Result = 400


添加新的抽取进程
add ext ext_cen, tranlog, begin now, threads 1


为新的抽取进程添加队列文件
Write Checkpoint #1

  GGS Log Trail

  Current Checkpoint (current write position):
    Sequence #: 79
    RBA: 212814411
    Timestamp: 2014-04-15 13:56:47.153573
    Extract Trail: ./dirdat/et
    Trail Type: EXTTRAIL

Header:
  Version = 2
  Record Source = A
  Type = 10
  # Input Checkpoints = 1
  # Output Checkpoints = 1

File Information:
  Block Size = 2048
  Max Blocks = 100
  Record Length = 2048
  Current Offset = 0

Configuration:
  Data Source = 3
  Transaction Integrity = 1
  Task Type = 0

Status:
  Start Time = 2014-04-12 17:39:49
  Last Update Time = 2014-04-15 13:56:47
  Stop Status = A
  Last Result = 400
相应增加队列文件命令如下:
ADD EXTTRAIL  ./dirdat/et, EXTRACT ext_cen, megabytes 100, seqno 79, rba212814411


如果出现GoldenGate识别顺序与数据库实际情况不一样,那么接下来的ALTER EXT命令就要替换相应的THREAD参数
修改抽取进程的current checkpoint信息。
接下来的操作为修改抽取进程的current checkpoint,由于此操作会触发recovery checkpoint信息变更,因此必须先于recovery checkpoint调整。

例如从旧的checkpoint信息得到关键信息如下:
 Current Checkpoint (position of last record read in the data source):
    Thread #: 1
    Sequence #: 18257
    RBA: 10356224
    Timestamp: 2014-04-15 13:56:41.000000
    SCN: 3200.2635987478 (13746531334678)
    Redo File: /sdata4/ngcen/redo02.log
相应的执行语句例子如下:
alter   EXT_cen,extseqno 18257,103562249194144,thread 1

修改抽取进程的recovery checkpoint信息。
例如从旧的checkpoint信息得到关键信息如下:
 Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 1
    Sequence #: 18257
    RBA: 10355216
    Timestamp: 2014-04-15 13:56:41.000000
    SCN: 3200.2635987477 (13746531334677)
    Redo File: /sdata4/ngcen/redo02.log
相应执行的语句例子如下:
alter   EXT_cen,ioextseqno 18257,ioextrba 10355216,thread 1
检查GoldenGate抽取进程时间点信息
info ext_cen,showch

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29337971/viewspace-1142465/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29337971/viewspace-1142465/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值