GGMicroservices

Update December 28, 2018

Bi-Directional Replication, AutoCDR, Rapid Deployment and Intro to the Admin Client

Introduction

Since we’ve already done multiple labs, this one will take what we used so far to script this using DB container reset scripts, SQL scripts to setup AutoCDR in the database, OGGCA silent deployment scripts and GG REST API scripts to do a rapid deployment.

Objectives

Required Artifacts

STEP 1: Run a script to perform a rapid deployment.

While it’s running note the messages displayed that informs what has been added to the services.You should see the below message to be sure that all the steps are completed.

STEP 2: Check the deployment using the AdminClient

This step will be a short introduction to the AdminClient. If you’re familiar with Classic GoldenGate, this would be like using GGSCI. However, the advantage with the AdminClient is that you can connect to separate GG deployments from this one interface. With GGSCI you would need to execute it in each server environment where GG is installed.
In this step we will use the AdminClient to check the deployment instead of the web interface.

You’ll see an error that you have to specify the deployment name and it will give you a list of deployments.

STEP 3: Add AutoCDR to tables in the database.

When more than one replica of a table allows changes to the table, a conflict can occur when a change is made to the same row in two different databases at nearly the same time. Oracle GoldenGate replicates changes using the row LCRs. It detects a conflict by comparing the old values in the row LCR for the initial change from the origin database with the current values of the corresponding table row at the destination database identified by the key columns. If any column value does not match, then there is a conflict. After a conflict is detected, Oracle GoldenGate can resolve the conflict by overwriting values in the row with some values from the row LCR, ignoring the values in the row LCR, or computing a delta to update the row values.

Automatic conflict detection and resolution does not require application changes for the following reasons:

•	Oracle Database automatically creates and maintains invisible timestamp columns.

•	Inserts, updates, and deletes use the delete tombstone log table to determine if a row was deleted.

•	LOB column conflicts can be detected.

•	Oracle Database automatically configures supplemental logging on required columns.

This step runs the ADD_AUTO_CDR procedure in the DBMS_GOLDENGATE_ADM package in the database.

This script performs the following:

1.	Logs into the database.

2.	Changes session to a container.

3.	Executes the ADD_AUTO_CDR procedure in the DBMS_GOLDENGATE_ADM package.  This sets up the timestamp conflict detection and resolution.  You have to do this for any table you want to enable for CDR.  That’s why it’s best to have this scripted for multiple tables.

STEP 4: Start Replication

STEP 5: Run transactions and check conflicts with Performance Metric Service

In this step we’ll use a script to invoke Swingbench to apply data to both databases at the same time and then check them using the Performance Metric Service.

This script runs the swingbench jobs you ran in the other labs, but this time it will run two jobs in the background and each job applies data to one or the other databases.

On this screen you’ll see the number of operations performed and their types and also the number of conflicts detected, and the number of conflicts resolved. This is done automatically by the AutoCDR configuration.

If you want, you can check the Replicat of the other deployment and you’ll see a similar display.

You have completed lab 600! Great Job!

Click here to return