Oracle goldengate Backup Software

Source: Internet
Author: User

Reprinted: http://edu.codepub.com/2010/0607/23329.php

 

I. Preface
Goldengate is a log-Based Structured Data replication software. It parses online logs of the source database or archives logs to obtain incremental data changes and then applies these changes to the target database, to synchronize the source and target databases. Goldengate can achieve sub-second-level real-time replication of large amounts of data between heterogeneous IT infrastructure (including almost all common operating system platforms and database platforms, it can be used in emergency systems, online reports, real-time data warehouse supply, Transaction Tracking, data synchronization, centralized/distributed, Disaster Tolerance, and other scenarios.

At the same time, goldengate can implement one-to-one, broadcast (one-to-multiple), aggregation (Multiple-to-one), bidirectional, point-to-point, cascading, and other flexible topology structures.

 

II. Environment requirements

1. supported platforms
Supported Oracle database versions
The following Oracle database versions are supported in the current Oracle goldengate 10.4
Oracle 8i (DML support only)
Oracle 9.1 and 9.2 (DML and DDL Support)
Oracle 10.1 and 10.2 (DML and DDL Support)
Oracle 11g (DML and DDL Support)

 

Supported Operating System Platforms
Goldengate supports almost all mainstream operating systems
Windows 2000,200 3, XP, Linux, Sun Solaris, HP nonstop, HP-UX

 

2. Operating System Requirements

(1) memory requirements
Goldengate's requirements for the operating system memory mainly depend on the number of extract and replicat processes. Generally, we recommend that you set the memory size to 2 GB.

(2) disk space requirements
Because the database must be set to archive mode, logs must be stored for at least 7 days. We recommend that you keep the remaining space at 10 Gb ~ Between GB.

(3) For the RAC Environment
The software and working directory of goldengate must be configured in the shared disk environment to ensure that it is available to all nodes. The goldengate process can be started from any node, when one of the nodes has an exception, you can start the remaining nodes without modifying any configuration parameters. Otherwise, if you run on a single node, you need to share the archived logs from the remaining nodes and load them to the goldengate node through some technology.

In the RAC environment, goldengate requires that all nodes maintain clock synchronization and that all RAC nodes and node nodes running the extract process maintain clock synchronization. Because goldengate compares the local system time with the commit timestamp. Therefore, this setting cannot be ignored. Otherwise, Data Replication disorder may occur.

3. Database Requirements

(1) database Client
Goldengate needs to install full Oracle client to facilitate goldengateProgramAccess Oracle xdk libraries.
(2) database users
We recommend that you use sys or any other user with sysdba/sysasm permissions.
(3) Database Configuration
For source Oracle Database Requirements, if the database is in archive mode, enable supplemental logs and force Logging

Configure the host strings for connecting the source database and the target database respectively.
Set up a dedicated user such as goldengate to synchronize the required data to the remote end, instead of using existing business users.
What permissions does this user need?
Create user goldengate identified by goldengate default tablespace users temporary tablespace temp quota unlimited on users;
Grant connect to goldengate;
Grant alter any table to goldengate;
Grant alter session to goldengate;
Grant create session to goldengate;
Grant flashback any table to goldengate;
Grant select any dictionary to goldengate;
Grant select any table to goldengate;
Grant resource to goldengate;
Grant drop any table to goldengate;
Grant DBA to goldengate;

Note *
Whether to enable the query statement for supplemental logs:
Select supplemental_log_data_min from V $ database;
Open the Supplemental log statement:
Alter database add Supplemental log data;
Open the force logging statement:
Alter database force logging;

4. Configure golengate
1. Install goldengate Software

Go to the installation directory of goldengate.
C: \ gss1 \ ggsci

In ggsci, issue the following command to create the goldengate working directories.
Ggsci>Create subdirs
Issue the following command to exit ggsci.
Exit

2. Configure the process

Step 1: configure the management process Mgr in the source database and target database respectively.
Ggsci> edit Params Mgr
Port 7809
(Save and Exit)
Ggsci> Start Mgr
Manager started.
Ggsci> info all
Programstatus group lag IME since chkpt
Manager running
(Can be started normally)

Step 2: Add two processes to the source database
*. Generally, two processes must be configured for the source database, one for data extraction (zle_01) and the other for data delivery (zle_02). By default, only DML is supported, to support DDL, You need to execute some separate configurations.

Ggsci> Add extract <Group Name>, tranlog, begin now, threads <thread number>

Group name indicates the extract group name.
Tranlog indicates how transaction logs are used.
Begin now indicates that from now on, you can also specify a specific start time
Threads indicates the instance from which the program runs. It is only applicable to the RAC environment. You must specify the option in a single-host environment.

 

(1) configure the Extraction Process

I am in a standalone environment. The extract group name is defined as zle_01.

Ggsci> dblogin userid goldengate @ orcl1, password goldengate

Ggsci> Add extract zle_01, tranlog, begin now
Extract added.

Ggsci> Add rmttrail./dirdat/RA, extract zle_01, megabytes 50

View the results of the extract process just defined
Ggsci> info extract zle_01
Extract zle_01 initialized 2010-01-19 :50 status stopped

Checkpoint lag 00:00:00 (updated 00:00:22 ago)

Log read checkpoint Oracle redo logs

2010-01-19 11:50:39 seqno 0, RBA 0

Add the following command: info extract zle_01. More details can be found in showch.

Configure the parameter file for the extracted extract process and run the following command in the source database:

Ggsci> edit Param zle_01

Add the following content:
Extract zle_01
Setenv (oracle_sid = orcl)
Userid goldengate @ orcl1, password goldengate
Rmthost 192.168.8.1, mgrport 9001
Rmttrail./dirdat/ra
Table zlhis. test;

Rmttrail tells extract process where to write the trail File

Table indicates that the extract process only processes the test table under the zlhis user.

Now you can start the capture process defined above and execute the following command:

Ggsci> Start extract zle_01

Sending start request to Manager ('mgr ')...
Extract zle_01 starting

Ggsci>

Verify the results:
Ggsci> info extract zle_01, detail
Ggsci> View Report zle_01

Ggsci> info extract zle_01

Now, we have completed the configuration of the simplest extract process extraction and started. Next we will configure the extract process delivery.

(2) configure the shipping process

Run the following command on the source system:

Ggsci> Add extract zle_02, exttrailsource./dirdat/RA, begin now
Ggsci> Add rmttrail./dirdat/La, extract zle_02

* (./Dirdat/La is the remote receiving directory, which must exist)

Ggsci> edit Params zle_02

Add the following content:

Extract zle_02

Dynamicresolution

Passthru

Rmthost 192.168.8.2, mgrport 9001, compress

Rmttrail./dirdat/La

Numfiles 3000

Table zlhis. test;

Ggsci> Start extract zle_02

Sending start request to Manager ('mgr ')...
Extract zle_02 starting

View the status:

Ggsci> info all

Program Status group lag time since chkpt

Manager running

Extract running zle_01 00:00:00 00:00:05

Extract running zle_02 00:00:00 00:00:07

(3) configure the receiving process

Execute the following command on the target system to add a replication group)

