Monday, June 10, 2013

Steps By Step Install Oracle Goldengate on Windows 7



Steps By Step Install Oracle Goldengate on Windows 7

Oracle Goldengate:


Real-Time Data Integration and Heterogeneous Database Replication
Low-impact, real-time change data capture, distribution, and delivery for transactional data across heterogeneous systems for continuous availability, zero downtime migration, and business intelligence.
 

Steps to Install GoldenGate 11g on windows 7.

Pre-Requisites:   
   
1. Oracle

Install the Oracle software on two Machines. In this blog Oracle 11g-R1 is used for test purposes.

2.      Make DataBase archivelog mode (required on primary DB only)

SQL> shutdown immediate;

To enable the database in archive log mode following parameters must be set in init.ora file of instance
log_archive_dest_1=’location=C:\app\home1\flash_recovery_area\orcl\ARCHIVELOG’

log_archive_dest_state_1=enable

SQL> startup mount;
SQL> alter database archivelog;
 Database altered
SQL> alter database open;
 Database altered


Installation:

Download Oracle goldengate
Oracle GoldenGate v11.1.1.1.0 for Oracle 11g 64 bit on Windows

GoldenGate FileName is ggs_Windows_x64_ora11g_64bit.zip
extract it to folder ggs_Windows_x64_ora11g_64bit
goto extrected folder \ggs_Windows_x64_ora11g_64bit   and double click on ggcsi

Following window will appear-GoldenGate



Now create GoldenGate SubDirs with create subdirs command
GGSCI (home1-PC) 2> create subdirs
Manually create discard folder in \ggs_Windows_x64_ora11g_64bit 

Oracle2

Repeat all these steps on the second Machine

Enable supplemental logging (required on primary DB)
SQL> alter database add supplemental log data; 


Execute following commands as sysdba:


SQL>create user ggate identified by ggate default tablespace users temporary tablespace temp;
 
SQL> grant connect,resource,unlimited tablespace to ggate;

SQL> grant execute on utl_file to ggate;

SQL> @ Folder Path :\ggs_Windows_x64_ora11g_64bit/marker_setup.sql 

SQL> @ Folder Path :\ggs_Windows_x64_ora11g_64bit/ddl_setup.sql 

SQL> @ Folder Path :\ggs_Windows_x64_ora11g_64bit/role_setup.sql

SQL> grant GGS_GGSUSER_ROLE to ggate;

SQL> @ Folder Path :\ggs_Windows_x64_ora11g_64bit/ddl_enable.sql

SQL> create user sender identified by sender1 default tablespace users temporary tablespace temp;

SQL> grant connect,resource,unlimited tablespace to sender; 

Most important grant on Database dictionary views otherwise it will keep on Crashing

SQL>grant select any dictionary to sender;


Oracle2


SQL> create user receiver identified by receiver1 default tablespace users temporary tablespace temp;

SQL> grant connect,resource,unlimited tablespace to receiver;

SQL>grant select any dictionary to receiver

   

PC-1 : Goldengate Setup

GGSCI (home1-PC) 1> info all

Program Status Group Lag Time Since Chkpt

MANAGER STOPPED

GGSCI (home1-PC) 2> edit params mgr

in the text editor type 7809

GGSCI (home1-PC) 3> start manager

Manager started.


GGSCI (home1-PC) 4> dblogin userid ggate 
Password:


Successfully logged into database.
GGSCI (home1-PC) 5> add extract ext1, tranlog, begin now
EXTRACT added.
GGSCI (home1-PC) 6> add exttrail C:\ggs_Windows_x64_ora11g_64bit\dirdat\lt, extract ext1
EXTRACT added.

GGSCI (home1-PC) 14> edit params ext1

Following IP-ADDER  for your second machine

---------------extract group---------------

extract ext1

---------------connection to database---------------

userid GGATE, password ggate

---------------hostname and port for trail---------------

rmthost 192.168.4.xx, mgrport 7809

