RDS Custom for Oracle SE2
Configuring Dbvisit StandbyMP for Oracle SE on AWS Custom
Creating your Oracle database.
Navigate to RDS on the AWS console and then click on Create Database. The options below are shown. We use the standard create option for our purpose as we want to configure each step in this process. Choose Oracle
After choosing Oracle, this will navigate you to options of choosing Amazon RDS or Amazon RDS Custom, we choose Amazon RDS Custom and choose in edition choose Oracle Standard Edition Two. The next thing is to build a custom engine version of the latest Oracle release (We use version Oracle 19.19). We exactly followed the steps provided in the below link:
Preparing to create a CEV - Amazon Relational Database Service
We chose dev/test as template as the system are going to be used for non-production purpose.
Provide the name for the DB instance and also name for the admin user to login to the database. The credential has to be self managed as RDS Custom does not support credentials management.
The next step is to choose a instance configuration that is needed . For this I have chosen a db.m6i.large (2vCPU and 8GB RAM). This is a standard class machine.
once the instance type is chosen, the next is to ensure that sufficient storage is added to the instance. The IOPS and storage throughput can also be configured, but we left it to default.
The next step is to choose a VPC or create one and below screenshot explains the details of the VPC.
This is an important step to ensure that a public IPAddress is assigned so that any other resources outside can connect to the instance. Also ensure that the security group has only the necessary traffic that is needed for this instance. For example, we have configured ports 1521 for Oracle database connection and also ports 7890,5533 and 4433 for Dbvisit standby configuration.
Â
Â
Important: Implement Script for Pausing Automation for Scheduled Maintenance and Switchovers . This step is important when restarting database and also ensuring paused automation before running graceful switchover. Below is an example script to pause automation for some time.
./pause-automation-rds-oracle-custom.sh -n <instance name> -t <minutes>
Example:
$./pause-automation-rds-oracle-custom.sh -n test02 -t 840
#!/bin/sh
helpFunction()
{
echo ""
echo "Usage: $0 -n instanceName"
echo "\t-n Name of the db-istance"
echo "\t-t Pause time in minutes"
# exit 1 # Exit script after printing help
}
while getopts "n:t:" opt
do
case "$opt" in
n ) instanceName="$OPTARG" ;;
t ) pauseTime="$OPTARG" ;;
? ) helpFunction; exit 0 ;; # Print helpFunction in case parameter is non-existent
esac
done
# Print helpFunction in case parameters are empty
if [ -z "$instanceName" ]
then
echo "-n is a mandatory parameter";
helpFunction
exit 1
fi
if [ -z "$pauseTime" ]
then
pauseTime="30"
fi
commandOutput=" "
aws rds modify-db-instance \
--db-instance-identifier $instanceName \
--automation-mode all-paused \
--resume-full-automation-mode-minutes $pauseTime >$commandOutput
echo $commandOutput
After the instance is created below is the instance connected directly from aws console using session manager from the AWS EC2 page.
Installing the Dbvisit StandbyMP Agent Manager and Control Center
Pause the automation on the second server. Drop the database.
Install the agentmanager on the primary and also agentmanager and control center on the standby. For detailed installation documentation click here.
Primary:
bash-4.2$ ps -ef |grep dbv
rdsdb 6017 23277 0 Aug09 ? 00:00:16 /rdsdbdata/dbvisit/standbymp/bin/dbvhelper -agentManagerId 3oychmd4s3l5 -directorId 3rxxfok6zctlm -hostAddress ip-10-0-10-76.ap-southeast-2.compute.internal -natsAddress ip-10-0-9-20.ap-southeast-2.compute.internal -natsPort 5533 -configurationType Oracle -helperProcessKey oracle:3oychmd4s3l5
rdsdb 8683 6017 0 Aug10 ? 00:02:26 /rdsdbdata/dbvisit/standbymp/oracle/dbvctl -d RDSCDB -D run --mode GUI
rdsdb 23277 1 0 Aug09 ? 00:00:20 /rdsdbdata/dbvisit/standbymp/bin/dbvagentmanager service run
rdsdb 28903 20764 0 05:44 pts/0 00:00:00 grep --color=auto dbv
rdsdb 32391 6017 0 04:53 ? 00:00:01 /rdsdbdata/dbvisit/standbymp/oracle/dbvctl -d RDSCDB --listener start --mode GUI
Standby:
Access the GUI directly from the public IPAddress of the standby server.
Before creating the standby below init parameters were reset as these parameters belong to Enterprise edition and not standard edition. I also removed these parameters on the primary as well.
Also, for primary change the archivelog destination from log_archive_dest_1 to db_recovery_file_dest .
Create the standby database from the StandbyMP control center. For detailed create standby database documentation click here
Performing a Test Graceful Switchover.
Before running graceful switchover, the automation has to be paused on both primary and standby for required time. The automation must be paused to ensure that the databases are not restarted automatically by AWS when performing switchover.
Pause the automation to avoid automatic database restart
Â