• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Configuring Data Guard in Oracle Cloud Infrastructure (OCI)

by admin

Working with Oracle Data Guard

Oracle Data Guard ensures high availability, data protection, and disaster recovery for enterprise data. The Oracle Cloud Infrastructure Database Data Guard implementation requires two databases: one in a primary role and one in a standby role. The two databases make an Oracle Data Guard association. Most of your applications access the primary database, while the standby database is a transactionally consistent copy of the primary database.

Oracle Data Guard maintains the standby database by transmitting and applying redo data from the primary database. If the primary database becomes unavailable, then you can use Oracle Data Guard to switch or failover the standby database to the primary role.

Switchover

A switchover reverses the primary and standby database roles. Each database continues to participate in the Oracle Data Guard Association in its new role. A switchover ensures no data loss. Performing planned maintenance on a DB system with an Oracle Data Guard association is typically done by switching the primary database to the standby role, performing maintenance on the standby database, and then switching it back to the primary role.

Failover

A failover transitions the standby database into the primary role after the existing primary database fails or becomes unreachable. A failover might result in some data loss when you use Maximum Performance protection mode.

Reinstate

Reinstates a database into the standby role in an Oracle Data Guard association. You can use the reinstate command to return a failed database into service after correcting the cause of the failure.

In this post, we will see how to configure data guard with RAC on OCI.

Assumption: Oracle RAC database is already installed and configured on OCI.

image01

1. Click on Displa Name: DBSVM

Click on Displa Name- DBSVM

2. Click on Databases on Resources in left side pane. Then click on Database Name –> SKANTORC.

click on resources OCI

3. Click on Data Guard Association on Resources in left side pane. Then click on Enable Data Guard button.

Data Guard Association

4. As shown in the below image. Provide all the information.

  • Display Name: SKANTDRVM
  • Availability Domain: aXWk:US-ASHBURN-AD-1
  • Shape: VM.Standard2.2
  • Client Subnet: Public Subnet-SKANTVCN(regional)

enable data gaurd OCI

  • Hostname Prefix : SKANTDR
  • Protection Mode is Maximum Performance by default. The Console supports only Maximum Performance.
  • The redo transport type used for this Data Guard association. The Console supports only Async.

OCI enable data guard

  • Provide admin password
  • Click on Enable Data Guard.

provide admin password

verify details data gaurd OCI

After some time, data guard has been created.

data guard created

5. Click on the Display Name for Data Guard: SKANTDRVM

check display name OCI

6. Now, use the private key and public IP of any node and connect to server with OPC user for getting the more details.

login as: opc
Authenticating with public key "rsa-key-20200220"
$ sudo su - oracle
Last login: Fri Feb 28 02:51:45 UTC 2020
$ ps -ef|grep pmon
oracle   12510     1  0 Feb27 ?        00:00:02 ora_pmon_SKANTORC1
grid     71169     1  0 Feb27 ?        00:00:02 asm_pmon_+ASM1
grid     80533     1  0 Feb27 ?        00:00:01 apx_pmon_+APX1
oracle   99783 99546  0 02:53 pts/0    00:00:00 grep --color=auto pmon
$ sqlplus / as sysdba

Connected to:
Oracle Database 19c EE Extreme Perf Release 19.0.0.0.0 - Production
Version 19.5.0.0.0

SQL> select NAME,INSTANCE_NAME,HOST_NAME,OPEN_MODE,LOG_MODE,DATABASE_ROLE,CREATED from gv$database d ,gv$instance i where d.inst_id=i.inst_id;

SQL> set lines 200 pages 200

NAME      INSTANCE_NAME    HOST_NAME                                                        OPEN_MODE            LOG_MODE     DATABASE_ROLE    CREATED
--------- ---------------- ---------------------------------------------------------------- -------------------- ------------ ---------------- ---------
SKANTORC  SKANTORC1        skantdr1                                                         READ ONLY WITH APPLY ARCHIVELOG   PHYSICAL STANDBY 27-FEB-20
SKANTORC  SKANTORC2        skantdr2                                                         READ ONLY WITH APPLY ARCHIVELOG   PHYSICAL STANDBY 27-FEB-20

SQL> exit
Disconnected from Oracle Database 19c EE Extreme Perf Release 19.0.0.0.0 - Production
Version 19.5.0.0.0
$ dgmgrl /
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Fri Feb 28 02:55:28 2020
Version 19.5.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Welcome to DGMGRL, type "help" for information.
Connected to "SKANTORC_iad134"
Connected as SYSDG.
DGMGRL> show configuration

Configuration - SKANTORC_iad19m_SKANTORC_iad13

  Protection Mode: MaxPerformance
  Members:
  SKANTORC_iad19m - Primary database
    SKANTORC_iad134 - Physical standby database

Fast-Start Failover:  Disabled

Configuration Status:
SUCCESS   (status updated 103 seconds ago)

DGMGRL> exit

Diagnostic Information needs to collect in case of failure in the Data Guard Association

Primary DB system

  • dbcli list-jobs
  • dbcli describe-job -id [job id of all jobs related to DG Config Service creation]
  • All logs in /opt/oracle/dcs/log/.
  • The OCID of Primary DB system

Standby DB system

  • dbcli list-jobs
  • dbcli describe-job -id [job id of all jobs related to DG Config Service creation]
  • dbcli describe-job -id [job id of Database service creation with db name:[db name]]
  • All logs in /opt/oracle/dcs/log/*.*
  • RMAN log file in /opt/oracle/dcs/log//rman/bkup/*.log
  • The OCID of Standby DB system

All the activities logged in the dcs agent log file which is located in /opt/oracle/dcs/log/dcs-agent*.log. The rman duplicate command activity is logged in /opt/oracle/dcs/log/scoredr/rman/bkup/[yyyy-mm-dd]/rman_yyyy_mm_dd_[timestamp].log

Filed Under: Data Guard, oracle

Some more articles you might also be interested in …

  1. How to Create the Oracle Password File using orapwd Command
  2. Define redo log files in an Oracle RAC environment
  3. How to move spfile from ASM to filesystem
  4. ASM disk addition/deletion hung with no rebalancing
  5. How To Add New Disk to An Existing Diskgroup on RAC Cluster or Standalone ASM Configuration
  6. Oracle ASM – How ASM Disk Resync Works
  7. Oracle RMAN 12c – New Features
  8. Oracle RAC Interview Questions – Coherence and Split-Brain
  9. How to Disable Oracle Net Tracing without stopping server process
  10. How to Enable Fast-Start Failover in Oracle Data Guard

You May Also Like

Primary Sidebar

Recent Posts

  • raw: command not found
  • raw Command Examples in Linux
  • rankmirrors Command Examples in Linux
  • radeontop: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright