Understanding of Extract in Oracle Goldengate reproduced in checkpoint

Source: Internet
Author: User

What is checkpoint?

Checkpoint in an Oracle database is the event that forces the dirty data in memory to be written to disk, which is to keep the data in memory consistent with the data on the disk. The SCN is used to describe the exact point in time at which the event occurred.

And the checkpoint that appear in goldengate have different meanings. Simply put is position, the position of the meaning. It records the progress of the extract process as it extracts the transaction.
Use the Info showch command to view the checkpoint that are logged in the currently running extract process.

When Goldengate is interrupted by planned or unplanned, where do we continue to keep the continuity of the business? The answer is: where to break, where to continue. It is inaccurate to use timestamps in a busy database to measure the progress of Ogg extraction, because any point in time may truncate the transaction in process. An accurate method of recording is to refer to the byte position (RBA) of the trail file where the thing originated.

Startup checkpoint:

The extract process starts with information that describes an exact point in time with multiple parameters. including Thread,sequence,timestamp,rba,scn,redo log
Sequence represents the serial number of redo log, or archive log.
RBA represents the byte address in the sequence log file for the change point.
SCN indicates Oracle internal clock

Recovery checkpoint:

The transaction information that has not been completed so far and takes the longest time. Includes Thread,sequence,timestamp,rba,scn,redo log.
If the extraction process on the source side is interrupted, then the location where the breakpoint continues to be transmitted is here.

Current checkpoint:

The transaction information that is currently being read. including Thread,sequence,timestamp,rba,scn,redo log

Write Checkpoint:
The trail file information that is currently being written. Include queue number (sequence), RBA, timestamp, queue file
Sequence represents the ordinal of a trail file, as opposed to the concept of the same name in the database. Example: Trail file ex000001 's sequence is 1

RBA represents the location of the current information in the trail file, as opposed to the RBA of the transaction log in the database. Typically this RBA value equals the size of the trail file that is currently being written.
You can compare the RBA of the write checkpoint by Ls-al/dirdat/ex000001 to view the number of bytes in the file.


The following is a screen output that corresponds to the concept just mentioned. At the beginning of the experiment, you also need to execute the command again to get the latest checkpoint information.

To view the checkpoint of the extraction process EX1:
Ggsci (node3) 9> info ex1 showch

EXTRACT EX1 last Started 2014-11-03 13:23 Status RUNNING << Process start extracting the transaction time, ADD EXTRACT after the effective
Checkpoint Lag 00:00:03 (updated 00:00:07 ago)
Log Read Checkpoint Oracle Redo Logs
2014-11-03 15:13:04 Thread 1, seqno, RBA 26012672 << 2-node RAC has 2 checkpoint
SCN 0.1614343 (1614343)
Log Read Checkpoint Oracle Redo Logs
2014-11-03 15:13:02 Thread 2, seqno, RBA 6584832
SCN 0.1614345 (1614345)

Current Checkpoint Detail:

Read Checkpoint #1 << extraction Process Reading checkpoint node 1

Oracle threaded Redo Log

Startup Checkpoint (starting position in the data source):
Thread #: 1
Sequence #: 11
rba:6084096
Timestamp:2014-11-02 17:41:26.000000
Scn:not available
Redo File:

Recovery checkpoint is the focus of our continued transmission.
Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
Thread #: 1
Sequence #: << Queue number
rba:26012176 << where in the queue
TIMESTAMP:2014-11-03 15:13:04.000000 << Transaction initiated timestamp
scn:0.1614343 (1614343)
Redo File: +data/prod/onlinelog/group_1.299.859509355

Current Checkpoint (position of last record, read in the data source):
Thread #: 1
Sequence #: 21
rba:26012672
timestamp:2014-11-03 15:13:04.000000
scn:0.1614343 (1614343)
Redo File: +data/prod/onlinelog/group_1.299.859509355

Read Checkpoint #2 << extraction Process reading Checkpoint Node 2

Oracle threaded Redo Log

Startup Checkpoint (starting position in the data source):
Thread #: 2
Sequence #: 11
rba:4263936
Timestamp:2014-11-02 17:41:26.000000
Scn:not available
Redo File:

Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
Thread #: 2
Sequence #: 29
rba:6584336
timestamp:2014-11-03 15:13:02.000000
scn:0.1614345 (1614345)
Redo File: +data/prod/onlinelog/group_3.301.859509357

Current Checkpoint (position of last record, read in the data source):
Thread #: 2
Sequence #: 29
rba:6584832
timestamp:2014-11-03 15:13:02.000000
scn:0.1614345 (1614345)
Redo File: +data/prod/onlinelog/group_3.301.859509357

Write Checkpoint #1

GGS Log Trail

Current Checkpoint (current write position):
Sequence #: 47
rba:1124760
timestamp:2014-11-03 15:13:07.093886
Extract Trail:/goldengate/dirdat/ex

