0% found this document useful (0 votes)
2 views75 pages

Oracle-GoldenGate-18c-Workshop-Lab-17

The document outlines a hands-on lab exercise for configuring Oracle GoldenGate replication between an on-premise Oracle 12c database and an Oracle Cloud database using GoldenGate version 18.1. Key steps include creating database and GoldenGate Cloud Service instances, setting up SSH connections, configuring a schema and table, and verifying data replication. The exercise emphasizes the installation and configuration processes necessary for successful data replication across environments.

Uploaded by

박군태
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views75 pages

Oracle-GoldenGate-18c-Workshop-Lab-17

The document outlines a hands-on lab exercise for configuring Oracle GoldenGate replication between an on-premise Oracle 12c database and an Oracle Cloud database using GoldenGate version 18.1. Key steps include creating database and GoldenGate Cloud Service instances, setting up SSH connections, configuring a schema and table, and verifying data replication. The exercise emphasizes the installation and configuration processes necessary for successful data replication across environments.

Uploaded by

박군태
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 75

Oracle GoldenGate 18c and GoldenGate Cloud Services Workshop

Hands-on Lab Exercise 17


Install and Configure Oracle GoldenGate Cloud Service
Configure replication between On-premise and Oracle Cloud

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.

Hence ensure that Enable Oracle GoldenGate option is checked.

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)

Launch puttygen tool

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

[oracle@OGGDB ~]$ dbaascli

DBAAS CLI version 18.4.3.1.0

DBAAS>gg status

Executing command gg status

Golden Gate status: enabled.

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.

[oracle@OGGDB ~]$ sqlplus sys as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Thu Feb 7 00:41:38 2019

Copyright (c) 1982, 2016, Oracle. All rights reserved.

Enter password:

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select username from cdb_users where username like '%GGADMIN%';

USERNAME

Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 47
--------------------------------------------------------------------------------
C##GGADMIN

SQL> show parameter streams

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
streams_pool_size big integer 272M

SQL> show parameter enable_goldengate

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
enable_goldengate_replication boolean TRUE

Create the DEMO schema and the MYOBJECTS table

SQL> grant dba to c##ggadmin container=all;

Grant succeeded.

SQL> alter session set container=pdb1;

Session altered.

SQL> create user demo identified by oracle


default tablespace users

Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 48
temporary tablespace temp;

User created.

SQL> grant dba to demo;

Grant succeeded.

SQL> create table demo.myobjects as select * from all_objects


where 1=2;

Table created.

SQL> alter table demo.myobjects add constraint pk_myobjects


primary key (object_id);

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@ggcsinst-ggcs-1 ~]$ env |grep AGENT

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 ~]$ env |grep GGHOME


GGHOME=/u01/app/oracle/gghome

[oracle@ggcsinst-ggcs-1 ~]$ cd /u01/app/oracle

[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@ggcsinst-ggcs-1 ~]$ vi .bashrc

[oracle@ggcsinst-ggcs-1 ~]$ echo $LD_LIBRARY_PATH


/u01/app/oracle/oci:/u01/app/oracle/oci:

[oracle@ggcsinst-ggcs-1 ~]$ echo $TNS_ADMIN


/u01/app/oracle/oci/network/admin

Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 58
Launch GGSCI

[oracle@ggcsinst-ggcs-1 ~]$ cd $GGHOME

[oracle@ggcsinst-ggcs-1 oracle]$ ls -l oci


lrwxrwxrwx. 1 root root 13 Feb 9 03:48 oci -> /u02/data/oci

[oracle@ggcsinst-ggcs-1 gghome]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle


Version 12.2.0.2.2 27274916_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Dec 16 2017 03:36:13
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2017, Oracle and/or its affiliates. All rights reserved.

GGSCI (ggcsinst-ggcs-1) 1> info all

Program Status Group Lag at Chkpt Time Since Chkpt

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.

[oracle@OGGDB ~]$ cd $ORACLE_HOME

[oracle@OGGDB dbhome_1]$ cd network/admin

[oracle@OGGDB admin]$ vi tnsnames.ora

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

[oracle@ggcsinst-ggcs-1 admin]$ vi tnsnames.ora

<add entries for PDB1 and OGGDB>

[oracle@ggcsinst-ggcs-1 admin]$ cd $GGHOME

[oracle@ggcsinst-ggcs-1 gghome]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle


Version 18.1.0.0.0 OGGCORE_18.1.0.0.0_PLATFORMS_180928.0432_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Sep 29 2018 04:22:21
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2018, Oracle and/or its affiliates. All rights reserved.

