Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

AWS RDS Custom for Oracle now supports Oracle SE2. Details of this can be found here. In this article, we will look at the step-by-step process for configuring RDS Custom for Oracle SE2.

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

rds01.png

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:

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.preparing.html

We chose dev/test as template as the system are going to be used for non-production purpose.

rds02.png

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.

rds03.png

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.

rds04.png

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.

rds05.png

The next step is to choose a VPC or create one and below screenshot explains the details of the VPC.

rds06a.pngVPC_cus1.png

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.

rds06b.png

rds07.png

The below is an important step. Ensure that the automation is paused for any scheduled maintenance . 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
rds08.png

After the instance is created below is the instance connected directly from aws console using session manager from the AWS EC2 page.

session_manager.png

Next step is to do the following:

  1. Pause the automation on the second server. Drop the database.

  2. Install the agentmanager on the primary and also agentmanager and control center on the standby.

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:

[ssm-user@ip-10-0-9-20 bin]$ ps -ef |grep dbv
rdsdb      825     1  0 Aug09 ?        00:00:38 /rdsdbdata/dbvisit/standbymp/bin/dbvagentmanager service run
rdsdb     1154     1  0 Aug09 ?        00:01:03 /rdsdbdata/dbvisit/standbymp/bin/dbvcontrol service run
rdsdb     8604   825  0 Aug09 ?        00:00:17 /rdsdbdata/dbvisit/standbymp/bin/dbvhelper -agentManagerId nm6clvbv4psa -directorId 3rxxfok6zctlm -hostAddress ip-10-0-9-20.ap-southeast-2.compute.internal -natsAddress ip-10-0-9-20.ap-southeast-2.compute.internal -natsPort 5533 -configurationType Oracle -helperProcessKey oracle:nm6clvbv4psa
ssm-user 10471  8101  0 05:45 pts/0    00:00:00 grep --color=auto dbv
rdsdb    27450  8604  0 05:32 ?        00:00:01 /rdsdbdata/dbvisit/standbymp/oracle/dbvctl                                -d RDSCDB --listener start --mode GUI
[ssm-user@ip-10-0-9-20 bin]$

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.

db_block_checking
dg_broker_config_file1
dg_broker_config_file2

Also, for primary change the archivelog destination from log_archive_dest_1 to db_recovery_file_dest .

The DR database creation completed successfully.

CSD1.png

Before running graceful switchover, the automation has to be paused on both primary and standby for required time.

GS_RDS.png

  • No labels