---------------path and name for trai l---------------

rmttrail folder path:\ggs_Windows_x64_ora11g_64bit\dirdat\lt

---------------DDL support---------------

ddl include mapped objname sender.*;

---------------DML support---------------

table sender.*;


PC-2 : Goldengate Setup

start ggsci

Oracle GoldenGate Command Interpreter for Oracle

Version 11.1.1.1 OGGCORE_11.1.1_PLATFORMS_110421.2040


GGSCI (home1-PC) 1> edit params ./GLOBAL

---------------Add following lines---------------

GGSCHEMA ggate
CHECKPOINTTABLE ggate.checkpoint
dblogin userid ggate
Password:
Successfully logged into database.

GGSCI (home-PC) 11> add checkpointtable ggate.

checkpoint Successfully created checkpoint table GGATE.CHECKPOINT.

----------------Create replica group----------------------

GGSCI (home-PC) 12> add replicat rep1, exttrail  Folder Path :\ggs_Windows_x64_ora11g_64bit\dirdat\lt,checkpointtable ggate.checkpoint
REPLICAT added.

----------------Create parameter file for replica----------------

GGSCI (home-PC) 13> edit params rep1

----------------Replica group----------------

replicat rep1

----------------source and target definitions----------------

ASSUMETARGETDEFS

----------------target database login----------------

userid receiver, password receiver1

----------------file for dicarded transaction----------------

discardfile Folder Path :\ggs_Windows_x64_ora11g_64bit\discard\rep1_discard.txt, append, megabytes 10

----------------ddl support----------------

DDL INCLUDE ALL

----------------Specify table mapping----------------

map sender.*, target receiver.*;


PC-1 : Goldengate Setup

GGSCI (home1-PC) 14> start extract ext1

GGSCI (home1-PC) 15> info all
Program             Status             Group         Lag              Time Since Chkpt

MANAGER      RUNNING

EXTRACT        RUNNING      EXT1       00:00:00        10:21:40


PC-2 : Goldengate Setup

GGSCI (home-PC) 16> start replicat rep1

GGSCI (home-PC) 17> info all

Program           Status               Group         Lag              Time Since Chkpt
MANAGER    RUNNING
REPLICAT     RUNNING       REP1          00:00:00      11:23:20

10 comments:

  1. Hi,
    When run marker_setup.sql, it take very long time. Is it a problem?

    Thanks

    ReplyDelete
    Replies
    1. Kevin,

      pls run 'marker_setup.sql' from the directory where this script resides and not with full path.


      Thanks

      Delete
    2. Dear Mr.Kevin!
      Greeting ...
      Check out this .... My another Post
      http://khurramlogix.blogspot.com/2013/06/oracle-goldengate-configuration-step-by.html

      Delete
  2. Various steps are missing/confusing for single machine implementation, for overview its a good blog though.

    ReplyDelete
  3. many steps are missing and tried to follow but working. I appreciate with you post step by step approach. please be aware of this fact most of the people visit this blog either beginners or intermediate skilled.

    ReplyDelete
    Replies
    1. Dear Mr.Bright!
      Greeting ...
      Check out this .... My another Post
      http://khurramlogix.blogspot.com/2013/06/oracle-goldengate-configuration-step-by.html

      Delete
  4. many steps are missing and tried to follow but working. I appreciate with you post step by step approach. please be aware of this fact most of the people visit this blog either beginners or intermediate skilled.

    ReplyDelete
  5. Sorry! Bro Tell me at what point you are struck?

    ReplyDelete
  6. Dear Greeting ...
    Check out this .... My another Post
    http://khurramlogix.blogspot.com/2013/06/oracle-goldengate-configuration-step-by.html

    ReplyDelete
  7. Hello Khurram,
    Appreciate it is very useful but i am struck in step @ Folder Path :\ggs_Windows_x64_ora11g_64bit/marker_setup.sql
    from where to find out the path and if you have any document, kindly sent the link

    Regard

    ReplyDelete