Oracle-GoldenGate-18c-Workshop-Lab-17
Oracle-GoldenGate-18c-Workshop-Lab-17
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 1
Oracle GoldenGate Cloud Service Hands-On Lab Exercise
This note describes the steps used to configure Oracle GoldenGate replication between on-premise and the Oracle Cloud.
The on-premise database is Oracle 12c Release 2 (CDB1/PDB1) and the Oracle Database Classic Cloud Service instance is also Oracle 12c
Release 2 (OGGDB). The GoldenGate version is 18.1 on the on-premise Oracle GoldenGate environment and the Oracle GoldenGate Cloud
Service is also 18.1 (Classic).
The main steps involved are:
Create the Oracle Database Service Instance
Create the Oracle GoldenGate Cloud Service Instance
Create the PuTTY private keys and configure PuTTY connections to the Cloud Database instance and GoldenGate Cloud Service instance
Create the DEMO schema and MYOBJECTS table in the Oracle Database Service Cloud instance
Configure SSH SOCKS Proxy Server for communication between on-premise server and Oracle Cloud
Create the Credential Store in the Oracle GoldenGate Cloud Service environment
Create the Replicat process Store in the Oracle GoldenGate Cloud Service environment
Create the Extract and Pump processes in the on-premise Oracle GoldenGate environment
Start the on-premise and GoldenGate Cloud Service GoldenGate Extract and Replicat processes
Perform DML on the on-premise MYOBJECTS table and verify data being replicated to the Cloud database
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 2
Create the Oracle Cloud Database Service Instance
We need to create an Oracle Database Cloud Classic instance if we want to install Oracle GoldenGate Cloud Control as part of the Oracle GoldenGate Cloud
instance.
We will create an Oracle 12c Release 2 database OGGDB which will host the Fusion Middleware type repository schemas for the GoldenGate Cloud Control
application.
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 3
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 4
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 5
The OGGDB database will also serve as the Cloud target database instance for Oracle GoldenGate replication between On-Premise and Oracle Cloud.
Make a note of the Administration Password entered. This password is the common password for users like SYS,SYSTEM and the GoldenGate administrator
common user C##GGADMIN which will also be created in the database.
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 6
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 7
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 8
Click on Download and then Done
This will download a zipped file called sshbundle.zip on your local machine. Rename this file to sshbundle_oggdb.zip and unzip the file.
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 9
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 10
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 11
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 12
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 13
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 14
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 15
Create the GoldenGate Cloud Service (GGCS) Instance
We will create a GGCS instance named GGCSINST which will also have the GoldenGate Cloud Control component in addition to the standard
Replication component.
The GoldenGate version is 18.1 Classic.
Expand the Oracle Cloud My Services menu item on the top left and select GoldenGate.
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 16
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 17
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 18
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 19
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 20
Identify the Cloud Storage Container by opening the Storage Classic service page. Click on the Account tab and obtain the details from the Rest
Endpoint item in the Account Information section.
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 21
In this case the URL is:
https://uscom-central-1b.storage.oraclecloud.com/v1/Storage-gsoorma
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 22
Select the database which we created earlier in the exercise (OGGDB) as this will serve as the repository for the GoldenGate Cloud Control
schemas.
Note – the SYS password will be the Administration Password which we entered while creating the database.
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 23
Also make a note of the WebLogic Server administration password.
Click on SSH Public Key Edit button
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 24
Click on Download and Done
Rename the downloaded zip file to sshbundle_gginst.zip on your local machine.
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 25
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 26
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 27
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 28
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 29
Create the PuTTY Private Key (ppk)
Click on Load
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 30
Unzip the downloaded SSH Public Key file – we had saved the file as sshbundle_gginst.zip.
Open the folder containing the Private key/Public key pair of files (downloaded while creating the database or GGSC instance). Select the
privateKey file and click Open.
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 31
Click on Save private key
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 32
Click on Yes
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 33
Enter the File name gginst and ensure Save as type is PuTTY Private Key Files
Note: Follow the same process for the SSH Public Key file we have downloaded while creating the Cloud Database instance
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 34
Connect to the Cloud Database instance (OGGDB)
Click on Dashboard
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 35
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 36
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 37
Make a note of the Public IP address – in this case it 129.150.86.72
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 38
Launch PuTTY
Enter the Public IP address and oggdb for Saved Sessions
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 39
Select Connection >> Data menu
Enter ‘oracle’ for the Auto-login username
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 40
Select Connection >> SSH>>Auth menu
Open the folder containing the Private key file (oggdb.ppk) which we would have created earlier using puttygen utility.
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 41
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 42
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 43
Click on Save and then Open
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 44
Click on Yes
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 45
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 46
Use the dbaascli tool to verify if the database has been enabled for GoldenGate
DBAAS>gg status
Note the GoldenGate admin user C##GGADMIN has been created in the database and also note the values for the database parameters
STREAMS_POOL_SIZE and ENABLE_GOLDENGATE_REPLICATION.
Enter password:
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
USERNAME
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 47
--------------------------------------------------------------------------------
C##GGADMIN
Grant succeeded.
Session altered.
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 48
temporary tablespace temp;
User created.
Grant succeeded.
Table created.
Table altered.
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 49
Connect to the GoldenGate Cloud Service instance (OGGDB)
Click on Dashboard
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 50
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 51
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 52
Connect to the GGSC host via PuTTY
Note: we will connect as the ‘opc’ user
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 53
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 54
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 55
Click on Save and then Open.
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 56
Connect as the oracle user
[opc@ggcsinst-ggcs-1 ~]$ sudo su - oracle
Note the environment variables which have been automatically configured as well as the various symbolic links
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 57
AGENT_INSTANCE_HOME=/u02/data/ggcc/agent
AGENT_HOME=/u01/app/oracle/middleware/ggccagent
[oracle@ggcsinst-ggcs-1 oracle]$ ls -l
total 12
lrwxrwxrwx. 1 root root 20 Feb 9 03:48 gghome -> /u02/data/gg123ora12
lrwxrwxrwx. 1 root root 21 Feb 9 03:48 gghome11g -> /u02/data/gg123ora11g
drwxr-x---. 2 oracle oracle 4096 Feb 9 03:48 gghome18c
drwxr-xr-x. 14 oracle oracle 4096 Feb 9 03:53 middleware
lrwxrwxrwx. 1 root root 13 Feb 9 03:48 oci -> /u02/data/oci
lrwxrwxrwx. 1 root root 22 Feb 9 03:48 oraInventory -> /u02/data/oraInventory
lrwxrwxrwx. 1 root root 13 Feb 9 03:48 rda -> /u02/data/rda
drwxr-xr-x. 6 root root 4096 Feb 9 03:43 tools
Note the location of the variables LD_LIBRARY_PATH and TNS_ADMIN which are defined via the .bashrc file
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 58
Launch GGSCI
Copyright (C) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
MANAGER RUNNING
JAGENT STOPPED
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 59
Create the GoldenGate Credential Store and add entries to the Credential Store
Copy the tnsnames.ora entries for OGGDB and PDB1 from Database Cloud machine to GGCS machine.
OGGDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = OGGDB.compute-612164189.oraclecloud.internal)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = OGGDB.612164189.oraclecloud.internal)
)
)
PDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = OGGDB.compute-612164189.oraclecloud.internal)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb1.612164189.oraclecloud.internal)
)
)
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 60
[oracle@ggcsinst-ggcs-1 admin]$ pwd
/u01/app/oracle/oci/network/admin
Copyright (C) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
GGSCI (ggcsinst-ggcs-1) 2> alter credentialstore add user c##ggadmin@pdb1 alias ggadmin
Password:
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 61
GGSCI (ggcsinst-ggcs-1) 3> dblogin useridalias ggadmin
Successfully logged into database PDB1.
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 62
Configure SSH Socks Proxy Server
Copy the SSH Private key file belonging to the GGCS machine to the on-premise VM rac01
Copy private key to shared folder and from the shared folder to the $HOME/.ssh directory
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 63
[oracle@rac01 .ssh]$ chmod 600 privateKey
-v=Verbose Mode
-N=do not execute remote command, mainly used for port forwarding
-f=run ssh process in background
-D=act as a SOCKS proxy server
127.0.0.1=Host IP Address where SOCKS proxy will listen
8088=TCP/IP port number to listen on
opc=GGSC Cloud Instance server user
129.150.93.188=GGCS Cloud Instance server Public IP
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 64
Configure on-premise GoldenGate Extract and Pump
GGSCI (rac01.localdomain) 10> add extract ext3 integrated tranlog begin now
EXTRACT (Integrated) added.
GGSCI (rac01.localdomain as C##oggadmin@cdb1_2/CDB$ROOT) 24> register extract ext3 database container (pdb1)
2019-02-11 17:57:40 INFO OGG-02003 Extract EXT3 successfully registered with database at SCN 10757064.
EXTRACT ext3
SETENV (ORACLE_HOME='/acfs_oh/product/12.2.0/dbhome_1')
USERIDALIAS oggadmin_cdb1
EXTTRAIL ./dirdat/onprem/lt
SOURCECATALOG pdb1
TABLE demo.*;
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 65
EXTRACT pump3
SETENV (ORACLE_HOME='/acfs_oh/product/12.2.0/dbhome_1')
USERIDALIAS oggadmin_cdb1
RMTHOST 129.150.93.188 , MGRPORT 7809, SOCKSPROXY 127.0.0.1:8088
RMTTRAIL ./dirdat/onprem/rt
SOURCECATALOG pdb1
TABLE demo.*;
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 66
GGSCI (rac01.localdomain as C##oggadmin@cdb1_2/CDB$ROOT) 42> info pump3
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 67
Configure the Cloud Replicat process
Copyright (C) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
MANAGER RUNNING
JAGENT STOPPED
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 68
GGSCI (ggcsinst-ggcs-1 as c##ggadmin@OGGDB/PDB1) 11> add checkpointtable C##GGADMIN.chkptab
Logon catalog name PDB1 will be used for table specification PDB1.C##GGADMIN.chkptab.
ENABLEMONITORING
CHECKPOINTTABLE C##GGADMIN.CHKPTAB
REPLICAT rep1
USERIDALIAS ggadmin
MAP pdb1.demo.*, TARGET pdb1.demo.*;
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 69
Sending START request to MANAGER ...
REPLICAT REP1 starting
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 70
Test replication between on-premise database and Oracle Cloud
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
COUNT(*)
----------
0
On-premise Database
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 71
SQL*Plus: Release 12.2.0.1.0 Production on Mon Feb 11 18:22:41 2019
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
COUNT(*)
----------
0
41 rows created.
SQL> commit;
Commit complete.
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 72
Sending STATS request to EXTRACT EXT3 ...
Output to ./dirdat/onprem/lt:
End of Statistics.
Output to ./dirdat/onprem/rt:
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 73
Total inserts 41.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 41.00
End of Statistics.
End of Statistics.
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 74
Oracle Cloud Database
Note the number of rows which are now present in the MYOBJEC TS table.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
COUNT(*)
----------
41
Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 75