GGSCI (ggcsinst-ggcs-1) 1> add credentialstore

Credential store created.

GGSCI (ggcsinst-ggcs-1) 2> alter credentialstore add user c##ggadmin@pdb1 alias ggadmin
Password:

Credential store altered.

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.

GGSCI (ggcsinst-ggcs-1 as c##ggadmin@OGGDB/PDB1) 4> exit


[oracle@ggcsinst-ggcs-1 gghome]$

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@rac01 .ssh]$ cp /media/sf_software/privateKey .

Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 63
[oracle@rac01 .ssh]$ chmod 600 privateKey

[oracle@rac01 .ssh]$ ls -lrt


total 24
-rw-r--r-- 1 oracle oinstall 406 Jan 4 10:47 id_rsa.pub
-rw------- 1 oracle oinstall 1679 Jan 4 10:47 id_rsa
-rw-r--r-- 1 oracle oinstall 812 Jan 4 10:47 authorized_keys
-rw-r--r-- 1 oracle oinstall 2385 Feb 6 23:29 known_hosts
-rw------- 1 oracle oinstall 1675 Feb 7 18:07 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@rac01 .ssh]$ ssh -i /home/oracle/.ssh/privateKey -v -N -f -D 127.0.0.1:8088 [email protected] > /tmp/socksproxy.log 2>&1


You have new mail in /var/spool/mail/oracle

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) 11> add exttrail ./dirdat/onprem/lt extract ext3


EXTTRAIL added.

GGSCI (rac01.localdomain) 12> add extract pump3 exttrailsource ./dirdat/onprem/lt


EXTRACT added.

GGSCI (rac01.localdomain) 13> add rmttrail ./dirdat/onprem/rt extract pump3


RMTTRAIL 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.

GGSCI (rac01.localdomain as C##oggadmin@cdb1_2/CDB$ROOT) 25> edit params ext3

EXTRACT ext3
SETENV (ORACLE_HOME='/acfs_oh/product/12.2.0/dbhome_1')
USERIDALIAS oggadmin_cdb1
EXTTRAIL ./dirdat/onprem/lt
SOURCECATALOG pdb1
TABLE demo.*;

GGSCI (rac01.localdomain as C##oggadmin@cdb1_2/CDB$ROOT) 27> edit params pump3

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.*;

GGSCI (rac01.localdomain as C##oggadmin@cdb1_2/CDB$ROOT) 28> shell mkdir ./dirdat/onprem

GGSCI (rac01.localdomain as C##oggadmin@cdb1_2/CDB$ROOT) 29> start extract ext3

Sending START request to MANAGER ...


EXTRACT EXT3 starting

GGSCI (rac01.localdomain as C##oggadmin@cdb1_2/CDB$ROOT) 35> info ext3

EXTRACT EXT3 Last Started 2019-02-11 18:08 Status RUNNING


Checkpoint Lag 00:00:03 (updated 00:00:00 ago)
Process ID 8488
Log Read Checkpoint Oracle Integrated Redo Logs
2019-02-11 18:14:11
SCN 0.10792986 (10792986)

GGSCI (rac01.localdomain as C##oggadmin@cdb1_2/CDB$ROOT) 36> start pump3

Sending START request to MANAGER ...


EXTRACT PUMP3 starting

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

EXTRACT PUMP3 Last Started 2019-02-11 18:15 Status RUNNING


Checkpoint Lag 00:00:00 (updated 00:00:06 ago)
Process ID 14637
Log Read Checkpoint File /acfs_oh/app/goldengate/dirdat/onprem/lt000000000
2019-02-11 18:16:15.000000 RBA 21404

Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 67
Configure the Cloud Replicat process

[opc@ggcsinst-ggcs-1 ~]$ sudo su - oracle


Last login: Thu Feb 7 06:53:41 UTC 2019 on pts/0

[oracle@ggcsinst-ggcs-1 ~]$ cd $GGHOME

[oracle@ggcsinst-ggcs-1 gghome]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle


Version 12.2.0.2.2 27274916_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Dec 16 2017 03:36:13
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2017, Oracle and/or its affiliates. All rights reserved.

GGSCI (ggcsinst-ggcs-1) 1> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
JAGENT STOPPED

GGSCI (ggcsinst-ggcs-1 as c##ggadmin@OGGDB/PDB1) 9> dblogin useridalias ggadmin


Successfully logged into database PDB1.

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.

Successfully created checkpoint table PDB1.C##GGADMIN.chkptab.

GGSCI (ggcsinst-ggcs-1 as c##ggadmin@OGGDB/PDB1) 13> edit params ./GLOBALS

ENABLEMONITORING
CHECKPOINTTABLE C##GGADMIN.CHKPTAB

GGSCI (ggcsinst-ggcs-1 as c##ggadmin@OGGDB/PDB1) 7> exit

[oracle@ggcsinst-ggcs-1 gghome]$ ./ggsci

GGSCI (ggcsinst-ggcs-1) 1> add replicat rep1 exttrail ./dirdat/onprem/rt


REPLICAT added.

GGSCI (ggcsinst-ggcs-1) 3> edit params rep1

REPLICAT rep1
USERIDALIAS ggadmin
MAP pdb1.demo.*, TARGET pdb1.demo.*;

GGSCI (ggcsinst-ggcs-1 as c##ggadmin@OGGDB/PDB1) 13> start replicat rep1

Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 69
Sending START request to MANAGER ...
REPLICAT REP1 starting

GGSCI (ggcsinst-ggcs-1 as c##ggadmin@OGGDB/PDB1) 10> info rep1

REPLICAT REP1 Last Started 2019-02-11 10:21 Status RUNNING


Checkpoint Lag 00:00:18 (updated 00:00:02 ago)
Process ID 101632
Log Read Checkpoint File /u02/data/gg123ora12/dirdat/onprem/rt000000000
2019-02-11 10:21:19.695712 RBA 26366

Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 70
Test replication between on-premise database and Oracle Cloud

Oracle Cloud Database

Note the number of rows in the MYOBJEC TS table.

[oracle@OGGDB ~]$ sqlplus demo/oracle@pdb1

SQL*Plus: Release 12.2.0.1.0 Production on Mon Feb 11 10:22:03 2019

Copyright (c) 1982, 2016, Oracle. All rights reserved.

Last Successful login time: Mon Feb 11 2019 10:18:56 +00:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select count(*) from myobjects;

COUNT(*)
----------
0

On-premise Database

Note the number of rows in the MYOBJEC TS table.

[oracle@rac01 goldengate]$ sqlplus demo/oracle@pdb1

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

Copyright (c) 1982, 2016, Oracle. All rights reserved.

Last Successful login time: Mon Feb 11 2019 18:17:28 +08:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select count(*) from myobjects;

COUNT(*)
----------
0

Insert rows into the MYOBJECTS table

SQL> insert into myobjects select * from all_objects where owner='HR';

41 rows created.

SQL> commit;

Commit complete.

Verify on-premise Extract has captured the changes

GGSCI (rac01.localdomain as C##oggadmin@cdb1_2/CDB$ROOT) 45> stats ext3 latest table pdb1.demo.myobjects

Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 72
Sending STATS request to EXTRACT EXT3 ...

Start of Statistics at 2019-02-11 18:25:39.

Output to ./dirdat/onprem/lt:

Extracting from PDB1.DEMO.MYOBJECTS to PDB1.DEMO.MYOBJECTS:

*** Latest statistics since 2019-02-11 18:11:09 ***


Total inserts 41.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 41.00

End of Statistics.

GGSCI (rac01.localdomain as C##oggadmin@cdb1_2/CDB$ROOT) 46> stats pump3 latest table pdb1.demo.myobjects

Sending STATS request to EXTRACT PUMP3 ...

Start of Statistics at 2019-02-11 18:26:02.

Output to ./dirdat/onprem/rt:

Extracting from PDB1.DEMO.MYOBJECTS to PDB1.DEMO.MYOBJECTS:

*** Latest statistics since 2019-02-11 18:15:32 ***

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.

Oracle GoldenGate Cloud Service environment

Verify GGSC Replicat has applied the changes

GGSCI (ggcsinst-ggcs-1 as c##ggadmin@OGGDB/PDB1) 19> stats rep1 latest

Sending STATS request to REPLICAT REP1 ...

Start of Statistics at 2019-02-11 10:27:26.

Replicating from PDB1.DEMO.MYOBJECTS to PDB1.DEMO.MYOBJECTS:

*** Latest statistics since 2019-02-11 10:27:18 ***


Total inserts 41.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 41.00

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.

[oracle@OGGDB ~]$ sqlplus demo/oracle@pdb1

SQL*Plus: Release 12.2.0.1.0 Production on Mon Feb 11 10:28:02 2019

Copyright (c) 1982, 2016, Oracle. All rights reserved.

Last Successful login time: Mon Feb 11 2019 10:22:03 +00:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select count(*) from myobjects;

COUNT(*)
----------
41

Oracle GoldenGate 18c and Oracle GoldenGate Cloud Services Workshop Lab Exercise 17 75

You might also like