Tuesday, 21 February 2017

Oracle Goldengate Tutorial - Beginner (Level 6)

Creating Process Groups

This Chapter contains instructions for creating Oracle GoldenGate process groups, collectively known as "change-synchronization" processes.
At Minimum, you will create one primary extract, One data pump and a replicat process group.

Add the Primary Extract

1. Set the RMAN archivelog deletion policy to the following value
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY
2. Add Extract Process Group

DBLOGIN USERIDALIAS myalias
ADD EXTRACT finance, INTEGRATED TRANLOG, BEGIN NOW

Add The Local Trail
ADD EXTTRAIL /ggs/dirdat/lt, EXTRACT finance
Add the Datapump Extract Group
ADD EXTRACT financep, EXTTRAILSOURCE c:\ggs\dirdat\lt
Add the Remote Trail
ADD RMTTRAIL /ggs/dirdat/rt, EXTRACT financep
Add The Replicat Group
DBLOGIN USERIDALIAS alias
ADD REPLICAT financer, EXTTRAIL c:\ggs\dirdat\rt

Monday, 20 February 2017

Oracle Goldengate Tutorial - Beginner (Level 5)

Choosing Capture and Apply Modes

For an Oracle database, you can run extract group in either Classic Capture and Integrated Capture Mode.

Classic Capture

  • In a Classic capture mode, the Oracle Goldengate Extract process captures data changes from the Oracle redo or archive log files on the source system or from shipped archived log on a standby system
.
Integrated Capture
  • In Integrated Capture mode, the Oracle Goldengate Extract process interacts directly with a database logmining server to receive data changes in the form of Logical Change Record (LCR).

Oracle Goldengate Tutorial - Beginner (Level 4)

Configuring Database Logging Properties

  • Oracle Goldengate relies on the redo logs to capture the data it needs to replicate source transactions.
  • The Oracle redo log on the source system must be configured properly before you start Oracle GoldenGate Processing.
There are 3 Database Logging Levels that applies to GoldenGate.

1. Enabling Minimum Database-level Supplemental Logging

SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
SQL> ALTER DATABASE FORCE LOGGING;
SELECT supplemental_log_data_min, force_logging FROM v$database;

2. Enabling Schema-Level Supplemental Logging
GGSCI> DBLOGIN USERIDALIAS alias
GGSCI> ADD SCHEMATRANDATA hr
3. Enabling Table-Level supplemental Logging
GGSCI> DBLOGIN USERIDALIAS alias
GGSCI> ADD TRANDATA [container.]schema.table

Oracle Goldengate Tutorial - Beginner (Level 3)

Installing Oracle Goldengate


  • Oracle Goldengate for Oracle Database is installed from the Oracle Universal Installer (OUI).
Performing an Interactive Installation with OUI
  • Expand the isntallation File.
  • From the expanded directory, run the runInstaller program in Unix.
  • On the Select Installation Option, select the Oracle Goldengate version to install.
  • On the Specify Installation Detail, specify the following :
    • Software Location
    • (Optional) Select Start Manager to perform configuration functions, such as creating the Oracle Goldengate subdirectories in the installation location, setting library Paths and starting manager on the specified port number.
    • Specify the directory for the central inventory.
    • On the Summary page, confirm the options selected.
    • Click on Install to begin the installation.
Performing a Silent Installation with OUI

  • Expand the isntallation File.
  • From the expanded directory, run the runInstaller program in Unix as below:
./runInstaller -silent -nowait -responseFile path_to_file
  • You can create a response file by selecting "Save Response File" option during an interactive OUI session or by editing a template.
  • The response file and template file are stored on the "response" sub-directory of the Oracle GoldenGate installation directory.

Sunday, 19 February 2017

Oracle Goldengate Tutorial - Beginner (Level 2)

GGSCI (GoldenGate Software Command Interface)


  • GGSCI is a command line tool to configure and manage Oracle Goldengate Processes.
  • You can use GGSCI to issue the complete range of commands that configure, control, and monitor Oracle Goldengate.
  • To start GGSCI, change directories to the Oracle Goldegate installation directory and then run the ggsci executable file.
[oracle@linux1 ~]$ cd /u01/app/oracle/product/gg/
[oracle@linux1 gg]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO
Linux, x86, 32bit (optimized), Oracle 11g on Apr 23 2012 08:09:25

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



