Install Oracle GoldenGate

Install Oracle GoldenGate

Brief Advice

We are going to show how to install GoldenGate 19c on the same server where we have running an Oracle 19c multitenant instance for our tests.

Create a GoldenGate User

First we need to create a linux user and assign the group oinstallas 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 the wheelCentOS group since we want our user to use it sudo, but you can implement it according to your OS.

Creating the GoldenGate Home Directory

We need to create the directory GG_HOMEwhere the GoldenGate software, process files and logs are stored, making our GoldenGate user goldenthe owner of this directory:

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

Setting GoldenGate Variables

Export the following Oracle variables, for persistence include them in the .bash_profileuser's golden:

[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 validates that they have been configured 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's official website and upload it 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 into 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

We need to prepare a response file for the installation. Copy the oggcore.rspprovided file and modify it with the appropriate 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 installation script runInstaller -silent -nowait -responseFile and run it using the response file previously created with the command :

[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 Directory

After installation we can see that the software is installed inside our directory and that all GoldenGate working directories have already been 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 the GoldenGate Command Interface

In order to check that 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 ManagerPORT 7809 with only the parameter . So as a final step we are going to add more parameters to have a more common configuration:

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

Then we stop and restart the Manager so that the new configuration is 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 we validate that our GoldenGate process is running at the operating system 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
...
        

And that's it, we have successfully installed GoldenGate and we are ready to start configuring and creating the Extract, DataPump and Replicat processes.

For next steps to configure Extract and Replicat and test replication you can visit Replication with GoldenGate between Pluggable Databases .

Uninstall GoldenGate

If you need to uninstall GoldenGate you can do so from within it by GG_HOMEgoing to the directory deinstalland 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]$        

要查看或添加评论,请登录

Thiago Azadinho - MBA/OCP/OCE/MCSE的更多文章

社区洞察

其他会员也浏览了