OGG_Oracle GoldenGate three-step Extract/Dump/Relicat (case study), goldengaterelicat

Source: Internet
Author: User

OGG_Oracle GoldenGate three-step Extract/Dump/Relicat (case study), goldengaterelicat

Create By Bao

I. Summary

1. OGG is a data synchronization software, or logic replication software. Its competitors include ibm cdc, DELL shareplex, DSG, and DDS.

2. OGG software must be installed on the operating system. Oracle DB software does not have its own OGG software (at least currently)

3. The OGG software has three major processes (the four major processes can also be said ):

Three processes: Source extraction process, source transmission process, and target application process (namely, replication process)

Four processes: the source extraction process, the source transmission process, the target server process (responsible for writing the trail file to the target), and the target application process (namely, the replication process)

4. OGG software has two types of trail file

Source trail file: written by the source extraction process.

Destination trail file: the source transmission process is transmitted to the destination, and the destination server process is written to the specified path of the destination operating system.

5. All three processes in OGG software have their own checkpoints (I .e., checkpoints are used to record the locations where each process reads and writes)

Source extraction process: there are read and write checkpoints

Source transmission process: there are read and write checkpoints

Target application process: there is a read checkpoint

6. Three major OGG software processes the trail file:

Source extraction process: Read the oracle redo log (assuming that the source database is oracle), and convert the content in the redo log into a file in OGG's own format (that is, a trail file) in combination with the parameter file of the extraction process ), and write it to the specified path of the source operating system.

Source transmission process: read "The trail file written by the source extraction process", send the data to be synchronized to the target end in combination with the parameter file of the transmission process, the server process is responsible for writing data to the target end.

Target application process: Read the trail file in the specified path of the target operating system, combine the parameter files of the application process to form SQL statements, and execute these SQL statements on the target database.

 

Ii. Extract Process

Create Extract Process

Step 1. Add the extract Program

GGSCI (gavinprod.com) 51> add extract ext2, tranlog, begin nowEXTRACT added.

Step2. define the extract directory

GGSCI (gavinprod.com) 52> add exttrail /opt/oracle/ggate/dirdat/ld, extract ext2EXTTRAIL added.

Step3. define the extract Parameter

Edit params ext1

GGSCI (gavinprod.com) 19> edit params EXT2extract ext2userid ggate@gavinprod, password oracleexttrail /opt/oracle/ggate/dirdat/ldddl include mapped objname source_prod.*;table source_prod.*;

 

Iii. Dump Process

Create Dump Process

Step 1. Add the dump Program

GGSCI (gavinprod.com) 60> add extract dmp2,exttrailsource /opt/oracle/ggate/dirdat/ldEXTRACT added.

Step2. define the dump directory

GGSCI (gavinprod.com) 62> add rmttrail /opt/oracle/ggate/dirdat/ld, extract dmp2RMTTRAIL added.

Step3. define dump Parameters

GGSCI (gavinprod.com) 71> view params DMP2extract dmp2userid ggate@gavinprod, password oraclermthost odellprod.com, mgrport 7809rmttrail /opt/oracle/ggate/dirdat/ltpassthrutable source_prod.*;

 

Iv. Replicat Process

Create Replicat Process

Step 1. Add the replicat Program

GGSCI (odellprod.com) 8> add replicat rep2, exttrail /opt/oracle/ggate/dirdat/ld, checkpointtable ggate.checkpointREPLICAT added.

Step2. define the replicat Parameter

GGSCI (odellprod.com) 11> view params REP2replicat rep2ASSUMETARGETDEFSuserid ggate@odellprod,password oraclediscardfile /opt/oracle/ggate/dirdat/rep2_discard.txt, append, megabytes 10map source_prod.*, target target_prod.*;

 

V. Test

1. Create test data on the source data end

CREATE TABLE source_prod.bxj_test_ogg_dump(   test_date          DATE,   test_description   VARCHAR2 (100));INSERT INTO source_prod.bxj_test_ogg_dump VALUES (sysdate,'test goldendate data transfer by extract/dump/replicat');

2. Source Database, process and file

GGSCI (gavinprod.com) 17> info allProgram     Status      Group       Lag at Chkpt  Time Since ChkptMANAGER     RUNNING                                           EXTRACT     RUNNING     DMP2        00:00:00      00:00:07    EXTRACT     RUNNING     EXT1        00:00:00      00:00:08    EXTRACT     RUNNING     EXT2        00:00:00      00:00:06

2. Target Database, processes and files

GGSCI (odellprod.com) 6> info allProgram     Status      Group       Lag at Chkpt  Time Since ChkptMANAGER     RUNNING                                           REPLICAT    RUNNING     REP1        00:00:00      00:00:03    REPLICAT    RUNNING     REP2        00:00:00      00:00:03  

3. Checkpoint table

 

Reference: shined-http://www.cnblogs.com/shined/archive/2012/07/12/2587648.html

Reference: msdnchina-http://blog.csdn.net/msdnchina/article/details/38347285

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.