GGSCI (linux1) 1>



  • Few commands used in GGSCI
    • info all - List out the all the processes and their status.
    • HISTORY - Displays a list of previously executed commands.
    • ! - Execute the previous command again without editing it.
    • FC - To edit the previous command and then execute it.

GGSCI (linux1) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED
EXTRACT     STOPPED     EX05        00:00:00      455:41:38
EXTRACT     ABENDED     EX06        00:00:00      360:20:27
EXTRACT     ABENDED     EX1         00:00:00      144:38:39
EXTRACT     STOPPED     EX24        00:00:00      699:59:39
EXTRACT     STOPPED     EX28        00:00:00      589:11:14
EXTRACT     STOPPED     EX30        00:00:00      554:47:32
EXTRACT     STOPPED     EXGGATE     00:00:00      746:03:09
EXTRACT     STOPPED     EXSRC       00:00:00      723:24:57
EXTRACT     STOPPED     EXT         00:00:00      340:15:56
EXTRACT     ABENDED     PM1         00:00:00      289:51:46
EXTRACT     STOPPED     PMP         00:00:00      340:16:02


GGSCI (linux1) 2> !
info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED
EXTRACT     STOPPED     EX05        00:00:00      455:41:44
EXTRACT     ABENDED     EX06        00:00:00      360:20:32
EXTRACT     ABENDED     EX1         00:00:00      144:38:45
EXTRACT     STOPPED     EX24        00:00:00      699:59:45
EXTRACT     STOPPED     EX28        00:00:00      589:11:19
EXTRACT     STOPPED     EX30        00:00:00      554:47:37
EXTRACT     STOPPED     EXGGATE     00:00:00      746:03:15
EXTRACT     STOPPED     EXSRC       00:00:00      723:25:03
EXTRACT     STOPPED     EXT         00:00:00      340:16:02
EXTRACT     ABENDED     PM1         00:00:00      289:51:52
EXTRACT     STOPPED     PMP         00:00:00      340:16:08


GGSCI (linux1) 3> history

GGSCI Command History

    1: info all
    2: info all
    3: history


GGSCI (linux1) 4> FC

Sunday, 12 February 2017

Oracle Goldengate Tutorial - Beginner (Level 1)


Oracle Goldengate enables the exchange and manipulation of data at the transaction level among multiple, heterogeneous platforms across the enterprise.Its modular architecture gives you the flexibility to extract and replicat selected data records, transactional changes and changes to DDL.

In simple terms, Oracle GoldenGate is a Transaction level data replication software from Oracle Corporation. It can replicate data in one-way (Uni-directional) and two ways (Bi-directional) between homogeneous and heterogeneous databases (Such as, Oracle-Oracle, Oracle-SQL Server etc.). It maintains data integrity by applying the DML (and DDL) changes on the target database, in the same order, that on the source database.

With this flexibility, and the filtering, data transformation, and custom processing features of Oracle Goldengate, you can support numerous business requirement.

  • Business Continuance and high availability
  • Initial Load and Database Migration
  • Data Integration
  • Decision support and data warehousing
Oracle Goldengate Supported Topologies


Overview of the Oracle Goldengate Architecture


Oracle Goldengate is composed of the following components

  • Extract
    • Extract process is the extraction or capture mechanism of Oracle GoldenGate, which runs on the Source system.
    • You can configure Extract in one of the following ways
      • Initial Load
      • Change Synchronization
    • If data pump process is configured, Extract process writes the change record in to physical files on dis, called trail.
  • Data Pump
    • Data Pump is a Secondary Extract Group within the Source Oracle Goldengate configuration.
    • The data pump reads the trail and sends the data operations over the network to a remote trail on the target.
  • Trails or Extract Files
    • Oracle Goldengate stores records of the captured changes temporarily on disk in a series of files called a trail.
  • Replicat
    • The replicat process runs on the target system.
    • The replicat reads the trail on the target system(Which is sent by either Extract or Data Pump Process), and then reconstruct the DML or DDL operations and applies them to the target database.
    • You can configure Replicat in one of the following ways:
      • Initial Load
      • Change Synchronization
  • Checkpoints
    • Checkpoints stores the current read and write positions of a process to disk, for recovery purposes.
  • Manager
    • Manager is the control process of Oracle Goldegate.
    • One Manager process can control many Extract or Replicat process.
  • Collector
    • Collector is the process that runs in the background on the target system when continuous, online change synchronization is active. 
    • Collector is started automatically and runs in the background.