Ggsci> dblogin userid goldengate @ orcl2, password goldengate

Ggsci> Add replicat zlr_01, exttrail./dirdat/La, nodbcheckpoint

Note: The extract process example is configured in this example, so the exttrail file name here is exactly the rmttrail./dirdat/La defined in extract process.

Ggsci> edit Param zlr_01

Add the following content and save and exit

Replicat zlr_01

Setenv (oracle_sid = orcl)

Userid goldengate @ orcl2, password goldengate

Handlecollisions

Assumetargetdefs

Allownoopupdates

Dynamicresolution

Numfiles 3000

Discardfile./dirrpt/zlr_01.dsc, append, megabytes 10

Map zlhis. Test, target zlhis. test;

In the target system, run the following command:

Ggsci> Start replicat zlr_01

Verify the results:
Ggsci> info replicat zlr_01
Replicat zlr_01 last started 2010-01-19 13:50 status running

Checkpoint lag 00:00:00 (updated 00:00:03 ago)

Log read checkpoint file./dirdat/la000000

First Record RBA 0

View the status:

Ggsci> info all

Program Status group lag time since chkpt

Manager running

Replicat running zlr_01 00:00:00 00:00:09

 

V. Test Results
Insert, modify, and delete a data entry in the source database. View the extraction process status:

Ggsci> stats zle_01

Sending stats request to extract zle_01...

