欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

goldegate_source_trail_missing

程序员文章站 2024-02-05 13:55:58
...

前几天被问到ogg源端EXTRACT进程trail文件由于某种原因丢失(删除)。 手工模拟下源端抽取进程丢失一个trail文件 模拟 trail 文件丢失 插入数据SQL BEGIN 2 FOR i IN 2001..3000 loop 3 INSERT INTO test1 VALUES i,'a',sysdate; 4 commit; 5 END loop; 6 EN

前几天被问到ogg源端EXTRACT进程trail文件由于某种原因丢失(删除)。

手工模拟下源端抽取进程丢失一个trail文件

  • 模拟 trail 文件丢失
插入数据
SQL> BEGIN
  2  FOR i IN 2001..3000 loop
  3  INSERT INTO test1 VALUES (i,'a',sysdate);
  4  commit;
  5  END loop;
  6  END;
  7  /
 
PL/SQL PROCEDURE successfully completed.
 
SQL> BEGIN
  2  FOR i IN 3001..4000 loop
  3  INSERT INTO test1 VALUES (i,'a',sysdate);
  4  commit;
  5  END loop;
  6  END;
  7  /
 
PL/SQL PROCEDURE successfully completed.
 
 
GGSCI (enmotech) 60>  shell ls -lh ./dirdat/et000000
 
-rw-r----- 1 oracle oinstall 475K Nov 23 22:29 ./dirdat/et000000

停止rpee插入数据,让dump传输过来数据不应用

GGSCI (enmotech) 61> stop RPEE
 
Sending STOP request TO REPLICAT RPEE ...
Request processed.
 
再次插入数据
SQL> BEGIN
  2  FOR i IN 4001..5000 loop
  3  INSERT INTO test1 VALUES (i,'a',sysdate);
  4  commit;
  5  END loop;
  6  END;
  7  /
 
PL/SQL PROCEDURE successfully completed.

停止ddump并插入数据

GGSCI (enmotech) 62> stop ddump
 
Sending STOP request TO EXTRACT DDUMP ...
Request processed.
 
 
 
SQL> BEGIN
  2  FOR i IN 5001..6000 loop
  3  INSERT INTO test1 VALUES (i,'a',sysdate);
  4  commit;
  5  END loop;
  6  END;
  7  /
 
PL/SQL PROCEDURE successfully completed.

插入数据让ext抽取但是ddump不传输

GGSCI (enmotech) 63> info *
 
EXTRACT    DDUMP     Last Started 2014-11-23 22:25   Status STOPPED
Checkpoint Lag       00:00:00 (updated 00:00:16 ago)
Log Read Checkpoint  File ./dirdat/ee000068
                     2014-11-23 22:30:43.000000  RBA 807686
 
EXTRACT    EXT1      Last Started 2014-11-23 21:45   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:03 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2014-11-23 22:30:57  Seqno 744, RBA 18682368
                     SCN 2.4426980 (8594361572)
 
