2014-12-24 Created by Abalone new
I. Summary
1.OGG is data synchronization software, or logical replication software, its competitors have IBM Cdc,dell Shareplex,dsg,dds and so on.
2.OGG software is required to be installed on the operating system, Oracle DB software does not have its own OGG software (at least for now)
3.OGG software has three major processes (say four processes also line):
Three major processes: source extraction process, source transfer process, destination application process (i.e.: replication process)
Four processes: Source extraction process, source transfer process, destination server process (responsible for writing trail files on destination), destination application process (i.e., replication process)
There are two types of trail file for 4.OGG software
Trail file at Source: written by the source extraction process.
Destination Trail File: The source transfer process is transmitted to the destination, and the server process on the destination is written to the destination operating system under the specified path.
The three major processes in 5.OGG software have their own checkpoint (i.e. checkpoint, which is used to record where each process is read and where it is written)
Source extraction process: Read checkpoint and write checkpoint.
SOURCE transfer process: There are read checkpoints and write checkpoints.
Destination application process: have read Check point
The process of handling trail file in the three major processes of 6.OGG software:
Source extraction Process: Read the Oracle Redo log (assuming the source database is Oracle), combined with the extraction process parameter file, the contents of the redo log into Ogg-formatted file (that is, trail file), and written to the source operating system under the specified path
SOURCE transfer process: Read the "source extraction process Write Trail file", in conjunction with the transfer process parameters file, send the data that needs to be synchronized to the destination, at the destination is the server process responsible for writing.
Destination application process: Read the trail file under the specified path of the destination operating system, and combine the application process's parameter file to form an SQL statement that executes these SQL statements on the destination DB.
Second, Extract Process
Third, Dump Process
Iv. Replicate Process
V. Testing
1. Source Creation Extract
Add extract Ext1,tranlog, begin now
Add Exttrail/u01/ggate/dirdat/lt, extract Ext1
View params Ext1
2. SOURCE Creation Pump
Add Extract Dpump,exttrailsource/u01/ggate/dirdat/lt
Add Rmttrail/u01/ggate/dirdat/lt, extract Dpump
View params dpump
3. Target Create Replicat
3.1 Checkpoint of the configuration process
Edit params./global
Ggschema ggate
Checkpointtable Ggate.checkpoint
3.2 ggate user connecting DB, creating checkpoint table in db
Add Checkpoint Tableggate.checkpoint
3.3 Creating Replicat Group
Add Replicatrep1,exttrail/u01/ggate/dirdat/lt, Checkpointtable ggate.checkpoint
3.4 Modifying parameters
View params REP1
4. Start the Extract/dump/replicat process
5. Testing
Start Ext1
Info Ext1
Info Dpump
Start REP1
Info REP1
verify:
-- Source DB:
sql> conn dave/dave;
Connected.
Sql> Select COUNT (*) from PDBA;
count (*)
----------
2706623
--target DB:
Sql> Select COUNT (*) from PDBA;
count (*)
----------
2706623
Insert a piece of data in source DB:
sql> INSERT INTO PDBA values (2,sysdate);
1 row created.
Sql> commit;
Commit complete.
Sql> Select COUNT (*) from PDBA;
count (*)
----------
2706624
to target DB query:
sql> Select COUNT (*) from PDBA;
count (*)
----------
2706624
Reference: shined-http://www.cnblogs.com/shined/archive/2012/07/12/2587648.html
Reference: msdnchina-http://blog.csdn.net/msdnchina/article/details/38347285
Dba_oracle goldengate Three steps Extract/dump/relicat