You are on page 1of 18

Oracle Data Guard in Cloud

About me
ORACLE ACE Associate

AIOUG Evangelist and founder member of AIOUG Pune Chapter

Database professional with 16 years of experience. Expertise in


Database migration, upgrade, performance tuning, solution
designing, DBaaS and Exadata

Oracle Certified Implementation Specialist in Oracle IaaS Cloud,


12c & Exadata.

AWS Certified Solution Architect- Associate

Frequent presenter in All India Oracle User Group (AIOUG) and


Sangam

@AbhiniveshJain
http://abhiniveshjain.blogspot.in/
/abhiniveshjain
Contents

Why to have DR in Cloud?

Key Considerations for DR in Cloud

DR Options in Oracle Cloud

Data Guard provisioning in Oracle Cloud

Performing DB Switchover/Failover using Console and DBaaSCLI

DR options in AWS
Why to have DR in Cloud?

Cloud service providers has in-built high availability so obvious question that comes
to your mind is, why do I need to consider Oracle database disaster recovery for my
cloud database or Why should I put my DR database in Cloud?

Common Reasons-

Save costs related to running secondary data center

Starting point for your Cloud journey

Part of end to end move to Cloud

Not all kind of failures are covered in existing High Availability setup in Cloud.
E.g. Region level failure in AWS
DR Options in Oracle Cloud

Primary on Premise, DR in Oracle Cloud

Using Oracle cloud as DR brings the obvious benefits related to provisioning and maintaining DR site
but it has its own challenges and complexities related to network latency, administration and
performance. At high level following steps are performed to do this kind of configuration.
Create an Oracle instance in Oracle cloud
Perform network configuration to enable on premise DB connectivity with cloud DB
Drop database created as part of step 1
Instantiate Standby database using primary DB backup
Configure Standby database

Primary and DR both in Oracle Cloud

Oracle cloud provides fully automated setup of your primary and Standby database. Here your
primary and DR both databases reside in Oracle cloud
Data Guard Provisioning in Oracle Cloud
Step 1 Login to Oracle database Cloud Service Wizard
Step 2 Select Create Service and Choose Oracle Database Cloud
Service in Service Level.
Data Guard in Oracle Cloud
Step 3 Select Required Software release (any of the option 11.2.0.4 or 12.1.0.2 can be selected
here)
Data Guard in Oracle Cloud
Step 4 Select Required software edition (anything except Standard edition)
Data Guard in Oracle Cloud
Step 5 Fill required details in Service details page and select Standby Database with
Data Guard and then select High Availability or Disaster Recovery option.
Data Guard Administration in Oracle Cloud
Checking the Standby Configuration
Data Guard Administration in Oracle Cloud
Performing DB Switchover- Initiating Switchover
Data Guard Administration in Oracle Cloud
Performing DB Switchover- During Switchover

Performing DB Switchover- After Switchover


Data Guard Administration in Oracle Cloud
Performing DB Switchover- Using DBaaS CLI

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


{
"PROTECTION_LEVEL" : "MAXIMUM PERFORMANCE",
DBAAS CLI version 1.0.0
"ADDITIONAL_MESSAGES" : "",
Executing command dataguard status --details yes
"APPLY_LAG" : "00 days 00 hrs 00 min 04 sec",
SUCCESS: Dataguard is up and running
"DATABASE_NAME" : "ORCL_02",
{
"APPROXIMATE_ROLE_TRANSITION_TIME" : "00 days 00 hrs 00 min 04 sec + 30 sec",
"instances" : [
"ACTIVE_SESSIONS" : "2",
{
"HOST_NAME" : "CloudDBDG-dg02",
"DATABASE_TYPE" : "PRIMARY",
"TRANSPORT_LAG" : "00 days 00 hrs 00 min 00 sec last computed 0 days 0 hrs 0 min 1 sec
"PROTECTION_MODE" : "MAXIMUM PERFORMANCE", before",
"PROTECTION_LEVEL" : "MAXIMUM PERFORMANCE", "PROTECTION_MODE" : "MAXIMUM PERFORMANCE",
"ADDITIONAL_MESSAGES" : "", "DATABASE_TYPE" : "PHYSICAL STANDBY",
"DATABASE_NAME" : "ORCL_01", "OPEN_MODE" : "MOUNTED"
"PENDING_APPLY_LOG_CNT" : 0, }
"ACTIVE_SESSIONS" : "3", ]
"HOST_NAME" : "CloudDBDG-dg01", }
"OPEN_MODE" : "READ WRITE" [oracle@CloudDBDG-dg01 ~]$
},
Data Guard Administration in Oracle Cloud
Performing DB Switchover- Using DBaaS CLI

[oracle@CloudDBDG-dg01 ~]$ dbaascli dataguard switchover

DBAAS CLI version 1.0.0


Executing command dataguard switchover
Warning: Permanently added 'clouddbdg-dg01-nat,129.152.151.188' (RSA) to the list of known hosts.
Warning: Permanently added 'clouddbdg-dg02-nat,129.144.15.205' (RSA) to the list of known hosts.
Performing switchover NOW, please wait...
New primary database "ORCL_02" is opening...
Operation requires startup of instance "ORCL" on database "ORCL_01"
Starting instance "ORCL"...
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is "ORCL_02"
SUCCESS : Switchover to Standby operation completed successfully
[root@CloudDBDG-dg01 opc]# /etc/init.d/ords restart
INFO: Stopping Oracle REST Data Services...
INFO: Oracle REST Data Services stopped
INFO: Starting Oracle REST Data Services...
INFO: Oracle REST Data Services started with PID 5860
[root@CloudDBDG-dg01 opc]# exit
Data Guard Administration in Oracle Cloud
Reinstatiate Failed Primary
DR options in AWS
There are 2 DR options available in AWS.
1. Multi-AZ deployment
2. Data Guard configuration
Multi-AZ deployment option is applicable only for Amazon RDS Since this option provisions your
database in 2 availability zones hence this can be used as DR option for availability zone level failure.
Data Guard configuration works in EC2 kind of setup and it protects you from availability zone or region
level failures.
Oracle Data Guard can be configured in following ways-
Primary DB in on premise and DR in AWS
Primary and standby DB both in same AWS region
Primary and standby DB both in different AWS regions
Data Guard configuration steps are similar to on premise DB
Thank You

Abhinivesh.jain@gmail.com

You might also like