EXTRACT    E_SQL     Last Started 2014-06-10 21:18   Status STOPPED
Checkpoint Lag       00:00:00 (updated 3984:54:27 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2014-06-10 21:35:53  Seqno 486, RBA 21800448
                     SCN 2.2362686 (8592297278)
 
REPLICAT   RPEE      Last Started 2014-11-23 22:26   Status STOPPED
Checkpoint Lag       00:00:00 (updated 00:00:42 ago)
Log Read Checkpoint  File ./dirdat/et000000
                     2014-11-23 22:29:24.000220  RBA 486152
 
 
这里抽取的Seqno为68
这里为了让抽取进程的trial文件前滚一个号,停止ext使用etrollover前滚一个
 
 
 
GGSCI (enmotech) 66> alter ext1 etrollover
 
2014-11-23 22:32:42  INFO    OGG-01520  Rollover performed.  For each affected output trail of Version 10 or higher format, after starting the source extract, issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file;  it will not happen automatically.
EXTRACT altered.
 
 
GGSCI (enmotech) 68> info ext1 detail
 
EXTRACT    EXT1      Initialized   2014-11-23 21:45   Status STOPPED
Checkpoint Lag       00:00:00 (updated 00:00:26 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2014-11-23 22:32:29  Seqno 744, RBA 18685952
                     SCN 2.4427012 (8594361604)
 
  Target Extract Trails:
 
  Remote Trail Name                                Seqno        RBA     Max MB
 
  ./dirdat/ee                                         69          0        100

看到这里 Seqno 为 69 ,并插入数据让 seqno 69 trail有数据

SQL> begin
  2  for i in 6001..7000 loop
  3  insert into test1 values (i,'a',sysdate);
  4  commit;
  5  end loop;
  6  end;
  7  /
 
 
begin
for i in 7001..8000 loop
insert into test1 values (i,'a',sysdate);
commit;
end loop;
end;
/
PL/SQL procedure successfully completed.
 
SQL> SQL> SQL>   2    3    4    5    6    7
 
PL/SQL procedure successfully completed.

在次让抽取进程的trial文件前滚一个号

 
GGSCI (enmotech) 75> stop ext1
 
Sending STOP request to EXTRACT EXT1 ...
Request processed.
 
 
GGSCI (enmotech) 76> alter ext1 etrollover
 
2014-11-23 23:25:14  INFO    OGG-01520  Rollover performed.  For each affected output trail of Version 10 or higher format, after starting the source extract, issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file;  it will not happen automatically.
EXTRACT altered.
 
 
GGSCI (enmotech) 77> start ext1
 
Sending START request to MANAGER ...
EXTRACT EXT1 starting
 
 
GGSCI (enmotech) 78> info all
 
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
 
MANAGER     RUNNING
EXTRACT     STOPPED     DDUMP       00:00:00      00:55:13
EXTRACT     RUNNING     EXT1        00:00:00      00:00:07
EXTRACT     STOPPED     E_SQL       00:00:00      3985:49:24
 
插入数据让 seqno 70 有数
SQL> begin
  2  for i in 8001..9000 loop
  3  insert into test1 values (i,'a',sysdate);
  4  commit;
  5  end loop;
  6  end;
  7  /
 
PL/SQL procedure successfully completed.

以上插入数据就汇总如下

  • 2000-4000 抽取并传输、应用
  • 4000-5000 抽取并传输、未应用
  • 5000-6000 抽取未传输、未应用, trail Seqno : 68
  • 6000-7000 抽取未传输、未应用, trail Seqno : 69
  • 7000-8000 抽取未传输、未应用, trail Seqno : 69
  • 8000-9000 抽取未传输、未应用, trail Seqno : 70
SQL> !ls -l
total 2088
-rw-r----- 1 oracle oinstall   1195 Nov 23 21:45 ee000067
-rw-r----- 1 oracle oinstall 969391 Nov 23 22:30 ee000068
-rw-r----- 1 oracle oinstall 324413 Nov 23 23:24 ee000069
-rw-r----- 1 oracle oinstall 162703 Nov 23 23:25 ee000070
-rw-rw-rw- 1 oracle oinstall   2216 Jun 10 21:20 es000000
-rw-r----- 1 oracle oinstall 647858 Nov 23 22:30 et000000
删除 ee000069 这个文件 
也就是 6001-8000的数据不能传输
SQL> !mv ee000069 ee000069.bak
  • 文件丢失处理
  • GGSCI (enmotech) 81> info DDUMP detail
     
    EXTRACT    DDUMP     Last Started 2014-11-23 23:26   Status RUNNING
    Checkpoint Lag       00:00:00 (updated 00:00:04 ago)
    Log Read Checkpoint  File ./dirdat/ee000068
                         2014-11-23 22:30:57.000000  RBA 969391
     
      Target Extract Trails:
     
      Remote Trail Name                                Seqno        RBA     Max MB
     
      ./dirdat/et                                          1     162801        100
     
      Extract Source                          Begin             End
     
      ./dirdat/ee000068                       2014-11-23 22:30  2014-11-23 22:30
      ./dirdat/ee000068                       2014-11-23 22:23  2014-11-23 22:30
      ./dirdat/ee000068                       2014-11-23 22:23  2014-11-23 22:23
      ./dirdat/ee000068                       2014-11-23 22:23  2014-11-23 22:23
      ./dirdat/ee000000                       * Initialized *   2014-11-23 22:23
      ./dirdat/ee000000                       * Initialized *   First Record
     
     
    Current directory    /u01/ogg1
     
    Report file          /u01/ogg1/dirrpt/DDUMP.rpt
    Parameter file       /u01/ogg1/dirprm/ddump.prm
    Checkpoint file      /u01/ogg1/dirchk/DDUMP.cpe
    Process file         /u01/ogg1/dirpcs/DDUMP.pce
    Stdout file          /u01/ogg1/dirout/DDUMP.out
    Error log            /u01/ogg1/ggserr.log

    启动ddump,让5001..6000数据过去

    GGSCI (enmotech) 79> start DDUMP
     
    Sending START request to MANAGER ...
    EXTRACT DDUMP starting
     
     
    GGSCI (enmotech) 80> info all
     
    Program     Status      Group       Lag at Chkpt  Time Since Chkpt
     
    MANAGER     RUNNING
    EXTRACT     RUNNING     DDUMP       00:55:27      00:00:07
    EXTRACT     RUNNING     EXT1        00:00:00      00:00:02
    EXTRACT     STOPPED     E_SQL       00:00:00      3985:49:41
    REPLICAT    STOPPED     RPEE        00:00:00      00:55:56
     
     
    GGSCI (enmotech) 81> info DDUMP detail
     
    EXTRACT    DDUMP     Last Started 2014-11-23 23:26   Status RUNNING
    Checkpoint Lag       00:00:00 (updated 00:00:04 ago)
    Log Read Checkpoint  File ./dirdat/ee000068
                         2014-11-23 22:30:57.000000  RBA 969391
     
      Target Extract Trails:
     
      Remote Trail Name                                Seqno        RBA     Max MB
     
      ./dirdat/et                                          1     162801        100
     
      Extract Source                          Begin             End
     
      ./dirdat/ee000068                       2014-11-23 22:30  2014-11-23 22:30
      ./dirdat/ee000068                       2014-11-23 22:23  2014-11-23 22:30
      ./dirdat/ee000068                       2014-11-23 22:23  2014-11-23 22:23
      ./dirdat/ee000068                       2014-11-23 22:23  2014-11-23 22:23
      ./dirdat/ee000000                       * Initialized *   2014-11-23 22:23
      ./dirdat/ee000000                       * Initialized *   First Record
     
     
    Current directory    /u01/ogg1
     
    Report file          /u01/ogg1/dirrpt/DDUMP.rpt
    Parameter file       /u01/ogg1/dirprm/ddump.prm
    Checkpoint file      /u01/ogg1/dirchk/DDUMP.cpe
    Process file         /u01/ogg1/dirpcs/DDUMP.pce
    Stdout file          /u01/ogg1/dirout/DDUMP.out
    Error log            /u01/ogg1/ggserr.log

    启动rpee让 4001-6000 的数据应用

    GGSCI (enmotech) 82> start rpee
     
    Sending START request to MANAGER ...
    REPLICAT RPEE starting
     
    GGSCI (enmotech) 84> info rpee
     
    REPLICAT   RPEE      Last Started 2014-11-23 23:31   Status RUNNING
    Checkpoint Lag       00:00:00 (updated 00:00:03 ago)
    Log Read Checkpoint  File ./dirdat/et000001
                         2014-11-23 22:30:57.000382  RBA 162801
     
     
     
    SQL> select max(id) from ogg2.test1;
     
       MAX(ID)
    ----------
          6000

    这里也只能应用到6000,因为6001-8000数据所在的trial文件丢失。为了让抽取进程重新抽取,查找scn

    查找REPLICAT进程的scn

    GGSCI (enmotech) 86> info rpee showch
     
    REPLICAT   RPEE      LAST Started 2014-11-23 23:31   STATUS RUNNING
    Checkpoint Lag       00:00:00 (updated 00:00:01 ago)
    Log READ Checkpoint  File ./dirdat/et000001
                         2014-11-23 22:30:57.000382  RBA 162801
     
     
    CURRENT Checkpoint Detail:
     
    READ Checkpoint #1
     
      GGS Log Trail
     
      Startup Checkpoint (starting POSITION IN the DATA SOURCE):
        SEQUENCE #: 0
        RBA: 486152
        TIMESTAMP: 2014-11-23 22:29:24.000220
        EXTRACT Trail: ./dirdat/et
     
      CURRENT Checkpoint (POSITION OF LAST record READ IN the DATA SOURCE):
        SEQUENCE #: 1
        RBA: 162801
        TIMESTAMP: 2014-11-23 22:30:57.000382
        EXTRACT Trail: ./dirdat/et
     
    Header:
      Version = 2
      Record SOURCE = A
      TYPE = 1
      # INPUT Checkpoints = 1
      # Output Checkpoints = 0
     
    File Information:
      Block SIZE = 2048
      MAX Blocks = 100
      Record LENGTH = 2048
      CURRENT Offset = 0
     
    Configuration:
      DATA SOURCE = 0
      TRANSACTION Integrity = -1
      Task TYPE = 0
     
    DATABASE Checkpoint:
      Checkpoint TABLE = goldengate.CHKtable
      KEY = 462138021 (0x1b8baaa5)
      CREATE TIME = 2014-11-23 22:26:48
     
    STATUS:
      START TIME = 2014-11-23 23:31:13
      LAST UPDATE TIME = 2014-11-23 23:35:20
      Stop STATUS = A
      LAST RESULT = 400
    SQL> SELECT GROUP_NAME,LOG_CSN,LOG_XID,LOG_CMPLT_CSN FROM  goldengate.CHKtable
      2  ;
     
    GROUP_NA LOG_CSN               LOG_XID LOG_CMPLT_CSNSN
    -------- --------------------- -----   ---------------
    RPEE     8594361572                    8594359565

    可以看到REPLICAT进程的最后一个scn是8594361572,下面用logdump查看下

  • logdump查看trail
  • ╭─oracle@enmotech /u01/ogg1
    ╰─?  ./logdump
     
    Oracle GoldenGate Log File Dump Utility for Oracle
    Version 11.2.1.0.6_03 16934271 17205864
     
    Copyright (C) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
     
     
     
    Logdump 13 >open  ./dirdat/et000001
    Current LogTrail is /u01/ogg1/dirdat/et000001
    Logdump 14 >ghdr on
    Logdump 15 >detail data
    Logdump 16 >usertoken detail
    Logdump 17 >ggstoken detail
    Logdump 18 >fileheader detail
    Logdump 19 >n
    查看文件头的开始scn、停止scn
    2014/11/23 23:26:10.718.566 FileHeader           Len  1028 RBA 0
    Name: *FileHeader*
     3000 01bf 3000 0008 4747 0d0a 544c 0a0d 3100 0002 | 0...0...GG..TL..1...
     0003 3200 0004 2000 0000 3300 0008 02f2 2ebb c0f2 | ..2... ...3.........
     8f66 3400 001e 001c 7572 693a 656e 6d6f 7465 6368 | .f4.....uri:enmotech
     3a3a 7530 313a 6f67 6731 3a44 4455 4d50 3500 0021 | ::u01:ogg1:DDUMP5..!
     3500 001d 001b 7572 693a 656e 6d6f 7465 6368 3a3a | 5.....uri:enmotech::
     7530 313a 6f67 6731 3a45 5854 3136 0000 1300 112e | u01:ogg1:EXT16......
     2f64 6972 6461 742f 6574 3030 3030 3031 3700 0001 | /dirdat/et0000017...
     
    GroupID x30 '0' TrailInfo        Info x00  Length  447
     3000 01bf 3000 0008 4747 0d0a 544c 0a0d 3100 0002 | 0...0...GG..TL..1...
     0003 3200 0004 2000 0000 3300 0008 02f2 2ebb c0f2 | ..2... ...3.........
     8f66 3400 001e 001c 7572 693a 656e 6d6f 7465 6368 | .f4.....uri:enmotech
     3a3a 7530 313a 6f67 6731 3a44 4455 4d50 3500 0021 | ::u01:ogg1:DDUMP5..!
     3500 001d 001b 7572 693a 656e 6d6f 7465 6368 3a3a | 5.....uri:enmotech::
     7530 313a 6f67 6731 3a45 5854 3136 0000 1300 112e | u01:ogg1:EXT16......
     2f64 6972 6461 742f 6574 3030 3030 3031 3700 0001 | /dirdat/et0000017...
     0138 0000 0400 0000 0139 ff00 0800 0000 0000 0000 | .8.......9..........
     003a 0000 810a 3835 3934 3335 3935 3534 0000 0000 | .:....8594359554....
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................
     0000 0000 0000 0000 0000 0000 0000 3bff 0081 0000 | ..............;.....
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................
     0000 0000 0000 003c 0000 0802 f22e bafa 999b 893d | .......<........... ff00 ....... tokenid x30 signature info x00 length gg..tl.. x31 compatibility .. x32 charset ... x33 creationtime c0f2 .......f x34 uri ..uri:enmotech::u01: ogg1:ddump x35 urihistory u01:ogg1:ext1 x36 filename x37 multipart . x38 seqno .... x39 filesize xff ........ x3a firstcsn .8594359554......... .................... ......... x3b lastcsn x3c firstiotime fa99 x3d lastiotime groupid machineinfo .enmotech2.....2.6.3 smp tue sep pdt .....x8 sysname ..linux nodename ..enmotech release ..2.6.39-400.215.10. el5uek version hardware ..x86_64 databaseinfo ....5.....6.....orac le database ente rprise edition relea se t production.pl production.core.11. ns for linux: versio n produ ction.nlsrtl produc tion.7... ........... vendor name ..orcl instance majorversion minorversion verstring ..oracle g enterprise production.p l .3.0 production.co re.11.2.0.3.0.produc tion.tns production.nlsrtl v ersion production. clientcharset clientverstring ..11.2.0.3.0 clientncharset dblocale dbncharset dbobjnamemetadata producerinfo ....6.....7..-. ion ..ext1 datasource maintlevel bugfixlevel buildnumber _03 continunityinfo recoverymode logdump>
     
     
    Logdump 39 >count --统计下记录数,以便跳到最好一条记录
    LogTrail /u01/ogg1/dirdat/et000001 has 1002 records
    Total Data Bytes             47028
      Avg Bytes/Record              46
    Insert                        1000
    RestartOK                        1
    Others                           1
    After Images                  1001
     
    Average of 1002 Transactions
        Bytes/Trans .....         94
        Records/Trans ...          1
        Files/Trans .....          1
     
     
                                                       Partition 0
    RestartOK                        1
    After Images                     1
     
    *FileHeader*                                       Partition 0
    Total Data Bytes              1028
      Avg Bytes/Record            1028
    Others                           1
     
    OGG1.TEST1                                         Partition 4
    Total Data Bytes             46000
      Avg Bytes/Record              46
    Insert                        1000
    After Images                  1000
    Logdump 40 >
     
     
    Logdump 41 >n
    ___________________________________________________________________
    Hdr-Ind    :     E  (x45)     Partition  :     .  (x04)
    UndoFlag   :     .  (x00)     BeforeAfter:     A  (x41)
    RecLength  :    46  (x002e)   IO Time    : 2014/11/23 22:30:57.000.382
    IOType     :     5  (x05)     OrigNode   :   255  (xff)
    TransInd   :     .  (x03)     FormatType :     R  (x52)
    SyskeyLen  :     0  (x00)     Incomplete :     .  (x00)
    AuditRBA   :        744       AuditPos   : 18681552
    Continued  :     N  (x00)     RecCount   :     1  (x01)
     
    2014/11/23 22:30:57.000.382 Insert               Len    46 RBA 162639
    Name: OGG1.TEST1
    After  Image:                                             Partition 4   G  s
     0000 0008 0000 0004 3630 3030 0001 0005 0000 0001 | ........6000........
     6100 0200 1500 0032 3031 342d 3131 2d32 333a 3232 | a......2014-11-23:22
     3a33 303a 3537                                    | :30:57
    Column     0 (x0000), Len     8 (x0008)
     0000 0004 3630 3030                               | ....6000
    Column     1 (x0001), Len     5 (x0005)
     0000 0001 61                                      | ....a
    Column     2 (x0002), Len    21 (x0015)
     0000 3230 3134 2d31 312d 3233 3a32 323a 3330 3a35 | ..2014-11-23:22:30:5
     37                                                | 7
     
    GGS tokens:
    TokenID x52 'R' ORAROWID         Info x00  Length   20
     4141 4145 536b 4141 4a41 4141 626a 6c41 454d 0001 | AAAESkAAJAAAbjlAEM..
    TokenID x4c 'L' LOGCSN           Info x00  Length   10
     3835 3934 3336 3135 3732                          | 8594361572    --最后一个事物的scn好
    TokenID x36 '6' TRANID           Info x00  Length    9
     3332 2e32 342e 3234 38                            | 32.24.248
     
    rpee的检查点信息
     
    Log Read Checkpoint  File ./dirdat/et000001
                         2014-11-23 22:30:57.000382  RBA 162801
    AuditRBA   :        744       AuditPos   : 18681552
    TokenID x4c 'L' LOGCSN           Info x00  Length   10
     3835 3934 3336 3135 3732                          | 8594361572

    这里找到scn号为8594361572

  • 调整进程
  • GGSCI (enmotech) 2> stop ddump
     
    Sending STOP request to EXTRACT DDUMP ...
    Request processed.
     
     
    GGSCI (enmotech) 3> stop ext1
     
    Sending STOP request to EXTRACT EXT1 ...
    Request processed.
     
     
     
    GGSCI (enmotech) 6> info ext1 detail
     
    EXTRACT    EXT1      Initialized   2014-11-23 23:25   Status STOPPED
    Checkpoint Lag       00:00:00 (updated 00:00:15 ago)
    Log Read Checkpoint  Oracle Redo Logs
                         2014-11-23 23:46:48  Seqno 744, RBA 24420864
                         SCN 2.4435992 (8594370584)
     
      Target Extract Trails:
     
      Remote Trail Name                                Seqno        RBA     Max MB
     
      ./dirdat/ee                                         71          0        100
     
    GGSCI (enmotech) 4> alter ext1 etrollover  --进程新开始trail文件号 
     
    2014-11-23 23:47:12  INFO    OGG-01520  Rollover performed.  For each affected output trail of Version 10 or higher format, after starting the source extract, issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file;  it will not happen automatically.
    EXTRACT altered.
     
    GGSCI (enmotech) 8> ALTER EXTRACT ext1 ,SCN 8594361572  --更改进程抽取scn号
    EXTRACT altered. 
     
     
    GGSCI (enmotech) 9> info ext1
     
    EXTRACT    EXT1      Initialized   2014-11-23 23:48   Status STOPPED
    Checkpoint Lag       00:00:00 (updated 00:00:04 ago)
    Log Read Checkpoint  Oracle Redo Logs
                         First Record         Seqno 0, RBA 0
                         SCN 2.4426980 (8594361572)
     
     
    GGSCI (enmotech) 10> start ext1
     
    Sending START request to MANAGER ...
    EXTRACT EXT1 starting
     
    2014-11-23 23:49:00  INFO    OGG-01052  Oracle GoldenGate Capture for Oracle, ext1.prm:  No recovery is required for target file ./dirdat/ee000071, at RBA 0 (file not opened).
    2014-11-23 23:49:00  INFO    OGG-01478  Oracle GoldenGate Capture for Oracle, ext1.prm:  Output file ./dirdat/ee is using format RELEASE 11.2.
    2014-11-23 23:49:00  INFO    OGG-01517  Oracle GoldenGate Capture for Oracle, ext1.prm:  Position of first record processed Sequence 744, RBA 18680848, SCN 2.4426977, Nov 23, 2014 10:30:57 PM.
    2014-11-23 23:49:00  WARNING OGG-00869  Oracle GoldenGate Capture for Oracle, ext1.prm:  No unique key is defined for table 'TEST1'. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.
     
     
    GGSCI (enmotech) 12> alter ddump etrollover  --让trail seq 前滚
     
    2014-11-23 23:50:33  INFO    OGG-01520  Rollover performed.  For each affected output trail of Version 10 or higher format, after starting the source extract, issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file;  it will not happen automatically.
    EXTRACT altered.
     
    GGSCI (enmotech) 14> alter ddump ,EXTSEQNO 71,EXTRBA 0  更改抽取的位置
    EXTRACT altered.
     
     
    GGSCI (enmotech) 15> info ddump
     
    EXTRACT    DDUMP     Initialized   2014-11-23 23:51   Status STOPPED
    Checkpoint Lag       00:00:00 (updated 00:00:06 ago)
    Log Read Checkpoint  File ./dirdat/ee000071
                         First Record  RBA 0
     
    GGSCI (enmotech) 17> info ddump
     
    EXTRACT    DDUMP     Last Started 2014-11-23 23:52   Status RUNNING
    Checkpoint Lag       00:00:00 (updated 00:00:03 ago)
    Log Read Checkpoint  File ./dirdat/ee000071
                         2014-11-23 23:25:32.000000  RBA 486118
     
     
    GGSCI (enmotech) 16>
     
    2014-11-23 23:52:16  INFO    OGG-01052  Oracle GoldenGate Capture for Oracle, ddump.prm:  No recovery is required for target file ./dirdat/et000002, at RBA 0 (file not opened).
    2014-11-23 23:52:16  INFO    OGG-01478  Oracle GoldenGate Capture for Oracle, ddump.prm:  Output file ./dirdat/et is using format RELEASE 11.2.
    2014-11-23 23:52:16  INFO    OGG-01669  Oracle GoldenGate Collector for Oracle:  Opening ./dirdat/et000002 (byte -1, current EOF 0).
     
     
     
    GGSCI (enmotech) 25> alter rpee , EXTSEQNO 2 ,EXTRBA 0  --更改抽取的位置
    REPLICAT altered.
     
     
    GGSCI (enmotech) 26> start rpee,aftercsn 8594361572   --指定scn开始
     
    Sending START request to MANAGER ...
    REPLICAT RPEE starting
     
     
    2014-11-23 23:55:21  INFO    OGG-00996  Oracle GoldenGate Delivery for Oracle, rpee.prm:  REPLICAT RPEE started.
    2014-11-23 23:55:21  INFO    OGG-01373  Oracle GoldenGate Delivery for Oracle, rpee.prm:  User requested start after CSN 8594361572.
    2014-11-23 23:55:21  INFO    OGG-01374  Oracle GoldenGate Delivery for Oracle, rpee.prm:  Transaction delivery commencing at position Seqno 2, RBA 1036, Transaction ID 31.32.234, CSN 8594364094, 0 transaction(s) skipped.
    2014-11-23 23:55:21  WARNING OGG-00869  Oracle GoldenGate Delivery for Oracle, rpee.prm:  No unique key is defined for table 'TEST1'. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.

    验证

    SQL> SELECT COUNT(*) FROM ogg2.test1 WHERE id>6000;
     
      COUNT(*)
    ----------
          3000
     
    SQL> SELECT COUNT(*) FROM ogg1.test1 WHERE id>6000;
     
      COUNT(*)
    ----------
          3000
     
    SQL>  SELECT COUNT(*) FROM ogg1.test1 WHERE id>1000;
     
      COUNT(*)
    ----------
          8000
     
    SQL> SELECT COUNT(*) FROM ogg2.test1 WHERE id>1000;
     
      COUNT(*)
    ----------
          8000