Arun Kumar
Install Oracle 12c Golden Gate on Oracle Linux
In this article we will look at the steps to install oracle 12c Golden Gate on Oracle Enterprise Linux 6.5. The steps involved are
Virtual Machine Setup
To proceed with golden gate lab practice, create two virtual machines in VirtualBox as per below configurations

Partitions created while installing OEL 6.5

Note: To learn how to install OEL 6.5, complete the free video course –
https://oraclegenesis.com/p/foundation-for-dba

Once your machines are ready, complete below pre-requisites on both. Disable firewall on both machines
/etc/rc.d/init.d/iptables status
/etc/rc.d/init.d/iptables stop
service iptables stop
chkconfig iptables off
echo 0 > /selinux/enforce
Update /etc/hosts file on both server, update your IP address for both machines at the end of the file.
Do not delete the first two lines in the file
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.166 ggprod
192.168.0.167 ggdev
Perform update for all yum repository on both server. This command will take 20-30 min.
yum -y update
Install Oracle 12c pre-install package which will complete all the pre-requisites for us on both servers
yum -y install oracle-rdbms-server-12cR1*
Change the password for Oracle user on both server
passwd oracle
Create necessary directories for Oracle 12c software installation on both servers
mkdir -p /u01 /u02
chmod -R 775 /u01 /u02
chown -R oracle:oinstall /u01 /u02
Install Oracle 12c Database
Now we are going to install Oracle 12c R1 database software on both virtual machines.
Oracle Database Software: 12.1.0.2
Copy the 12c installation zip files on both the servers under /u02.
GGPROD

GGDEV

Install 12c on GGPROD and create proddb database: Use below options to install Oracle 12c on GGPROD server
Installation option: Install database software only
Single instance database installation
Enterprise Edition
Oracle Base: /u01/app/oracle
Software Location: /u01/app/oracle/product/12.1.0/dbhome_1
Inventory Directory: /u01/app/oraInventory
oraInventory Group Name: oinstall
Operating system groups: dba (set all to dba)
Proceed to install the database software
Set the environment variables, Start DBCA and create proddb database with below options
Set below under bash profile:
export ORACLE_SID=proddb
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin
Database Option: Create Database
Creation Mode: Advanced Mode
Database Template: General Purpose
Database SID: proddb (Container Database – uncheck / disabled)
Management Options: All options unchecked
Database Credentials: Provide sys user password
Listener Configuration: Uncheck (we will configure listener manually)
Storage Locations: a. User common locations for all database files b. Enable FRA with 20 GB size c. Enable archiving
Database Options: Check Sample Schemas
Install 12c on GGDEV and create devdb database: User below option to install Oracle 12c on GGDEV server
Installation option: Install database software only
Single instance database installation
Enterprise Edition
Oracle Base: /u01/app/oracle
Software Location: /u01/app/oracle/product/12.1.0/dbhome_1
Inventory Directory: /u01/app/oraInventory
oraInventory Group Name: oinstall
Operating system groups: dba (set all to dba)
Proceed to install the database software
Set the environment variables, Start DBCA and create devdb database with below options
Set below under bash profile:
export ORACLE_SID=devdb
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin
Database Option: Create Database
Creation Mode: Advanced Mode
Database Template: General Purpose
Database SID: proddb (Container Database – uncheck / disabled)
Management Options: All options unchecked
Database Credentials: Provide sys user password
Listener Configuration: Uncheck (we will configure listener manually)
Storage Locations: a. User common locations for all database files b. Enable FRA with 20 GB size c. Enable archiving
Database Options: Do not Check Sample Schemas (we will replication sample schema from proddb to devdb using golden gate)
Create database
Install Oracle 12c Golden Gate
Our next step is to install Oracle 12c Golden Gate software on both the virtual machines.
Oracle Golden Gate Software: 12.2.0.1
Copy the golden gate installation zip files on both the servers under /u02.
Install Golden Gate on GGPROD
Unzip the golden gate zip file
$ cd /u02
$ unzip fbo_ggs_Linux_x64_shiphome.zip
Start installing Golden Gate on GGPROD server
cd fbo_ggs_Linux_x64_shiphome/Disk1
./runInstaller

Do not start the manager process as we will start it later




Add GG_HOME variable to .bash_profile
export GG_HOME=/u01/app/oracle/product/gg

Execute the bash profile OR logout and login again as oracle user
. .bash_profile
Create Golden Gate sub directories: Connect to ggsci utility and create golden gate sub directories
cd $GG_HOME
./ggsci
GGSCI> create subdirs GGSCI> exit
Output

Install Golden Gate on GGDEV
Unzip the golden gate zip file
$ cd /u02
$ unzip fbo_ggs_Linux_x64_shiphome.zip
Start installing Golden Gate on GGPROD server
cd fbo_ggs_Linux_x64_shiphome/Disk1
./runInstaller

Do not start the manager process as we will start it later




Add GG_HOME variable to .bash_profile
export GG_HOME=/u01/app/oracle/product/gg

Execute the bash profile OR logout and login again as oracle user
. .bash_profile
Create Golden Gate sub directories: Connect to ggsci utility and create golden gate sub directories
cd $GG_HOME
./ggsci
GGSCI> create subdirs GGSCI> exit
Output

Prepare Golden Gate for Replication
Enable supplemental logging: The amount of data written to redo logs by default is not enough for replication. By enabling supplemental logging, database will write more details about transactions in redo log files
On both proddb and devdb:
=========================
select supplemental_log_data_min, force_logging from v$database;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
ALTER DATABASE FORCE LOGGING;
select supplemental_log_data_min, force_logging from v$database;
Enable Golden Gate Replication Parameter: From 12.1.0.2 onwards, there is a new parameter which we need to enable in order to setup replication
SQL > ALTER SYSTEM SET ENABLE_GOLDENGATE_REPLICATION = TRUE;
Create GoldenGate Database User: We need to create a dedicated golden gate user on both source and target databases. The golden gate user on source reads the transactions and the golden gate user on target applies the transactions.
We will create new user with dedicated tablespace in both databases
On proddb:
==========
Create tablespace gg_tbs datafile '/u01/app/oracle/oradata/proddb/gg_tbs01.dbf' size
500M;
Create user ogg identified by ogg default tablespace gg_tbs;
On devdb:
=========
Create tablespace gg_tbs datafile '/u01/app/oracle/oradata/devdb/gg_tbs01.dbf' size 5
00M;
Create user ogg identified by ogg default tablespace gg_tbs;
Grant admin privileges to ogg user
On both proddb and devdb:
=========================
exec DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE('ogg');
grant DBA to ogg;
Create sbdirs
Configure and start manager process: While installing golden gate, we did not start the manager process. Let us configure the manager and start it on the source and target
On proddb:
==========
ggsci> edit param mgr
Add the below port number to the file
port 7809
start the manager process
ggsci> start mgr
To view the status of mgr process
ggsci> info mgr
Repeat same steps to configure manager process on devdb and start it
