Oracle GoldenGate extract進程的工作方式

來源:互聯網
上載者:User

Oracle goldengate先從online log日誌抽取資料,然後才會從archived log中進行抽取,這可以通過下面的方式來驗證.

1、主庫端插入測試資料
SQL> insert into gg1.dept values(81,'1','1');

1 row created.

SQL> commit;

Commit complete.

SQL> alter system switch logfile;

System altered.

SQL> insert into gg1.dept values(82,'2','2');

1 row created.

SQL> commit;

Commit complete.

SQL> insert into gg1.dept values(83,'3','3');

1 row created.

SQL> commit;

Commit complete.

SQL> alter system switch logfile;

System altered.

SQL> insert into gg1.dept values(84,'4','4');

1 row created.

SQL> commit;

Commit complete.

在這裡多次執行alter system switch logfile;

這裡比較關鍵,在後面我們會刪除, 82、83對應的歸檔日誌, 如果沒有覆蓋掉82、83對應的online log,goldengate的extract進程不會異常中止,extract進程會優選online log。

2、在這裡我們覆蓋掉online log,然後刪除82、83對應的歸檔日誌。

3、查看goldengate狀態,extract進程異常中止
GGSCI (slav2) 1> info all

Program Status Group Lag Time Since Chkpt

MANAGER RUNNING
EXTRACT RUNNING D1PUMP 00:00:00 00:00:02
EXTRACT ABENDED EXT1 00:03:10 00:02:29

GGSCI (slav2) 2> info ext1

EXTRACT EXT1 Last Started 2013-01-21 22:15 Status ABENDED
Checkpoint Lag 00:03:10 (updated 00:02:33 ago)
Log Read Checkpoint Oracle Redo Logs
2013-01-21 22:11:50 Seqno 28, RBA 67584

[oracle@slav2 ggs]$ vi ggserr.log
2013-01-21 22:14:59 INFO OGG-00975 Oracle GoldenGate Manager for Oracle, mgr.prm: EXTRACT EXT1 starting.
2013-01-21 22:14:59 INFO OGG-00992 Oracle GoldenGate Capture for Oracle, ext1.prm: EXTRACT EXT1 starting.
2013-01-21 22:15:00 WARNING OGG-01423 Oracle GoldenGate Capture for Oracle, ext1.prm: No valid default archive log destination directory found for thread 1.
2013-01-21 22:15:00 INFO OGG-01513 Oracle GoldenGate Capture for Oracle, ext1.prm: Positioning to Sequence 28, RBA 67088.
2013-01-21 22:15:00 INFO OGG-01516 Oracle GoldenGate Capture for Oracle, ext1.prm: Positioned to Sequence 28, RBA 67088, Jan 21, 2013 10:11:50 PM.
2013-01-21 22:15:00 INFO OGG-00993 Oracle GoldenGate Capture for Oracle, ext1.prm: EXTRACT EXT1 started.
2013-01-21 22:15:00 INFO OGG-01055 Oracle GoldenGate Capture for Oracle, ext1.prm: Recovery initialization completed for target file /u01/app/ggs/dirdat/lt000004, at RBA 1672.
2013-01-21 22:15:00 INFO OGG-01478 Oracle GoldenGate Capture for Oracle, ext1.prm: Output file /u01/app/ggs/dirdat/lt is using format RELEASE 10.4/11.1.
2013-01-21 22:15:00 INFO OGG-01026 Oracle GoldenGate Capture for Oracle, ext1.prm: Rolling over remote file /u01/app/ggs/dirdat/lt000004.
2013-01-21 22:15:00 INFO OGG-01053 Oracle GoldenGate Capture for Oracle, ext1.prm: Recovery completed for target file /u01/app/ggs/dirdat/lt000005, at RBA 968.
2013-01-21 22:15:00 INFO OGG-01057 Oracle GoldenGate Capture for Oracle, ext1.prm: Recovery completed for all targets.
2013-01-21 22:15:00 INFO OGG-01517 Oracle GoldenGate Capture for Oracle, ext1.prm: Position of first record processed Sequence 28, RBA 67088, SCN 0.610617, Jan 21, 2013 10:11:50 PM.

  • 1
  • 2
  • 下一頁

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.