官术网_书友最值得收藏!

Setting up a GoldenGate replication between Oracle RAC databases

High Availability is the buzz word in today's world. The systems need to be available all the time. The applications store their data in the databases, so it becomes quite critical for the databases to be fault tolerant and always available. Oracle RAC is a popular choice when companies want to build resilience in their systems. More and more applications are becoming RAC aware and it is quite common to see companies migrating most of their applications to Oracle RAC-based database environments.

Replicating the data between Oracle RAC databases requires some additional setup. In this recipe we will look into what configuration steps are required to setup replication between Oracle RAC environments. We will not cover the set up required to make the GoldenGate replication highly available itself as there are many ways to do it and will be covered in separate recipes in Chapter 5, Oracle GoldenGate High Availability.

Getting ready

This recipe assumes that GoldenGate has already been installed in the source and target environment. Both the source and target databases are 2 Node Oracle RAC 11.2.0.3 databases. In both environments, GoldenGate has been installed in a shared filesystem /u01.

How to do it…

Perform the following steps in the source database:

  1. Create an Extract process EGGTEST1 in the source environment:
    ./ggsci
    EXTRACT EGGTEST1
    USERID GGATE_ADMIN@RACDB, PASSWORD GGATE_ADMIN
    TRANSLOGOPTIONS DBLOGREADER
    EXTTRAIL /u01/app/ggate/dirdat/st
    TABLE scott.*;
  2. Create a GoldenGate Datapump process in the source environment:
    ./ggsci
    EDIT PARAMS PGGTEST1
    EXTRACT PGGTEST1
    USERID GGATE_ADMIN@RACDB, PASSWORD GGATE_ADMIN
    RMTHOST tg-oggvip.localdomain , MGRPORT 8809
    RMTTRAIL /u01/app/ggate/dirdat/rt
    TABLE scott.*;
  3. Add the Extract process to the source manager configuration:
    ADD EXTRACT EGGTEST1, THREADS 2, TRANLOG, BEGIN NOW
  4. Add the local trail to the Extract process:
    ADD EXTTRAIL /u01/app/ggate/dirdat/st, EXTRACT EGGTEST1, MEGABYTES 100
  5. Add the Datapump process to the source manager configuration:
    ADD EXTRACT PGGTEST1, EXTTRAILSOURCE /u01/app/ggate/dirdat/st
  6. Add the remote trail location to the Datapump process:
    ADD RMTTRAIL /u01/app/ggate/dirdat/rt, EXTRACT PGGTEST1, MEGABYTES 100
  7. Start the Extract and Datapump process:
    START EXTRACT EGGTEST1
    START EXTRACT PGGTEST1

Perform the following steps in the target database:

  1. Create a GoldenGate Replicat process in the target environment:
    ./ggsci
    EDIT PARAMS RGGTEST1
    REPLICAT RGGTEST1
    USERID GGATE_ADMIN@TGRACDB, PASSWORD GGATE_ADMIN
    DISCARDFILE /u01/app/ggate/dirrpt/RGGTEST1.dsc,append,MEGABYTES 500
    ASSUMETARGETDEFS
    MAP SCOTT.*, TARGET SCOTT.*;
  2. Add the Replicat process to the target manager configuration:
    ADD REPLICAT RGGTEST1, EXTTRAIL /u01/app/ggate/dirdat/rt,CHECKPOINTTABLE CHECKPOINT, BEGIN NOW
  3. Start the Replicat process:
    START REPLICAT RGGTEST1

How it works…

The setup assumes that Oracle GoldenGate is already installed in the source and target environment, and a GoldenGate manager instance has been set up as well. We create an extract parameter file. Since this database is running on Oracle ASM, we need to specify the TRANSLOGOPTIONS DBLOGREADER parameter to enable the Extract process to read the archive log from ASM. We then create a Datapump process parameter file. The key thing to note in the Datapump configuration in the case of the Oracle RAC-based target system is the name of the remote host. The GoldenGate manager resource should be configured on a Virtual IP in the target environment and this Virtual IP should be specified as the remote host in the source Datapump configuration.

In an RAC environment, you need to specify the threads parameter while adding the Extract process to the GoldenGate manager configuration.

The TNS entry used in the replicat configuration should be configured using the TAF policies in your environment.

You can also use GoldenGate to set up replication between two environments when only one of them is clustered.

See also

For information on how to configure GoldenGate in an RAC environment see the following receipes in Chapter 5, Oracle GoldenGate High Availability:

  • Creating a highly available GoldenGate configuration using Oracle Clusterware and ACFS
  • Creating a highly available GoldenGate configuration using Oracle Clusterware and OCFS2
  • Creating a highly available GoldenGate configuration using Oracle Clusterware and DBFS
主站蜘蛛池模板: 盖州市| 驻马店市| 聂拉木县| 浙江省| 昆明市| 镇巴县| 区。| 时尚| 红原县| 新乡县| 松溪县| 土默特左旗| 宜春市| 武城县| 巴楚县| 新泰市| 呼伦贝尔市| 临城县| 炉霍县| 娄底市| 沁水县| 广宁县| 布尔津县| 湘乡市| 台南市| 临海市| 渭源县| 平和县| 阳朔县| 临西县| 桦甸市| 耒阳市| 遂平县| 湘潭市| 永善县| 耿马| 虹口区| 新干县| 商城县| 鹤山市| 余干县|