CSN State information:
Crc:e4-d6-3b-b4
Csn:not available

Header:
Version = 2
Record Source = A
Type = 11
# Input checkpoints = 2
# Output checkpoints = 1

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

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

Status:
Start time = 2014-11-03 13:23:05
Last Update time = 2014-11-03 15:13:07
Stop Status = A
Last Result = 0


There are 1 million records on the current source side
[Email protected] > select COUNT (*) from SNOW.T1;

COUNT (*)
----------
1000000

System time is 2014-11-03 15:37:08
[EMAIL protected] > alter session set nls_date_format= ' Yyyy-mm-dd hh24:mi:ss ';

Session altered.

[Email protected] > select sysdate from Dual;

Sysdate
-------------------
2014-11-03 15:37:08

The source side inserts a new data, does not commit
[email protected] > INSERT INTO SNOW.T1 values (1000001, ' snow ');

1 row created.

[Email protected] >

Turn off all extract processes on the source side
Ggsci (NODE3) 4> stop *

Sending STOP request to EXTRACT DP1 ...
Request processed.

Sending STOP request to EXTRACT EX1 ...
Request processed.

Observe the latest checkpoint information
Ggsci (node3) 14> info ex1 showch

EXTRACT EX1 last Started 2014-11-03 15:41 Status RUNNING
Checkpoint Lag 00:00:02 (updated 00:00:01 ago)
Log Read Checkpoint Oracle Redo Logs
2014-11-03 15:41:48 Thread 1, seqno, RBA 27887616
SCN 0.1620285 (1620285)
Log Read Checkpoint Oracle Redo Logs
2014-11-03 15:41:46 Thread 2, seqno, RBA 7889920
SCN 0.1620284 (1620284)

Current Checkpoint Detail:

Read Checkpoint #1

Oracle threaded Redo Log

Startup Checkpoint (starting position in the data source):
Thread #: 1
Sequence #: 21
rba:27644432
timestamp:2014-11-03 15:39:18.000000
Scn:not available
Redo File: +data/prod/onlinelog/group_3.301.859509357

Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
Thread #: 1
Sequence #: 21
rba:27887120
timestamp:2014-11-03 15:41:48.000000
scn:0.1620285 (1620285)
Redo File: +data/prod/onlinelog/group_1.299.859509355

Current Checkpoint (position of last record, read in the data source):
Thread #: 1
Sequence #: 21
rba:27887616
timestamp:2014-11-03 15:41:48.000000
scn:0.1620285 (1620285)
Redo File: +data/prod/onlinelog/group_1.299.859509355

Read Checkpoint #2

Oracle threaded Redo Log

Startup Checkpoint (starting position in the data source):
Thread #: 2
Sequence #: 29
rba:7750160
timestamp:2014-11-03 15:39:16.000000
Scn:not available
Redo File: +data/prod/onlinelog/group_3.301.859509357

Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
Thread #: 2
Sequence #: 29
rba:7750160
timestamp:2014-11-03 15:37:40.000000
scn:0.1619666 (1619666)
Redo File: +data/prod/onlinelog/group_3.301.859509357

Current Checkpoint (position of last record, read in the data source):
Thread #: 2
Sequence #: 29
rba:7889920
timestamp:2014-11-03 15:41:46.000000
scn:0.1620284 (1620284)
Redo File: +data/prod/onlinelog/group_3.301.859509357

Write Checkpoint #1

GGS Log Trail

Current Checkpoint (current write position):
Sequence #: 48
rba:1076
timestamp:2014-11-03 15:41:50.718150
Extract Trail:/goldengate/dirdat/ex

CSN State information:
crc:ce-db-ce-78
Csn:not available

Header:
Version = 2
Record Source = A
Type = 11
# Input checkpoints = 2
# Output checkpoints = 1

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

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

Status:
Start time = 2014-11-03 15:41:29
Last Update time = 2014-11-03 15:41:50
Stop Status = A
Last Result = 0


Modify the extraction process start location, two processes
Ggsci (node3) 7> ALTER EXTRACT Ex1, extseqno, Extrba 27644432 THREAD 1
EXTRACT altered.

Ggsci (node3) 8> ALTER EXTRACT Ex1, extseqno, Extrba 7750160 THREAD 2
EXTRACT altered.


After restarting the process, the source side initiates the commit name and ends the transaction.
[email protected] > commit;

Commit complete.

1,000,001th Data Insertion Complete
[Email protected] > select COUNT (*) from SNOW.T1;

COUNT (*)
----------
1000001

Target end 1,000,001th data copy complete!
Sql> Select COUNT (*) from SNOW.T1;

COUNT (*)
----------
1000001

End of experiment

http://blog.itpub.net/29047826/viewspace-1328761/

Understanding of Extract in Oracle Goldengate reproduced in checkpoint

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.