Friday 25 March 2016

Installing Goldengate in linux

                                   


1.    Download software Oracle GoldenGate V12.2.0.1.1 for Oracle on Linux x86-64

121210_fbo_ggs_Linux_x64_shiphome.zip
unzip the software:
$unzip 121210_fbo_ggs_Linux_x64_shiphome.zip

2.  You can user uninstaller to install software, I am using silent installation from putty.

edit response file:

cd /u02/software/fbo_ggs_Linux_x64_shiphome/Disk1/response

vi oggcore.rsp (edit the file)

INSTALL_OPTION=ORA11g
SOFTWARE_LOCATION=/u01/app/oracle/GG
START_MANAGER=false
UNIX_GROUP_NAME=oinstall

3.    Install GG
./runInstaller -silent -nowait -responseFile /u02/softwares/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp


create the softlink for given library file to resolve the below issue

$ ./ggsci

./ggsci: error while loading shared libraries: libnnz11.so: cannot open shared object file: No such file or directory

$ cd $ORACLE_HOME/lib

$ ls -lrt libnnz*
-rw-r--r--. 1 oracle oinstall  7996693 Jul  9  2013 libnnz11.so
-rw-r--r--. 1 oracle oinstall 11751340 Dec 24 09:48 libnnz11.a

$ pwd

/u01/app/oracle/product/11.2.0/db_1/lib

$ cd /orasw/app/oracle/GG

$ ln -s /u01/app/oracle/product/11.2.0/db_1/lib/libnnz11.so .

4. Edit profile file and set LD_LIBRARY_PATH and GG_HOME

vi .bash_profile

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_HOME
export GG_HOME=/u01/app/oracle/product/11.2.0/GG
export GG_HOME
export PATH=$ORACLE_HOME/bin:$GG_HOME:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$GG_HOME:$LD_LIBRARY_PATH
export ORACLE_SID=SRC

5. Enter into GG prompt

cd $GG_HOME

./ggsci

Wednesday 16 March 2016



   Database-level supplemental logging must be enabled for any Change Data Capture source database.  You can see if supplemental logging is enabled with these queries:

 select
   SUPPLEMENTAL_LOG_DATA_MIN,
   SUPPLEMENTAL_LOG_DATA_PK,
   SUPPLEMENTAL_LOG_DATA_UI
from
   v$database;

Supplemental logging is also a column in dba_tables.
Supplemental logging places additional column data into the redo log file whenever an UPDATE operation is performed. At the least, minimal database-level supplemental logging must be enabled for any Change Data Capture source database:
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
Database altered.
When Supplemental Logging is enabled, either some selected columns or all columns are specified for extra logging. They are called a supplemental log group and consist of nothing but a set of additional columns that are being logged.

When the supplemental logging is active on a database, the redo logs contain other columns from tables to uniquely identify a row. If the table has a primary key or unique index defined, the only columns involved in the primary key or unique index will be registered in the redo logs along with the actual column(s) that has changed.

If the table does not have any primary keys or unique index defined, Oracle will write all scalar columns from the table to identify the row. This may significantly increase the size of redo logs and will impact the log apply services on the logical standby site.
 
There are two types of supplemental log groups that determine when columns in the log group are logged:
  • Unconditional Supplemental Log Groups - The before-images of specified columns are logged any time a row is updated, regardless of whether the update affected any of the specified columns. This can be referred to as an ALWAYS log group.
     
  • Conditional Supplemental Log Groups - The before-images of all specified columns are logged only if at least one of the columns in the log group is updated.
Supplemental Logging can be enabled at database level or at the table level. When it is enabled at database level, there are two types, minimal logging and identification key logging.

Streams supplemental logging places additional column data into the redo log file whenever an UPDATE operation is performed. At the least, minimal database-level supplemental logging must be enabled for any Change Data Capture source database:
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA; 
 
Why is supplemental logging needed? When a particular column is updated at the source database table for a set of rows, the values in the column or columns are logged by default. When these values are moved to the destination side, to which rows does Oracle apply them, or how does Oracle identify the rows to be updated? Supplemental logging provides the answers to these questions.