GoldenGate 12c - Coordinated Delivery Example
By Jinyu Wang on Dec 28, 2013
In the previous blog, I discussed the basic concept of coordinated delivery (replicat). In this blog, let's look at an example for setting up a coordinated delivery (replicat) using Oracle GoldenGate. This example runs with Oracle GoldenGate for MySQL, and the code can be downloaded from the following file:
In this replicat, there are four tables. STUDENT1 table is replicated with thread 1 to 3. STUDENT 2 table is replicated with thread 5. Without specifying the thread, the multiRecTrans_MRK table is replicated with the lowest thread 1.
In coordinated replicat, DDL, PK-UPDATE, records for maps with the COORDINATED parameter, and EVENTACTIONS are all considered as barrier transactions. Barrier transactions are applied with the barrier thread. The EVENT_TBL is replicated with the barrier thread, which is the lowest thread (thread 1 in this example).
You can add the replicat and start the replicat process and check it's status as follows:
GGSCI> dblogin sourcedb dtetgt userid dteusr1t, password dteusr1t GGSCI> add checkpointtable dtetgt.checkPoint_crrep GGSCI> add replicat crrep, exttrail ./dirdat/cr_example/bg, COORDINATED, MAXTHREADS 15, checkpointtable dtetgt.checkPoint_crrep
The status shows that the replicat is a COORDINATED replicat with maximum 15 threads. Let's check how many threads are actually running for this replicat:
The status shows that there are 7 threads for the replicat with 1 coordinating thread (CRREP) and 6 processing threads (CRREP001...007). The example performs DML operations using the following command:
Oracle GoldenGate replicates the data to the target and you can then check the status with the following command:
There are 4 DML operations on the EVENT_TBL1 table. Because it is setup as the coordinated process, you can see 4 transactions shown in the user-requested coordination in the "Coordinated Replicat Statistics" . You can also check each thread's report as follows:
The report shows the detailed operation per thread with statistics. The following is an example report in thread 5:
The report shown that only the STUDENT12 table is replicated in this tread with 103 inserts, 3 deletes and 1 discard operation.
We have now completed this example. Feel free to send your questions and comments.