ITPub博客

首页 > 数据库 > Oracle > GoldenGate准确修改抽取进程checkpoint

GoldenGate准确修改抽取进程checkpoint

原创 Oracle 作者:jelephant 时间:2014-04-15 14:05:44 0 删除 编辑
获取现有队列文件的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/,如需转载,请注明出处,否则将追究法律责任。

下一篇: ogg监控脚本
请登录后发表评论 登录
全部评论

注册时间:2013-12-07

  • 博文量
    143
  • 访问量
    631220