oracle data guard in cloud - aioug data guard in cloud.pdforacle certified implementation specialist...
TRANSCRIPT
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
@AbhiniveshJain
http://abhiniveshjain.blogspot.in/
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
DBAAS CLI version 1.0.0
Executing command dataguard status --details yes
SUCCESS: Dataguard is up and running
{
"instances" : [
{
"DATABASE_TYPE" : "PRIMARY",
"PROTECTION_MODE" : "MAXIMUM PERFORMANCE",
"PROTECTION_LEVEL" : "MAXIMUM PERFORMANCE",
"ADDITIONAL_MESSAGES" : "",
"DATABASE_NAME" : "ORCL_01",
"PENDING_APPLY_LOG_CNT" : 0,
"ACTIVE_SESSIONS" : "3",
"HOST_NAME" : "CloudDBDG-dg01",
"OPEN_MODE" : "READ WRITE"
},
{
"PROTECTION_LEVEL" : "MAXIMUM PERFORMANCE",
"ADDITIONAL_MESSAGES" : "",
"APPLY_LAG" : "00 days 00 hrs 00 min 04 sec",
"DATABASE_NAME" : "ORCL_02",
"APPROXIMATE_ROLE_TRANSITION_TIME" : "00 days 00 hrs 00 min 04 sec + 30 sec",
"ACTIVE_SESSIONS" : "2",
"HOST_NAME" : "CloudDBDG-dg02",
"TRANSPORT_LAG" : "00 days 00 hrs 00 min 00 sec last computed 0 days 0 hrs 0 min 1 sec
before",
"PROTECTION_MODE" : "MAXIMUM PERFORMANCE",
"DATABASE_TYPE" : "PHYSICAL STANDBY",
"OPEN_MODE" : "MOUNTED"
}
]
}
[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.0Executing command dataguard switchoverWarning: 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 restartINFO: Stopping Oracle REST Data Services...INFO: Oracle REST Data Services stoppedINFO: 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