Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

[goldengate] official document notes three Oracle GoldenGate real-time reports

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This document provides a step-by-step description of several configuration schemes for OGG replication at the right time. Start with the most basic configuration, gradually join new processes, add new policies, and the configuration changes with it. Let's start with the most basic configuration.

Report configuration

One-to-one replication is the most basic configuration scheme of OGG: replicating data from the source database to the target database. Work on reporting and analysis on the target side to achieve the separation of OLTP and OLAP.

Create a standard report configuration

The standard OGG configuration is that an extraction group (Extract group) sends the captured data to the target system's trail file through TCP/IP. The replication group (Relicat group) reads the data from trail, executes the sql statement to repeat the DML and DDL statements, and realizes the synchronous replication of the data.

SOURCEdb-> EXTRACT-> TCP/IP-- > RMTTRAIL-- > REPLICAT-- > TARGETdb

Source-end system

Configuration Management process (Manager process)

1. Configure the management process on the source side. See [goldengate] official documentation Note 1.

Http://blog.itpub.net/29047826/viewspace-1249506/

Configure the extraction process group (Extract group)

2. On the source side, use the ADD EXTRACT command to create an Extract group named ext

ADD EXTRACT, {TRANLOG | INTEGRATED TRANLOG}, BEGIN [, THREADS]

3. On the source side, use the ADD RMTTRAIL command to specify the trail file (remote trail) of the target host on the target system. The parameter EXTRACT associates the trail file with the extraction group direction.

ADD RMTTRAIL, EXTRACT

4. On the source side, create a parameter file for the extraction group (Extract group) using the EDIT PARAMS command.

-- specify the name EXTRACT for the extraction group

-- OGG manages user names and passwords for user login data

[SOURCEDB] [, USERID [, PASSWORD []]

-- specify the IP address, port number and encryption method of the destination system

RMTHOST, MGRPORT, ENCRYPT

-specify remote trail and encryption method

ENCRYPTTRAIL [] RMTTRAIL

-- specify the table TABLE to capture.

Target end system

Create an administrative process

5. Configure the management process on the source side. See [goldengate] official documentation Note 1.

Http://blog.itpub.net/29047826/viewspace-1249506/

6. In the Manager process parameter file, use the PURGEOLDEXTRACTS parameter to control the deletion from the source-side trail.

Configure replication Group (Replicat group)

7. On the destination side, create a replication checkpoint table (Replicat checkpoint table).

8, on the destination side, use the ADD REPLICAT command to create a replication group (Relicate group). Use the EXTTRAIL parameter to associate the replication group (Replicate group) with the remote trail file. Tells the replication process where to get the file.

ADD REPLICAT, EXTTRAIL, BEGIN

9, on the target side, use the EDIT PARAMS command to create a replication group (Replicat group) parameter file.

-- specify a name for Replicat group REPLICAT-- State whether or not source and target definitions are identical: SOURCEDEFS | ASSUMETARGETDEFS-- OGG manages the username and password of the user logging in to the database [TARGETDB] [, USERID] [, PASSWORD []]-- Specify error handling rules:-- Specify decryption if trail is encrypted: DECRYPTTRAIL REPERROR (,)-- the table name of the associated source and target libraries is MAP., TARGET. [, DEF]

Add delivery process data pump

After the most basic configuration has just been completed, we can further improve the reliability of network transmission. Add a process, datapump, between the extraction process (Extract) and the TCP/IP network connection. Give it an appropriate Chinese name "delivery process". The delivery process is also a kind of extraction process, which can be called the secondary extraction process. It reads the information in the trail on the source side and delivers (sends) the information to the trail file on the destination side through TCP/IP. Although the delivery process is not required, it is recommended for the performance and reliability of the system. From the diagram below, you can see where the delivery process datapump is located.

SOURCEdb-> EXTRACT-> DataPump-> TCP/IP-- > RMTTRAIL-- > REPLICAT-- > TARGETdb

Configure the delivery process group (data pump Extract group)

On the source side, use the ADD EXTRACT command to create a delivery process group with the following instructions:

ADD EXTRAIL, EXTTRAILSOURCE, BEGIN

EXTTRAILSOURCE: this parameter refers to the path of the trail file on the source side, from which the posting process reads the trail and sends it to the destination side.

On the source side, use the ADD RMTTRAIL command to specify the remote trail to be created on the destination side.

ADD RMTTRAIL, EXTRACT

EXTRACT: this parameter connects the delivery process (data pump) on the source side with the trail on the destination side.

Sum up the above:

The new delivery process is a porter working on the source side. It finds the local trail file through EXTTRAILSOURCE, reads the file, finds the remote trail file path through the RMTTRAIL parameter, and delivers it.

Use the EDIT PARAMS command to create a parameter file for the posting process on the source side

-- specify delivery process group: EXTRACT-- specify OGG administrative user login username and password: [SOURCEDB] [, USERID] [, PASSWORD]

[]]

-- if the trail entered is encrypted, specify:

DECRYPTTRAIL

-- specify the hostname and ip address of the target system

-- encryption method for transferring data through TCP/IP:

RMTHOST, MGRPORT, ENCRYPT

-- specify the encryption method of the destination trail file []

RMTTRAIL

-- specify the capture object:

TABLE.

When the source and target databases are not in the same network, you can create a delivery process in an intermediary system that becomes a setter throughout the deployment.

The delivery process of the source database reads this local trail and delivers (writes) to the trail in the intermediary system, and the delivery process in the intermediary system (setter) reads the trail in the intermediary system and delivers it to the target.

The following changes need to be made in the configuration:

In the delivery process parameters on the source side, the IP of RMTHOST needs to be set as the mediation address, and RMTTRAIL needs to be set to the mediation trial path.

The following needs to be configured in the mediation system:

1. Configure the management process Manager process in the same way as the source library.

2. Use PURGEOLDEXTRACTS in the Manager parameter file to control the trail deletion policy

3. Configure the delivery process group, which is named pump_2

ADD EXTRACT, EXTTRAILSOURCE, BEGIN

EXTTRAILSOURCE: this parameter specifies the path of the trail file in the mediation system

4. Use ADD RMTTRAIL to specify the target database trail location

ADD RMTTRAIL, EXTRACT

EXTRACT: this parameter indicates that the "mediation posting process" you just created writes data to the trail file of the target database.

Let's take a look at the configuration file for the delivery process

-- Identify the data pump group:

EXTRACT

-- Note that no database login parameters are required in this case.

-- State whether or not source and target definitions are identical: SOURCEDEFS | ASSUMETARGETDEFS

-- Specify the target definitions file if SOURCEDEFS was used: TARGETDEFS

-- Specify decryption if input trail is encrypted:

DECRYPTTRAIL

-- Specify the name or IP address of the target system

-- and optional encryption of data over TCP/IP:

RMTHOST, MGRPORT, ENCRYPT-- Specify the remote trail and encryption options on the target system: ENCRYPTTRAIL []

RMTTRAIL

-- Allow mapping, filtering, conversion or pass data through as-is; [PASSTHRU | NOPASSTHRU]

-- Specify tables to be captured:

TABLE.

The last part of the document is a cascading configuration, that is, two-way replication, which is not listed here.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report