Installing goldengate is very easy.  We are using V11.2.1.0.3 for Oracle 11g on Linux x86-64 for this Tutorial. Below steps need to be done on both source and targer side, i.e on extract side and replicate side.

If you are new to golden gate Read Introduction to golden gate and its architecture

 

1. Download the goldengate software:

 

Navigate tohttp://edelivery.oracle.com and select the product as oracle goldengate

 

2.unzip the downloaded goldengate file and set the path

 

$ unzip V34339-01.zip
$ tar -xvf fbo_ggs_Linux_x64_ora11g_64bit.tar
$ export PATH=$PATH: /u02/oradata/gg
$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/u02/oradata/gg

 

3. create subdirs

 

$ ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.3 14400833 OGGCORE_11.2.1.0.3_PLATFORMS_120823.1258_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Aug 23 2012 20:20:21
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
GGSCI (source) 1>CREATE SUBDIRS

 

 

4.Create tablespace on both Source and Target Databases

 

SQL> create tablespace ggate_TBS datafile '/u02/oradata/EODD4/ggate.dbf' size 5g autoextend on next 500m maxsize 10g extent management local segment space management auto;

5. Database user for Oracle GoldenGate processes

                   Create a database user that is dedicated to Oracle GoldenGate Manager, Extract, Replicat processes. It can be the same user for all of the Oracle GoldenGate processes that must connect to a database. In our case the user is “GGATE”

SQL> create user ggate_user identified by ggate_user  default tablespace ggate_TBS;

----Assign the correct privileges to the Oracle GoldenGate database user as shown below
grant create session, alter session to ggate_user;
grant connect,resource to ggate_user;
grant select any dictionary to ggate_user;
grant flashback any table to ggate_user;
grant INSERT, UPDATE, DELETE ON  to ggate_user;
grant select any table to ggate_user;
grant create table to ggate_user;
grant execute on dbms_flashback to ggate_user;
grant select any TRANSACTION to ggate_user;
grant LOCK ANY TABLE to ggate_user;
grant execute on utl_file to ggate_user;

6 . Enable archivelog mode for the database:

Make sure the database is in archive log mode: – How to enable archive mode 

6.Enable supplemental logging at database level:

              Usually insert and delete statement involves complete row change. But update can be done on a particular set of columns.  So Redo logs don’t capture sufficient information for update statements , i.e oracle logs only changed columns for update operation in redo. Without sufficient info , goldengate can’t find which row to be updated. So supplemental logging enables in capturing additional information for update operations in redo logs.

 Below command will enable minimum level of supplemental logging at database level.

 

SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
Database altered

 

Enable force_logging for the database:

alter database force logging;

select force_logging from v$database;

 

Check the gg login

GGSCI (source) 1>  dblogin userid ggate_user, password ggate_user
Successfully logged into database.

 

 

SEE ALSO:

How to configure manager process in oracle goldengate: