Oracle GoldenGate introduction and installation configuration tutorial

Source: Internet
Author: User

Oracle GoldenGate introduction and installation configuration tutorial

Introduction to Oracle GoldenGate

GoldenGate is a log-Based Structured Data replication software. GoldenGate can capture, transform, and deliver a large amount of transaction data in real time, synchronize data between the source database and the target database, and maintain data latency in sub-seconds.

GoldenGate supports multiple topologies, including one-to-one, one-to-many, multiple-to-one, cascade, and bidirectional replication.

The topology of Data Replication includes the following types:

Application scenarios of Goldegate

  • A static extraction of data records from one database and the loading of those records
  • To another database.
  • Continuous extraction and replication of transactional DML operations and DDL
  • Changes (for supported databases) to keep source and target data consistent.
  • Extraction from a database and replication to a file outside the database.

Architecture Overview

Oracle Goldengate consists of the following components

  • Extract
  • Data pump
  • Replicat
  • Trails or extract files
  • Checkpoints
  • Manager
  • Collector

The Extract process is used to capture data sources. There are three types:

  • When initial load mode is configured, the data source is a table.
  • Database recovery logs (some databases are also called transaction logs ).
  • The third-party capture model sends the Database Change Data to the Extract process by calling the Extact API.

Data pump is an optional auxiliary component of Extract. If Data pump is not configured, Extract sends the captured Data directly to the Collector process on the target machine.

Data pump provides the following advantages:

  • Prevents network or target Collector faults and protects data loss.
  • Data pump can be used to overwrite, convert data, or configure to Pass-through mode, that is, data is shipped without any action.
  • Start Multiple Data pump for one-to-many Data distribution (or Data in one table is sent to different target systems according to the Data type)

Replicat runs on the target server, reads data from the Trail file, reconstructs DML and DDL statements, and applies them to the target database. You can configure multiple Replicat to improve the throughput of the system.

To support continuous capture and replication of database changes, Oracle temporarily records captured database changes to a series of disk files. These disk files are called Trail files.

A Trail file can only be written by one Extract. Each Extract process must be linked to a Trail file.

Checkpoints when the Goldengate process is down, you can restore the Goldengate instance.

Manager is the management process of Goldengate.

Before you start Extract and Replicat, you must start the Manager Process on each node.

Manager has the following functions:

  • Start Oracle GoldenGate processes
  • Start dynamic processes
  • Maintain port numbers for processes
  • Perform trail management
  • Create event, error, and threshold reports

Collector receives data transmitted by the remote system and writes it to the Trail file.

Group Overview

To distinguish multiple Extract or Replicat processes in the system, you need to define a processing group.

A group includes the following content:

  • A process, Extract or Replicat
  • Parameter file
  • Its checkpoint file
  • Any other files associated with this process.

Oracle GoldenGate installation and configuration tutorial

First, download the installation package of Oracle GoldenGate. As follows:

Http://www.oracle.com/technetwork/middleware/goldengate/downloads/index.html

Upload the Oracle GoldenGate installation package to the server
 
Decompress the package

[Oracle @ localhost app] $ mkdir/u01/app/ogg
[Oracle @ localhost app] $ unzip-d/u01/app/ogg ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip
Archive: ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip
Inflating:/u01/app/ogg/fbo_ggs_Linux_x64_ora11g_64bit.tar
Inflating:/u01/app/ogg/OGG_WinUnix_Rel_Notes_11.2.1.0.1.pdf
Inflating:/u01/app/ogg/Oracle GoldenGate 11.2.1.0.1 README.txt
Inflating:/u01/app/ogg/Oracle GoldenGate 11.2.1.0.1 README.doc
[Oracle @ localhost app] $ cd ogg/
[Oracle @ localhost ogg] $ tar-xvf fbo_ggs_Linux_x64_ora11g_64bit.tar

Modify environment variables and add PATH and LD_LIBARY_PATH

[Oracle @ localhost ~] $ Vi. bash_profile
Export PATH =/u01/app/ogg/: $ ORACLE_HOME/bin: $ PATH
Export LD_LIBRARY_PATH =/u01/app/ogg: $ ORACLE_HOME/lib:/usr/lib

WKiom1X3ldaAb38mAAB3TDYZgWE819.jpg

Enter the ogg installation directory and run the ggsci command

[Oracle @ localhost ogg] $./ggsci
 
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 oggcore_11.2.1.0.20.platforms_120423.0230_fbo
Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:32:14
 
Copyright (C) 1995,201 2, Oracle and/or its affiliates. All rights reserved.
 
GGSCI (localhost. localdomain) 1>

Create a working directory for OGG

GGSCI (localhost. localdomain) 1> create subdirs
 
Creating subdirectories under current directory/u01/app/ogg
 
Parameter files/u01/app/ogg/dirprm: already exists
Report files/u01/app/ogg/dirrpt: created
Checkpoint files/u01/app/ogg/dirchk: created
Process status files/u01/app/ogg/dirpcs: created
SQL script files/u01/app/ogg/dirsql: created
Database definitions files/u01/app/ogg/dirdef: created
Extract data files/u01/app/ogg/dirdat: created
Temporary files/u01/app/ogg/dirtmp: created
Stdout files/u01/app/ogg/dirout: created

Configure the parameters of the Manager Process

GGSCI (localhost. localdomain) 6> EDIT PARAMS MGR

Add the following content to define the communication port of the Manger Process

-- This is the minimal configuration of Manager
PORT 7809

-- Annotations are followed.

Start the Manager Process

GGSCI (localhost. localdomain) 14> start mgr
 
Manager started.

View the Manager Process

GGSCI (localhost. localdomain) 17> info mgr
 
Manager is running (IP port localhost. localdomain.7809 ).

Stop the Manager Process

GGSCI (localhost. localdomain) 18> stop mgr
Manager process is required by other GGS processes.
Are you sure you want to stop it (y/n )? Y
 
Sending STOP request to MANAGER...
Request processed.
Manager stopped.

If the validation information is ignored

GGSCI (localhost. localdomain) 20> stop mgr!
 
Sending STOP request to MANAGER...
Request processed.
Manager stopped.

Oracle GoldenGate tutorial 1: Introduction and Installation

Oracle GoldenGate tutorial 2. Configuration and usage

Oracle GoldenGate tutorial 3. Encryption

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.