By Joel Peréz & Skant Gupta
This article is brought by en.enmotech.com
Full Index of Oracle Cloud Articles:
If you want to be updated with all our articles send us the Invitation or Follow us:
Joel Perez’s LinkedIn: www.linkedin.com/in/SirDBaaSJoelPerez
Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/
or Join our LinkedIn group: Oracle Cloud DBaaS
Hi Readers, in this article you will go through the steps to create a disaster recovery configuration with Oracle Data Guard using the public Cloud Service “Oracle Database Cloud Service”. Across a simple wizard you will see how easy is to create a configuration with Data Guard in Cloud-Cloud Deployment. So.. Let’s start..
When creating an Oracle Database Cloud Service database deployment at the Oracle Database Cloud Service level, you can create an Oracle Data Guard configuration.
Since we will talk about Oracle Data Guard, let’s remember the concept:
Oracle Data Guard enables production Oracle databases to survive disasters and data corruptions by providing a comprehensive set of services that create, maintain, manage, and monitor a standby database. Oracle Data Guard maintains the standby database as a copy of the production database. If the production database becomes unavailable because of a planned or an unplanned outage, you can switch the standby database to the production role, minimizing the downtime associated with the outage.
To create an Oracle Data Guard configuration in Database Cloud Service, make the following choices in the Create Service wizard:
When you make these choices, Database Cloud Service creates an Oracle Data Guard configuration with a primary database and a single standby database, hosting the databases on two independent compute nodes. It creates these compute nodes using computing, storage and networking resources provided by Oracle Compute Cloud service.
Create the Oracle Data Guard in Cloud Database Service
a) Login to your Oracle cloud services account, go to the “Oracle Database Cloud Service” page and create a new service.
Then click Next to continue.
Figure1. Creating a new service (DATAGUARD)
b) In the Service Details screen, do the following:
Then click Next to continue.
Figure 2. Specifying the service details
c) Finally, review the configuration and click Create to create your cloud database.
Figure 3. Creating the cloud database instance
c) After a few minutes, the data guard in cloud database instance has been created successfully.
Figure 4. The cloud database has been created
d) Click the service name (DATAGUARD) to open the main page of the database.
Figure 5. Main page of the dataguard on cloud database
Connect the Cloud Database
1. Open the two instances of the PuTTY executable and connect to the machine using SSH public key.
Figure 6. Connecting to machines using PuTTY
Check the Status of Oracle Data Guard on Cloud
On Primary Machine |
---|
[oracle@DATAGUARD-dg01 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 21 18:20:30 2017 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production With the Partitioning and Real Application Testing options SQL> |
On Standby Machine |
---|
[oracle@DATAGUARD-dg02 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 21 18:20:30 2017 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production With the Partitioning and Real Application Testing options SQL> |
2.- Check the status of database role on both machines.
On Primary Machine |
---|
SQL> set lines 200 SQL> select name, db_unique_name, database_role, switchover_status, open_mode from v$database;
NAME DB_UNIQUE_NAME DATABASE_ROLE SWITCHOVER_STATUS OPEN_MODE ——— —————————— —————- ——————– ——————– ORCL ORCL_01 PRIMARY SESSIONS ACTIVE READ WRITE
SQL> |
On Standby Machine |
---|
SQL> set lines 200 SQL> select name, db_unique_name, database_role, switchover_status, open_mode from v$database; NAME DB_UNIQUE_NAME DATABASE_ROLE SWITCHOVER_STATUS OPEN_MODE ——— —————————— —————- ——————– ——————– ORCL ORCL_02 PHYSICAL STANDBY NOT ALLOWED READ ONLY WITH APPLY
SQL> |
Checking the Status of the Oracle Data Guard Configuration with dbaascli utility
You can use the dataguard status subcommand of the dbaascli utility to check the status of your Oracle Data Guard configuration.
Before performing certain operations, you may want to check the status of your Oracle Data Guard configuration.
To check the status of the Oracle Data Guard configuration by using the dataguard status subcommand:
Using username “opc”. Authenticating with public key “rsa-key-20170425” Passphrase for key “rsa-key-20170425”: [opc@DATAGUARD-dg01 ~]$ sudo su – oracle [oracle@DATAGUARD-dg01 ~]$ |
2. Check the status of the configuration
[oracle@DATAGUARD-dg01 ~]$ dbaascli dataguard status DBAAS CLI version 1.0.0 Executing command dataguard status SUCCESS : Dataguard is up and running DETAILS: Configuration – fsc Protection Mode: MaxPerformance Databases: ORCL_01 – Primary database ORCL_02 – Physical standby database Properties: FastStartFailoverThreshold= ’30’ OperationTimeout= ‘120’ FastStartFailoverLagLimit = ’30’ CommunicationTimeout= ‘180’ ObserverReconnect = ‘0’ FastStartFailoverAutoReinstate= ‘TRUE’ FastStartFailoverPmyShutdown= ‘TRUE’ BystandersFollowRoleChange= ‘ALL’ ObserverOverride= ‘FALSE’ ExternalDestination1= ” ExternalDestination2= ” PrimaryLostWriteAction= ‘CONTINUE’ Fast-Start Failover: DISABLED Configuration Status: SUCCESS [oracle@DATAGUARD-dg01 ~]$ |
3. Check the status of the configuration with detail subcommand
[oracle@DATAGUARD-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” : “DATAGUARD-dg01”, “OPEN_MODE” : “READ WRITE” }, { “PROTECTION_LEVEL” : “MAXIMUM PERFORMANCE”, “ADDITIONAL_MESSAGES” : “”, “APPLY_LAG” : “00 days 00 hrs 00 min 00 sec”, “DATABASE_NAME” : “ORCL_02”, “APPROXIMATE_ROLE_TRANSITION_TIME” : “00 days 00 hrs 00 min 00 sec + 30 sec”, “ACTIVE_SESSIONS” : “2”, “HOST_NAME” : “DATAGUARD-dg02”, “TRANSPORT_LAG” : “00 days 00 hrs 00 min 00 sec last computed 0 days 0 hrs 0 min 9 sec before”, “PROTECTION_MODE” : “MAXIMUM PERFORMANCE”, “DATABASE_TYPE” : “PHYSICAL STANDBY”, “OPEN_MODE” : “MOUNTED” } ] } [oracle@DATAGUARD-dg01 ~]$ |
Conclusion
So now you know that it is very easy to create the Oracle Data Guard in Database Cloud Service.
This article will continue with two more parts where we will see the steps necessary to perform Switchover, Failover & Reinstate Operations with Console and then performing the same with dbaascli utility.
If you want to be updated with remarkable articles and information about Oracle Database Cloud,
Join our network, we will be please to have you there:
Joel Pérez: https://www.linkedin.com/in/sirdbaasjoelperez/
Skant Gupta: www.linkedin.com/in/skantali/
We invite you to read the following part of this article:
Oracle Cloud (DBaaS): Switchover, Failover & Reinstate Operations on Oracle Data Guard using DBCS Console
And as a Cloud Topic related you can read here one of our hotest articles:
#10 Oracle 18c: “Oracle 18c and its impact on DBAs”
Author Bios:
Joel Pérez is an Expert DBA ( Oracle ACE Director, Maximum Availability OCM, OCM Cloud Admin. & OCM12c/11g ) with over 17 years of Real World Experience in Oracle Technology, specialised in design and implement solutions of: High Availability, Disaster Recovery, Upgrades, Replication, Cloud and all area related to Oracle Databases. International consultant with duties, conferences & activities in more than 50 countries and countless clients around the world. Habitual and one of leading writers of Technical Oracle articles for: OTN Spanish, Portuguese, English and more. Regular Speaker in worldwide Oracle events like: OTN LAD (Latin America), OTN MENA (Middle East & Africa), OTN APAC ( Asian Pacific), DTCC China, Oracle Code.. . Joel has always been known for being a pioneer in Oracle technology since the early days of his career being the first Latin American awarded as “OTN Expert” at year 2003 by Oracle Corp., one of the first “Oracle ACE” globally in the Oracle ACE Program at year 2004. He was honoured as one of the first “OCM Database Cloud Administrator” & Maximum Availability OCM in the world. Currently Joel works as Senior Cloud Database Architect in “Yunhe Enmo (Beijing) Technology Co.,Ltd”., company located in Beijing, China En.enmotech.com
Skant Gupta is an Oracle Certified Cloud Professional in Oracle Database 12c, an Oracle Certified Expert in Oracle Real Application Clusters (Oracle RAC) in Oracle Database 11g and 12c, and an Oracle Exadata Certified and an Oracle Certified Professional in Oracle Database 10g, 11g, and 12c. He works at Vodafone Technology in the UK and formerly worked as a senior DBA at Etisalat in Dubai. He has six years of experience with various Oracle technologies, focusing mainly on Cloud, database, and high availability solutions, Oracle WebLogic Suite, Oracle Exadata and Oracle GoldenGate. He has presented at several Oracle user groups worldwide, most recently in the US, the United Arab Emirates, and the India. Skant website link: oracle-help.com
This article is brought by Yunhe Enmo (Beijing) Technology Co.,LTD En.enmotech.com
Follow our Company in Linkedin: https://www.linkedin.com/company/1856106/
About the author