Sunday 24 July 2016

Installing Oracle GoldenGate 12c (12.2.0.1) for Oracle 12c on Unix Platform

Introduction

Oracle Goldengate provides very fast replication of heterogeneous databases by reading transaction logs and writing the changes to one or more target databases.

Prior to Oracle Golden Gate 12c, the installation was simple. Just copy the zip/tar file to the directory you want to install it in and unzip/untar the file. Then from the GGSCI prompt run CREATE SUBDIRS.

With the release of Oracle Golden Gate 12c, Oracle has finally created a Oracle Universal Installer (OUI) for Oracle Golden Gate. The OUI finally brings the installation of Oracle Golden Gate into the same java interface as all the other Oracle products. In this post, lets take a look at how to properly install the Oracle GoldenGate 12.2.0.1 software on linux.

GoldenGate software is available on OTN. Click on OTN GoldenGate Download 

Click on accept license agreement and then download the below Goldengate version for Linux.
Oracle GoldenGate V12.2.0.1.1 for Oracle on Linux x86-64 (454 MB)
The Oracle Goldengate software bundle is delivered as zip file (fbo_ggs_Linux_x64_shiphome.zip). 


You must expand the zip file using the unzip command before you can install the software.

Unzip the Oracle GoldenGate software bundle:
$ unzip fbo_ggs_Linux_x64_shiphome.zip
After unzip you will get given below files.



Go to fbo_ggs_Linux_x64_shiphome/Disk1 directory 


Run the run oui by writing the below command
$ ./runInstaller

Select your database version. In my case, it is 12c. And press Next.



Specify Oracle Goldengate software location and database location with manager port number.And press Next.



Press Next.



Press Next.



Press Next.


Before start GoldenGate Configuration please consider the following points.

  1. Database should be running on archive log mode.
  2. We should have Primary key or unique key on table.
  3. Recycle bin feature should be turned off.
  4. Supplemental log should be enabled.
Check your supplement log data and force logging is enabled if not then follow below steps:

SQL> alter database add supplemental log data;
Database altered.
SQL> alter database force logging;
Database altered.
SQL> select supplemental_log_data_min, force_logging from v$database;
SUPPLEME FORCE_LOGGING
-------- ---------------------------------------
YES      YES
SQL> alter system set recyclebin=off deferred;
SQL> purge dba_recyclebin;


We then need to create a database user which will be used by the Goldengate Manager, Extract and Replicat processes. We can create individual users for each process or configure just a common user – in our case we will create the one user GGUSER and grant it the required privileges.
SQL> CREATE TABLESPACE TS_GG DATAFILE '/app/oracle/oradata/orcl/orcl_gg_01.dbf' SIZE 1G LOGGING ONLINE PERMANENT BLOCKSIZE 8192 EXTENT MANAGEMENT LOCAL AUTOALLOCATE DEFAULT NOCOMPRESS SEGMENT SPACE MANAGEMENT AUTO;
SQL> CREATE USER gguser IDENTIFIED BY gguser DEFAULT TABLESPACE TS_GG TEMPORARY TABLESPACE TEMP; 
SQL> GRANT CONNECT, RESOURCE, DBA TO gguser;
SQL> ALTER SYSTEM SET ENABLE_GOLDENGATE_REPLICATION=true SCOPE=BOTH; 
ADD SCHEMATRANDATA to enable schema-level supplemental logging for a table. ADD SCHEMATRANDATA acts on all of the current and future tables in a given schema to automatically log a superset of available keys that Oracle GoldenGate needs for row identification.
ggsci> ADD SCHEMATRANDATA <schema_name>
 Create the wallet for password security.
ggsci> Create Wallet
ggsci> Add CredentialStore
ggsci> Alter CredentialStore Add User gguser Password gguser Alias gguser
To grant the privileges needed by a user to be an administrator for OGG Integration with XStreamOut

exec dbms_goldengate_auth.grant_admin_privilege('GGUSER');
grant insert on system.logmnr_restart_ckpt$ to GGUSER;
grant update on sys.streams$_capture_process to GGUSER;
grant become user to GGUSER;

2 comments: