Oracle Database Disaster Recovery GoldenGate Steps

Oracle Database Disaster Recovery GoldenGate Steps

Oracle Database Disaster Recovery GoldenGate Steps

 

Author: Bobby Curtis, MBA

 

Date: November 27, 2024

 

Updated: January 23, 2025

 

Organization: RheoData

Table of Contents

INTRODUCTION:

PITR STEPS

Step 1:

Step 2:

Step 3:

Step 4:

Step 5:

 


 

Introduction:

During Oracle Database disaster recovery operations, Oracle GoldenGate replication is typically halted. The organization’s subsequent database recovery and Oracle GoldenGate reset procedures determine whether all transactions have been successfully replicated.

PITR Steps

Point-In-Time-Recovery of an Oracle Database resets the database to a previous point in time.  This type of recovery may recover the database five minutes back or a whole day.  Understanding how to reset Oracle GoldenGate to account for a PITR will be key to ensuring successfully replication.

 

The steps outlined here are intended to provide guidance and should be tested on a regular basis to ensure that Oracle GoldenGate resets as expected. All steps are using Oracle GoldenGate AdminClient to perform the required actions.

 

Step 1:

Stop GoldenGate Processes (Extract, Replicat & Distribution Paths) in both sites EU/AM.

 

Source:

adminclient> connect https://{hostname}:{port} {deployment} as oggadmin password {pwd} !

adminclient> stop extract {extract_name}

adminclient> stop distpath {path_name}

 

Target:

adminclient> connect https://{hostname}:{port} {deployment} as oggadmin password {pwd} !

adminclient> stop replicat {extract_name}

 

Step 2:

Perform Point-In-Time Recovery (PITR) of Oracle Database via snap mirror. As part of the recovery, apply any needed archive logs to bring the database up to current state.  The capture the System Change Number (SCN) after the database is opened.

 

To capture the System Change Number (SCN), use the CURRENT_SCN column from GV$DATABASE.

 

SQL> conn / as sysdba

SQL> select current_scn from gv$database;

 


 

Step 3:

Alter the extract that will be capturing from the recovered database to being at the System Change Number (SCN) in Step 2.  Then start the extract.

 

adminclient> connect https://{hostname}:{port} {deployment} as oggadmin password {pwd} !

adminclient> unregister extract {extract_name}

adminclient> register extract {extract_name}

adminclient> alter extract {extract_name}, scn {current_scn}

adminclient> alter extract {extract_name}, etrollover

adminclient> start extract {extract_name}

 

Step 4:
Alter Distribution Path to start at the beginning of the know trail file and the relative byte address. 

 

Note: The Relative Byte Address (RBA) can be set to 0 to start at the beginning of the trail file being set to. 

 

adminclient> connect https://{hostname}:{port} {deployment} as oggadmin password {pwd} !

adminclient> alter distpath {path_name} begin seqno {seq_number} rba {rba_number}

adminclient> start distpath {path_name}

 

Step 5:
Reset the replicat to begin applying transactions from the trail file generated by the distribution path.  This may cause duplicate transactions, and those transactions may need to be handled.

 

adminclient> connect https://{hostname}:{port} {deployment} as oggadmin password {pwd} !

adminclient> alter replicat {replicat_name}, extseq {seq_number} extrba {rba_number}

adminclient> start replicat {replicat_name} NOFILTERDUPTRANSACTIONS

 

    • Related Articles

    • Oracle GoldenGate - Installing Oracle GoldenGate binaries

      Installing Oracle GoldenGate binaries Author: Bobby Curtis, MBA Date: August 4, 2023 Organization: RheoData Table of Contents INTRODUCTION: Prerequisites: STEP 1: DOWNLOAD ORACLE GOLDENGATE 21.10 STEP 2: TRANSFER INSTALLATION FILES STEP 3: EXTRACT ...
    • Installing Oracle GoldenGate deployments

      Installing Oracle GoldenGate deployments Author: Bobby Curtis, MBA Date: August 8, 2023 Organization: RheoData Table of Contents INTRODUCTION: Prerequisites: STEP 1: DOWNLOAD ORACLE GOLDENGATE 21.10 STEP 2: TRANSFER INSTALLATION FILES STEP 3: EXTRACT ...
    • Oracle GoldenGate - Adding schemas to replication

      Adding schemas to replication Author: Bobby Curtis, MBA Date: September 25, 2023 Updated: January 23, 2025 Organization: RheoData Table of Contents INTRODUCTION: ADDING A SCHEMA/TABLE BETWEEN DATABASES ADDING SCHEMA/TABLE TO REPLICATION CONCLUSION: ...
    • Oracle GoldenGate - Deployments: Switchover

      Oracle GoldenGate Deployments: Switchover Author: Bobby Curtis, MBA Date: August 17, 2023 Organization: RheoData Table of Contents INTRODUCTION: PREREQUISITES STEP 1: EXPORT DEPLOYMENT VAR AND ETC HOMES STEP 2: STOP SERVICEMANAGER STEP 3: VERIFY ...
    • Oracle GoldenGate - Adding schemas/tables to replication - DDL

      Adding schemas/tables to replication - DDL Author: Bobby Curtis, MBA Date: October 1, 2023 Updated: January 23, 2025 Organization: RheoData Table of Contents INTRODUCTION: ADDING SCHEMA/TABLE TO REPLICATION (DDL) CONCLUSION: REFERENCE: Introduction: ...