Voiced by Amazon Polly |
Overview
This blog continues my First Blog, Multi-AZ DR Testing for Oracle RDS using Oracle Application Express – Part 1. Earlier, we installed Multi AZ Oracle RDS with the Multi-AZ option and configured the perquisites for Oracle Apex Application. In this part, we will install the Oracle Apex application and test the Failover Mechanism.
Pioneers in Cloud Consulting & Migration Services
- Reduced infrastructural costs
- Accelerated application deployment
Step-by-Step Guide
In this section, we will Install and configure Apex and ORDS, then test the Multi-AZ Failover of AWS Oracle RDS.
Installing APEX and ORDS
Step 1: Download Oracle Apex
- Go to the Oracle Apex page and Download apex using the command,
1 |
wget https://download.oracle.com/otn_software/apex/apex_22.2_en.zip |
- Please execute the below commands to install and configure ORDS for use with Oracle APEX
1 2 |
mkdir /home/apexuser/ORDS cd /home/apexuser/ORDS |
- Download Oracle REST data services,
1 2 |
wget https://download.oracle.com/otn_software/java/ords/ords-21.4.0.348.1956.zip unzip ords-21.4.0.348.1956.zip |
Step 2: Download and Install ORDS
- Download and install ORDS schema using the ords.war file.
1 |
java -jar ords.war install advanced |
- Please provide the location to store configuration data: /home/apexuser/ORDS
- Enter the database connection type,Enter a value for [1]. Basic [2] TNS [3] Personalised URL [1]: 1Enter the database server name [localhost] here: drdbinstance1.cwtekktkfr7s.us-east-1.rds.amazonaws.comEnter [1521] as the database listen port: 1521Enter 1 for the database service name or 2 for the database SID [1]: 2
Enter 1 to verify/install the Oracle REST Data Services schema or 2 to skip this step.
Enter the ORDS_PUBLIC_USER database password:
Password confirmation:
ADMIN is the administrator’s username.
- Set a password for the APEX admin To do this, use SQL*Plus to connect to your DB instance as the master user, and then run the following commands.
1 2 3 |
EXEC rdsadmin.rdsadmin_util.grant_apex_admin_role; grant APEX_ADMINISTRATOR_ROLE to ADMIN; @/home/apexuser/apex/apxchpwd.sql |
Step 3: Start ORDS Listener
- Start the ORDS listener. Run the following code.
- Enter the following URL in your browser,
1 |
ip:8080/ords |
Our application is ready. Now we need to do FIS Test.
Step 4: Forced Failover Using FIS Test
- Go to FIS Console and select Create Experiment template
- Provide Description and Name
- Click on Add target and put some Name,
- Choose Resource type as aws:rds:db
- Then select the RDS as the Resource ID
- Now click on Actions.
- Provide some name
- Select action type as aws:rds:failover-db-instances
- Then click on save
- Create experiment template
- Please go to the browser and put ip:8080/ords
- Keep the session alive by refreshing the page.
- Go to FIS Console, select our experiment template, and click Start Experiment.
Conclusion
FIS Test started, and Primary RDS started to reboot and failover to the secondary db.
The connection got freeze for 60 seconds during the failover time.
Making IT Networks Enterprise-ready – Cloud Management Services
- Accelerated cloud migration
- End-to-end view of the cloud environment
About CloudThat
CloudThat is an official AWS (Amazon Web Services) Advanced Consulting Partner and Training partner and Microsoft Gold Partner, helping people develop knowledge of the cloud and help their businesses aim for higher goals using best-in-industry cloud computing practices and expertise. We are on a mission to build a robust cloud computing ecosystem by disseminating knowledge on technological intricacies within the cloud space. Our blogs, webinars, case studies, and white papers enable all the stakeholders in the cloud computing sphere.
Drop a query if you have any questions regarding Amazon RDS, I will get back to you quickly.
To get started, go through our Consultancy page and Managed Services Package, CloudThat’s offerings.
FAQs
1. Can I start a "forced failover" for deploying Multi-AZ DB instances?
ANS: – Amazon RDS will automatically failover without user intervention in several failure scenarios. Also, Amazon RDS allows you to start a failover when restarting your instance. You can utilize this feature using the RebootDBInstance API call or the AWS Management Console.
2. My Primary Instance is now situated in a separate Availability Zone from my other AWS resources (such as EC2 instances) because of the failover. Do I need to worry about latency?
ANS: – Availability Zones are meant to communicate with other Availability Zones in the same Region as quickly as possible. You may also want to consider architecting your application and other AWS resources with redundancy across different Availability Zones to make your application resilient in an Availability Zone failure. Multi-AZ deployments meet this database tier requirement without your management involvement.
3. How do automated backups and DB snapshots work with my Multi-AZ deployment?
ANS: – You engage with automated backup, and DB Snapshot features in the same way whether you are using a standard deployment in a Single-AZ or Multi-AZ deployment. In a Multi-AZ configuration, automated backups and DB Snapshots are taken from the standby to avoid I/O interruption on the main. Please remember that Single-AZ and Multi-AZ deployments may cause higher I/O latency, typically lasting a few minutes. A restore operation (point-in-time restore or restore from DB Snapshot) is also available in ordinary Single-AZ deployments. To deploy new DB instances, utilize the RestoreDBInstanceFromSnapshot or RestoreDBInstanceToPointInTime APIs. These new DB instance deployments can be either standard or Multi-AZ, regardless of whether the source backup was begun on a standard or Multi-AZ deployment.
WRITTEN BY Deepak Surendran
Click to Comment