GoldenGate Cloud Service (GGCS): Configure GoldenGate to replicate data

imageGoldenGate Cloud Service is part of Oracle’s PaaS portfolio. From technical perspective it is just standard GoldenGate deployed on VM in Oracle Cloud. So same already proven architecture works in Cloud.

GGCS can be used for different cases from zero downtime migration to real-time DWH feeding. More cases like BigData and data pipeline feeding are on the way.

So what do you need to use GoldenGate Cloud Service. You should have:

  • database instance in cloud (DBaaS or ExadataCS)
  • subscription for GoldenGate Cloud Service.
  • storage cloud service (it used for backup)

GGCS is available as Non Metered service now. If you use GGCS Non-Metered Service then you should pay money even if your GoldenGate instance is down.

Soon GGCS will be available as a Metered Service. So it will possible to pay on per hour basis. This capability will open new cases like Dev/Test Cloud Environment Synchronization. Just imagine you have database in cloud for testing purposes. You should periodically (every week/month) synchronize it with production database. So you don’t need GGCS running for all time but run it for 2 hours every Sunday to apply captured data. This approach can save a lot of money.

GoldenGate Cloud Service Architecture

GoldenGate replication solution for cloud consists of two parts: on-premise and public cloud part. On-premise part is absolutely same as we have for pure on-premise solution. Public part is separate compute instance with deployed GoldenGate. You can open ports on GoldenGate instance or tunnel data through SSH (preferred because of security) to transfer data.

You can see architecture of GoldenGate deployment for upstream case where GoldenGate synchronizes public cloud database instance using trail delivered from on-premise database.

Let’s configure GoldenGate for this case.

Configuring GoldenGate for uploading data to Cloud Database

GoldenGate replication for cloud consists of two parts: creating GoldenGate Cloud Service instance and configuring GoldenGate itself. First step is relatively unique but second part is absolutely trivial and should be problem for any experience GoldenGate professional.

Configure GoldenGate Cloud Instance

1. Login to My Services dashboard https://cloud.oracle.com/en_US/sign-in

2. You should see the following services to create GGCS instances: Compute, Database and Storage.

image

3. Click Create Instance and choose GGCS instance type. You will be redirected to GoldenGate Cloud Service Console. Click Create Service there.You will see main page with GoldenGate Cloud Service parameters

imageimage

4. Let’s enter parameters, press next, agree to summary information and press Create

image

Parameter name Value Description
Service Name GGCS1 Unique name for this instance
Service Description GoldenGate Cloud Service 1 Just description
OS Public User Key Text Create new key using Edit Button This is public key for user identification. You can upload existing key or create new using dialog
Compute Shape OC5 – 4.0 OCPU, 30.0GB RAM Size of GoldenGate compute node. This size doesn’t influence cost of GoldenGate Cloud Service. Early OC1 was available – now I see only OC5
Cloud Storage Container Storage-XXXXXXX/BackupStorage Storage container name in format <storage service name>-<identity domain name>/<container name>
You should pre-create it using REST API or create it as backup container in DBaaS Creation Wizard
Cloud Storage User Name You username like you.name@company.com
Cloud Storage Password Your password
Database Service RYNDINGG1 Database Service which will be target for GoldenGate replication. You create it using DBaaS wizard
PDB Name PDB1 Pluggable database name which will be target for replication
Username SYS Database user with SYSDBA privileges
Password You password Password for SYS

5. Return to GoldenGate Cloud Service dashboard. You will see new created instance.

image

Configure SSH

6. Click on the service name (GGCS1). You will see page with GoldenGate Cloud Instance configuration

image

7. Write down ip address of this Cloud Instance. We will use it to create tunnel from source database.

8. If you’ve created public and private keys using wizard and plans to use Putty then you should convert your private key to putty format using puttygen utility. See my previous post about DBaaS for detailed steps.

9. Login to written ip addrss using SSH. Pass your private key. Use “opc” username to login. Then do “sudo su – oracle” to login as oracle user because everything is installed under this user credentials.

image

10. Return to GoldenGate Cloud Service Dashboard. Click on menu and check “Access Rules.

image

11. By default only 2 ports are opened: inbound ssh from internet and outbound from GoldenGate instance to DBaaS instance. So it is secure by default. Let’s use this configuration.

12. Open putty, load your session and add tunnel for port 1080, then save and reconnect.

image

13. Now you can you localhost:1080 as SOCKS5 proxy. You can access any port on GGCS instance using this proxy. For example we can access port 7809 (MGR) and port range for collectors (7740-7760). Data are tunneled and encrypted by SSH.

Configure MGR on GGCS side

14. Let’s login to ggsci console

15. Let’s configure mgr

16. By default mgr parameter file contains multiple parameters.

17. Let’s remove some parameters for simplicity

18. Save parameters and start mgr

Configure on-premise GoldenGate

19. Now let’s configure source side.This is absolutely standard procedure except RMTHOST for pump which has some special parameters.

20. Extract for my source have the following configuration. I use FORMAT RELEASE for exttrail because GodlenGate Cloud Service uses GoldenGate 12.1 but my source has GoldenGate 12.1

21. You can add it and start using following commands

22. Pump configuration is also simple

Pay attention to SOCKSPROXY parameter. It says data to port localhost:1080 will be proxied, tunneled through SSH then it will be sent to respective port for SSH Server.

23. Add pump and start it

24. Now you should see first trail file on GGCS side

Configure Cloud GoldenGate

25. Create user ggadmin on GGCS side. It will be used by GoldenGate processes

26. Connect to GGCS instance using ssh. And configure replicat

27. Then add replicat and start it

28. Create source tables

29. Create target tables in DBaaS Database

30. Fill some test data on the source

31. Now replication works and we can see data in cloud almost immediately.

Summary

GoldenGate Cloud Service is absolutely unique feature of Oracle Public Cloud. It allows you to upload data from local to cloud database almost instantly. It also allow you get data from cloud to on-premise system or even synchronize you cloud instances (for active-active case).

GoldenGate Cloud Service is relatively new service but really you see proven GoldenGate engine undercover. So the best replication and CDC engine is available for cloud now.