Download the GoldenGate software from Oracle Edelivery.

Select a Product Pack: Oracle Fusion Middleware
Platform: Linux X86


Download the Oracle GoldenGate media pack.

Create the directory for GoldenGate.

$ mkdir -p /u01/app/gg

Make changes in your bash profile.

Add path variable.

PATH=/u01/app/gg:$PATH; export PATH

LD library entry should look something like this.

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/u01/app/gg; export LD_LIBRARY_PATH

Reload bash profile

$ . ./.bash_profile


copy the tar file to the "gg" directory and untar

tar -xvof fbo_ggs_Linux_x86_ora11g_32bit.tar

Invoke the GoldenGate Software Command Interface.

[oracle@canada gg]$ ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1.2 OGGCORE_11.1.1.1.2_PLATFORMS_111004.2100
Linux, x86, 32bit (optimized), Oracle 11g on Oct 4 2011 23:53:33

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



GGSCI (canada) 1> create subdirs
Code:
Creating subdirectories under current directory /u01/app/gg

Parameter files                /u01/app/gg/dirprm: created
Report files                   /u01/app/gg/dirrpt: created
Checkpoint files               /u01/app/gg/dirchk: created
Process status files           /u01/app/gg/dirpcs: created
SQL script files               /u01/app/gg/dirsql: created
Database definitions files     /u01/app/gg/dirdef: created
Extract data files             /u01/app/gg/dirdat: created
Temporary files                /u01/app/gg/dirtmp: created
Veridata files                 /u01/app/gg/dirver: created
Veridata Lock files            /u01/app/gg/dirver/lock: created
Veridata Out-Of-Sync files     /u01/app/gg/dirver/oos: created
Veridata Out-Of-Sync XML files /u01/app/gg/dirver/oosxml: created
Veridata Parameter files       /u01/app/gg/dirver/params: created
Veridata Report files          /u01/app/gg/dirver/report: created
Veridata Status files          /u01/app/gg/dirver/status: created
Veridata Trace files           /u01/app/gg/dirver/trace: created
Stdout files                   /u01/app/gg/dirout: created
GGSCI (canada) 2> exit

Before going any further make sure your database is in
archivelog mode.

Prepare your database for replication.

In order to extract committed transactions from the source database
the database must be configured with supplemental logging on primary
key columns.

SQL> alter database add supplemental log data (primary key) columns;

Database altered.

Do a logswitch to start supplemental logging.

SQL> alter system switch logfile;

System altered.

SQL> select supplemental_log_data_min, supplemental_log_data_pk,
supplemental_log_data_ui from v$database;


SUPPLEME SUP SUP
-------- --- ---
IMPLICIT YES NO


SUPPLEMENTAL_LOG_DATA_MIN: Ensures that logminer will have sufficient information.
SUPPLEMENTAL_LOG_DATA_PK: Indicates whether all columns of the primary key are placed into
the redo log whenever an update is performed.
SUPPLEMENTAL_LOG_DATA_UI: Indicated whether all columns belonging to the unique key are placed
into the redo log if any of the unique columns are modified.

Create a Tablespace and user for GoldenGate.

SQL> create tablespace golden datafile'/u01/app/oracle/oradata/orcl/golden01.dbf' size 100m
2 autoextend on
3 extent management local
4 segment space management auto;

Tablespace created.

SQL> create user ggs_admin identified by ggs_admin
2 temporary tablespace temp
3 default tablespace golden
4 quota unlimited on golden;

User created.


SQL> grant dba to ggs_admin;

Grant succeeded.

SQL> alter system set recyclebin=off scope=spfile;

System altered.

--Set recyclebin to off, Necessary for DDL Replication from Oracle 10g onwards.


SQL> shutdown immediate
SQL> startup