Deploying Data Guard on Oracle Cloud - #DRaaS

Version 11

    Introduction

    Since many years DBAs are very familiar with standby and then Data Guard with on-premises environment and now that is causing overhead on infrastructure expenses when hosting DR in geographically different location. This logic can be solved by deploying Data Guard into cloud with simple deployment model using Oracle managed infrastructure. This model can be set with no data inconsistency or corruptions, data protection and so on. In this article, we will see how to deploy the Data Guard on Cloud.

     

    Data Guard On-Promises vs. On Cloud

    With managing Data Guard on-premises, there are challenges such as planning of DR, where it should be located, infrastructure cost, bandwidth, lengthy deployment procedure, easy scalability, concerns over database security and corruptions.  Oracle Cloud provides benefits like simple and quick deployment, scalability, data protection, geographically different locations (for primary and standby databases) and strong data security. One of the best  part of having  Oracle Cloud is that it supports even the hybrid cloud support and easy integration with applications.

     

    Deployment of Data Guard on Cloud

    Deployment is easy and quick but prior to that we have to estimate the required resources for each instances such as number of CPUs, required RAM and disk space for each instances. However, it is easily scalable later but we have to come up with a plan based on the production usage. We will proceed with the actual deployment of Data Guard - where the primary and standby will be deployed in single shot. The primary database is hosted on on-premises and DR database on cloud.

                                                                                         2017_05_26_11_22_46_Microsoft_PowerPoint_Presentation1_.png

    • Ensure the cloud account has access with all the EE options, including Data Guard. 18 months back I have subscribed Oracle Cloud trial account, where there is no option for using extreme performance mode. Later on, an internal bug has been raised and finally discovered that the trial account does not cover Data Guard. So ensure you have the proper account and required access
    • Access to Oracle Cloud account,  then Oracle Database Cloud Service "Services" Dashboard.
    • Create new service as shown below.

    2017-02-03 20_29_01- Create Service.png

    • This will start the new console, which offers to create service. In this section we have to provide the basic service information such as service name, metering frequency, software edition and the database type. In our practice, we are creating Primary stand-alone and Standby standalone databases hence we are selecting "Single Instance with Data Guard Standby". We have to review the software edition we have and select the right option based on the license. In order to deploy DRaaS we should have at least EE license.

    2017-02-04 16_40_36-Oracle Database Cloud Service Details - service.png

    • In the above section after proceeding with the next page by clicking "next", we can access new form where we have to provide database configuration details. Here we can mention database name, passwords, hardware specification, backup configuration, standby database type [High availability, Disaster Recovery] etc.

     

    2017-02-04 16_44_11-Oracle Database Cloud Service Details - DR not HA.png

    • After providing all the details, we can proceed by clicking "next". This will give us complete summary of the service configuration. If there are any changes, we can review and then go back to update the changes.

    2017-02-04 16_43_31-Oracle Database Cloud Service Details Confirmation.png

    • Once we are done with reviewing the configuration, subscription details and  standby database configuration details, we can submit the  request. After submitting, then the actual service deployment will  start in the background.

    2017-02-04 16_44_47-Oracle Database Cloud Service Details  Summary in progress.png

    • During the service creation we can view the log of the service creation by clicking "Details"

    2017-02-04 16_45_54-Oracle Database Cloud Service Details - in progress 2.png

    • If there are any errors/issues then we have to review them and retry. To be honest it was not easy for me to deploy the Data Guard properly because of the trial version account. Now we will see the entire service details after the completion of the deployment.

    2017-02-04 21_04_12-Oracle Database Cloud Service Details  DG created final summary.png

    This will gives us all the details including the IP addresses, Oracle product information and including the hardware specification. Please note that the entire deployment includes with Data Guard Broker configuration as well.

     

    Post Deployment Tasks

     

    After the deployment we have to configure the SSH connectivity to access from the external network. This can be done with easy steps  documented here "Connecting to a Database Cloud Service (DBaaS) Instance Through an SSH Tunnel"

     

    Verify Data Guard Configuration

    Once we access through putty then we can connect to both of the instances and we will check the complete configuration of the Data Guard using dbaascli utility as below.

     

    [oracle@canada-dg01 ~]$ dbaascli dataguard status --details yes

    DBAAS CLI version 1.0.0

    Executing command dataguard status --details yes

    SUCCESS: Dataguard is up and running

    {

       "instances" : [

          {

             "PROTECTION_LEVEL" : "MAXIMUM PERFORMANCE",

             "ADDITIONAL_MESSAGES" : "",

             "APPLY_LAG" : "00 days 00 hrs 00 min 00 sec",

             "DATABASE_NAME" : "ORC1_01",

             "APPROXIMATE_ROLE_TRANSITION_TIME" : "00 days 00 hrs 00 min 00 sec + 30 sec",

             "ACTIVE_SESSIONS" : "2",

             "HOST_NAME" : "canada-dg01",

             "TRANSPORT_LAG" : "00 days 00 hrs 00 min 00 sec last computed 0 days 0 hrs 0 min 13 sec before",

             "PROTECTION_MODE" : "MAXIMUM PERFORMANCE",

             "DATABASE_TYPE" : "PHYSICAL STANDBY",

             "OPEN_MODE" : "MOUNTED"

          },

          {

             "PROTECTION_LEVEL" : "MAXIMUM PERFORMANCE",

             "ADDITIONAL_MESSAGES" : "",

             "DATABASE_NAME" : "ORC1_02",

             "ACTIVE_SESSIONS" : "1",

             "HOST_NAME" : "canada-dg02",

             "DATABASE_TYPE" : "PRIMARY",

             "PROTECTION_MODE" : "MAXIMUM PERFORMANCE",

             "PENDING_APPLY_LOG_CNT" : 0,

             "OPEN_MODE" : "READ WRITE"

          }

       ]

    }[oracle@canada-dg01 ~]$

     

    Review the Database Status with Traditional Method

     

    [oracle@canada-dg01 ~]$ dgmgrl

    DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production

     

    Copyright (c) 2000, 2013, Oracle. All rights reserved.

     

    Welcome to DGMGRL, type "help" for information.

    DGMGRL> connect /

    Connected as SYSDG.

    DGMGRL> show configuration

     

    Configuration - fsc

     

      Protection Mode: MaxPerformance

      Members:

      ORC1_01 - Primary database

        ORC1_02 - Physical standby database

     

    Fast-Start Failover: DISABLED

     

    Configuration Status:

    SUCCESS   (status updated 1 second ago)

     

    DGMGRL> show database 'ORC1_01'

     

    Database - ORC1_01

     

      Role:               PRIMARY

      Intended State:     TRANSPORT-ON

      Instance(s):

        ORC1

     

    Database Status:

    SUCCESS

     

    DGMGRL> show database 'ORC1_02'

     

    Database - ORC1_02

     

      Role:               PHYSICAL STANDBY

      Intended State:     APPLY-ON

      Transport Lag:      0 seconds (computed 12 seconds ago)

      Apply Lag:          0 seconds (computed 12 seconds ago)

      Average Apply Rate: 1.00 KByte/s

      Real Time Query:    OFF

      Instance(s):

        ORC1

     

    Database Status:

    SUCCESS

     

      DGMGRL>

     

    Summary

     

    We have seen how to deploy the Data Guard on Oracle Cloud with simple and easy steps starting from understanding the configuration, hardware specifications and the desired standby configuration. Prior to that the difference between various types of deployments such as 1) On-premises primary and DR on Cloud - Hybrid 2) Complete DR on Cloud" was explained. Finally we reviewed how to check the Data Guard configuration by dbaascli utility, how to use the traditional method to check the configuration and database status.

     

    Related Articles

    Data Guard Role Transitions on Oracle Cloud using “dbaascli”  #DRaaS

    Failover & Reinstating using "dbaascli" on Oracle Cloud - #DRaaS

     

     

     

    Nassyam Basha is a Database Administrator. He has around 10 years of IT experience as Oracle DBA, currently working as Senior Principal Consultant at Data Intensity. He holds a master's degree in Computer Applications from the University of Madras. He is an Oracle 11g Certified master an Oracle ACE Director. He actively participates in Oracle-related forums such as OTN with a status of Super Hero, Oracle support awarded as "Guru" and acting as OTN Moderator and written numerous articles with OTN and on Toad World. He maintains an Oracle technology-related blog, www.oracle-ckpt.com and can be reached at nassyambasha@gmail.com.