Install Oracle GoldenGate 19c

Quick Tip

We are going to show how to install GoldenGate 19c in the same server where we have a running Oracle 19c multitenant instance for our testings.

Create GoldenGate User

First we need to create a linux user and assign to it the oinstall group as primary:

[pato@patoracle ~]$ sudo adduser golden
[pato@patoracle ~]$ sudo passwd golden
Changing password for user golden.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[pato@patoracle ~]$ sudo usermod -g oinstall golden
[pato@patoracle ~]$ sudo usermod -aG wheel golden

We also added CentOS wheel group as we want this user to use sudo, but you can implement it according your OS.

Create GoldenGate Home Directory

We need to create the GG_HOME where GoldenGate software, process files and logs will be stored, making our GoldenGate user golden the owner of this path:

[pato@patoracle ~]$ sudo mkdir /golden
[pato@patoracle ~]$ sudo chown golden:oinstall /golden
Setup GoldenGate Variables

Export the following Oracle variables, for persistence include them in the golden user .bash_profile:

[golden@patoracle ~]$ vi .bash_profile
# GoldenGate
export GG_HOME=/golden
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

and validate they got setup as environment variables:

[golden@patoracle ~]$ env | grep HOME
GG_HOME=/golden
HOME=/home/golden
ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
[golden@patoracle ~]$
Get GoldenGate Software

Download the GoldenGate software from Oracle official website and upload to your machine:

[golden@patoracle ~]$ gsutil cp gs://patobucket/golden/191004_fbo_ggs_Linux_x64_shiphome.zip .
Copying gs://patobucket/golden/191004_fbo_ggs_Linux_x64_shiphome.zip...
| [1 files][530.5 MiB/530.5 MiB]
Operation completed over 1 objects/530.5 MiB.
[golden@patoracle ~]$

then unzip the installation files in some working directory:

[golden@patoracle ~]$ unzip -q 191004_fbo_ggs_Linux_x64_shiphome.zip
[golden@patoracle ~]$ ls
191004_fbo_ggs_Linux_x64_shiphome.zip  OGG-19.1.0.0-README.txt
fbo_ggs_Linux_x64_shiphome             OGG_WinUnix_Rel_Notes_19.1.0.0.4.pdf
Create a Response File

You need to prepare a response file for the installation. Copy the one provided oggcore.rsp and modify it with proper options:

[golden@patoracle ~]$ cp fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp .
[golden@patoracle ~]$ vi oggcore.rsp

[golden@patoracle ~]$ cat oggcore.rsp | grep =
oracle.install.responseFileVersion=/oracle/install/rspfmt_ogginstall_response_schema_v19_1_0
INSTALL_OPTION=ORA19c
SOFTWARE_LOCATION=/golden
START_MANAGER=TRUE
MANAGER_PORT=7809
DATABASE_LOCATION=/opt/oracle/product/19c/dbhome_1
INVENTORY_LOCATION=/opt/oracle/oraInventory
UNIX_GROUP_NAME=oinstall
[golden@patoracle ~]$
Install GoldenGate in Silent Mode

Find the installer script and run it using the previously created response file with the command
runInstaller -silent -nowait -responseFile :

[golden@patoracle ~]$ cd fbo_ggs_Linux_x64_shiphome/Disk1/
[golden@patoracle Disk1]$ ls
install  response  runInstaller  stage

[golden@patoracle Disk1]$ ./runInstaller -silent -nowait -responseFile /home/golden/oggcore.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 5491 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 511 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-07-02_01-49-11PM. Please wait ...
You can find the log of this install session at:
 /opt/oracle/oraInventory/logs/installActions2020-07-02_01-49-11PM.log
The installation of Oracle GoldenGate Core was successful.
Please check '/opt/oracle/oraInventory/logs/silentInstall2020-07-02_01-49-11PM.log' for more details.
Successfully Setup Software.
Validate GoldenGate Home

After installation we can see the software installed inside our directory and all the GoldenGate working directories already created:

[golden@patoracle ~]$ cd /golden
[golden@patoracle golden]$ ls -d dir*
dirchk  dirdat  dirdmp  dirout  dirprm  dirsca  dirtmp
dircrd  dirdef  diretc  dirpcs  dirrpt  dirsql  dirwlt
Validate GoldenGate Command Interface

In order to check the software is working properly we need to use the GoldenGate Software Command Interface (GGSCI):

[golden@patoracle golden]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 19c on Oct 17 2019 21:16:29
Operating system character set identified as UTF-8.

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

GGSCI (patoracle) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
Modify Manager Settings

The installation process configures the GoldenGate Manager only with the PORT 7809 parameter.
So as final step we are going to add more parameters for a common configuration:

GGSCI (patoracle) 2> edit params mgr
PORT 7809
DYNAMICPORTLIST 7810-7820
AUTOSTART ER *
PURGEOLDEXTRACTS /golden/dirdat/*, USECHECKPOINTS, MINKEEPFILES 4, FREQUENCYMINUTES 15

Then stop and start the Manager for the new configuration to be loaded:

GGSCI (patoracle) 3> stop mgr
Manager process is required by other GGS processes.
Are you sure you want to stop it (y/n)?y

Sending STOP request to MANAGER ...
Request processed.
Manager stopped.

GGSCI (patoracle) 4> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED

GGSCI (patoracle) 5> start mgr
Manager started.

GGSCI (patoracle) 6> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING

And validate our GoldenGate process is running at OS level:

[golden@patoracle golden]$ ps -ef | grep golden
...
golden   20976     1  0 14:12 ?        00:00:00 ./mgr PARAMFILE /golden/dirprm/mgr.prm REPORTFILE /golden/dirrpt/MGR.rpt PROCESSID MGR
...

That’s it, we have successfully installed GoldenGate and is ready to begin the configuration and creation of Extract, DataPump and Replicat processes.

For further steps on setting up Extract and Replicat and test replication you can visit
GoldenGate Replication between Pluggable Databases.

Uninstall GoldenGate

If you need to uninstall GoldenGate you can do it from inside the GG_HOME going to the directory deinstall and running the script deinstall.sh:

[golden@patoracle golden]$ cd deinstall/
[golden@patoracle deinstall]$ ls
deinstall.sh
[golden@patoracle deinstall]$ ./deinstall.sh

ALERT: Ensure all the processes running from the current Oracle Home are shutdown prior to running this software uninstallation script.

Proceed with removing Oracle GoldenGate home: /golden (yes/no)? [no]
yes
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 511 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-07-02_01-29-45PM. Please wait ...Oracle Universal Installer, Version 12.2.0.4.0 Production
Copyright (C) 1999, 2017, Oracle. All rights reserved.

Starting deinstall


Deinstall in progress (Thursday, July 2, 2020 3:29:52 PM CDT)
............................................................... 100% Done.

Deinstall successful

End of install phases.(Thursday, July 2, 2020 3:29:53 PM CDT)
End of deinstallations
Please check '/opt/oracle/oraInventory/logs/silentInstall2020-07-02_03-29-45PM.log' for more details.
[golden@patoracle deinstall]$