Start of statistics at 02:53:01.

Output to./dirdat/RA:

Extracting from zlhis. Test to zlhis. test:

* ** Total statistics since 2010-01-26 02:15:01 ***

Total inserts 1.00

Total updates 1.00

Total deletes 1.00

Total discards 0.00

Total operations 3.00

* ** Daily statistics since 2010-01-26 02:15:01 ***

Total inserts 1.00

Total updates 1.00

Total deletes 1.00

Total discards 0.00

Total operations 3.00

*** Hourly statistics since 2010-01-26 02:15:01 ***

Total inserts 1.00

Total updates 1.00

Total deletes 1.00

Total discards 0.00

Total operations 3.00

* ** Latest statistics since 2010-01-26 02:15:01 ***

Total inserts 1.00

Total updates 1.00

Total deletes 1.00

Total discards 0.00

Total operations 3.00

End of statistics.

You can see that there are records and the extraction has been successful. Then you can view the shipping process,

Ggsci> stats zle_02

Sending stats request to extract zle_02...

Start of statistics at 03:04:13.

 

Output to/u01/GGS/dirdat/Re:

Extracting from zlhis. Test to zlhis. test:

* ** Total statistics since 2010-01-26 02:14:25 ***

Total inserts 1.00

Total updates 1.00

Total deletes 1.00

Total discards 0.00

Total operations 3.00

 

* ** Daily statistics since 2010-01-26 02:14:25 ***

Total inserts 1.00

Total updates 1.00

Total deletes 1.00

Total discards 0.00

Total operations 3.00

 

*** Hourly statistics since 2010-01-26 03:00:00 ***

 

No database operations have been saved med.

 

* ** Latest statistics since 2010-01-26 02:14:25 ***

Total inserts 1.00

Total updates 1.00

Total deletes 1.00

Total discards 0.00

Total operations 3.00

 

End of statistics.

Switch to the target database environment and view and accept application processes.

Ggsci> stats zlr_01

Sending stats request to replicat zlr_01...

Start of statistics at 05:58:36.

Replicating from zlhis. Test to zlhis. test:

* ** Total statistics since 2010-01-26 04:46:57 ***

Total inserts 1.00

Total updates 1.00

Total deletes 1.00

Total discards 0.00

Total operations 3.00

 

* ** Daily statistics since 2010-01-26 04:46:57 ***

Total inserts 1.00

Total updates 1.00

Total deletes 1.00

Total discards 0.00

Total operations 3.00

 

*** Hourly statistics since 2010-01-26 05:00:00 ***

Total inserts 0.00

Total updates 1.00

Total deletes 1.00

Total discards 0.00

Total operations 2.00

 

* ** Latest statistics since 2010-01-26 04:46:57 ***

Total inserts 1.00

Total updates 1.00

Total deletes 1.00

Total discards 0.00

Total operations 3.00

 

End of statistics.

Vi. Summary
The above only records a small part of goldengate software testing. The overall feeling is that goldengate is very similar to Oracle's stream replication, but it is different. For its own applications, each has its own disadvantages:
Advantages:
1. simple installation and configuration.
2. The management and maintenance are relatively intuitive. the built-in Oracle management pack for Oracle goldengate management tool allows you to manage its graphical interface.
3. supporting heterogeneous replication, such as the replication of different users and different database platforms, is also a highlight.
4. The future development potential is still very promising.

disadvantages:
1. The official software currently only supports 64-bit systems.
2. because it is a third-party tool, it has high requirements on the environment, especially in the Linux environment, it has requirements on the character set of the operating system, mainly because the table names in our system are all Chinese, must support Chinese characters.
3. during parameter configuration of the application process, it is found that for a large number of table copies, it is not clear whether goldengate has restrictions, because at startup, when I configure parameters to copy all zlhis tables, the error "" will be prompted. However, if you only copy a few or a single table, this prompt will not appear, the problem is being verified.
4. Currently, the information available on the Internet is quite limited, and the penetration rate is not very high.
In summary, the highlights of goldengate compared with stream replication are still heterogeneous. However, the official Oracle statement is that the first-class streams technology will be integrated into goldengate in the future, this is also its development trend. Its value is worth further research for our users' applications.
5. According to Oracle, goldengate does not support Chinese table names! Tragedy

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.