Amazon AWS EC2 -> Amazon AWS EC2

1. Introduction

The purpose of this Deployment guide is to demonstrate the way in which Dbvisit Standby 8.0 software can be installed on an Amazon AWS EC2 instance. In this guide, we focus on both the Primary and Standby databases being in AWS.  In another document, we focus on 'On-Premise Primary' to Standby in AWS. A link that document can be found here

2. Initial Setup and Configuration

2.1 Provisioning the Severs

The primary server dbvaws01 has been provisioned in the equivalent section of the guide "On-Premise Primary" to AWS EC2.  This documentation will reference the same server. This section will focus on the provisioning of the 2nd server: dbvaws02 which will be launched from the snapshot taken of dbvaws01 after the Oracle environment had been prepared and the Dbvisit Standby binaries had been copied to the server.  The AMI ID is ami-cdcb5cb5

From the AMI menu select this AMI and click 'Launch'

For Step 2  "Choose an Instance Type": The allows you to select from a range of Amazon Instance Types.  The "learn more" link directs you to more information about the instance types and how they might suit your computing needs.  For the purpose of this guide only, we have chosen t2.small.

Step 3: Configure the Instance Details.  Here we choose the defaults,

Step 4 "Add Storage".  We also accept the defaults here as a 30GB disk is more than enough for the demo purposes.

Step 5 "Add Tags".  Create a Tag with Key = "Name" and Value = "dbvaws02"

Step 6 "Configure Security Group".  Here, we've chosen an existing security group with ports 22 (SSH), 4433 (dbvserver), 7890 (dbvnet) and 7891 (dbvagent) enabled within the INBOUND security rules.

The final step is to review and Launch the new instance making sure that if the 'Choose an existing key pair' option is selected that the .pem file is accessible by yourself.

I have access to the dbvAWS.pem file so I clicked the tick box and then proceeded with "Launch Instance"

Within a few minutes, the new instance is up and running.

A test connection can then be made to the new host using the dbvAWS key pair.

Summary Details of the 2 VMs  are as follows :

Primary Server DetailsStandby Server Details

Name: dbvaws01

Hosted: Amazon AWS EC2

vCPUs : 1

OS: Oracle Linux EL7

Memory : 2G

Storage : 30G


Edition: Enterprise Edition

Database : XE

Dbvisit Base: /usr/dbvisit/standby

Standby Version: 8.0.20

Name: dbvaws02

Hosted: Amazon AWS EC2

vCPUs : 1

OS: Oracle Linux EL7

Memory : 2G

Storage : 30G


Edition: Enterprise Edition

Database : XE

Dbvisit Base: /usr/dbvisit/standby

Standby Version: 8.0.20

2.2 Preparing the Servers: dbvaws01 and dbvaws02

The binaries were copied and the /usr/dbvisit directory was in place as part of the image, so we can proceed directly to the installation.  The server dbvaws01 will be reconfigured in this guide to be a primary server and server dbvaws02 will be configured to be the standby server with the GUI binaries installed.

3. Install, Configure and Run the Standby software

3.1 Installing and Configuring the Software

3.1.1 dbvaws01 (hostname : ip-172-31-13-235)

This server, dbvaws01, will be the primary server so install the core components.  Here is the link to the full installation guide. It is summarized below. Navigate to where the unpacked files are

Accept the defaults for the dbvnet configuration and choose ip-172-31-30-113 as the remote host.

Dbvnet Summary Configuration.

Dbvagent Summary configuration on the Standby Server

The summary information for this node :

The processes can be started on dbvaws01 (2 small batch scripts dbv_start/dbv_stop have been copied to the /home/oracle directory to quickly stop/start the processes)

3.1.2 dbvaws02 (hostname : ip-172-31-30-113)

This server will be configured to be the Standby Server. As both of these servers are launched within the same VPC and Security Group.  The hostnames ip-172-31-30-113 and ip-172-31-13-235 should be resolvable from each other without the need to update the local host's files.

With the processes started on the primary host, we can test this with a quick telnet on one of the dbvisit ports.

Now we can perform the standby server installation, choosing to install the core components plus the dbvserver.

Proceed with the defaults and choose ip-172-31-13-235 as the remote host.

Dbvnet Summary Configuration.

Dbagent Summary Configuration.

Core Component Summary

Once the core components are installed, continue with another install of the Dbvserver component.

Dbvserver Summary configuration.

The final summary should show all the components installed and at this stage, the installer can be exited.

The processes can be started on dbvaws02 (the same 2 small batch scripts dbv_start/dbv_stop have been copied to the /home/oracle directory, and modified to include the dbvserver component, to quickly stop/start the processes)

A quick test from the primary server shows the standby is available on the dbvisit ports

3.2 Start the GUI and Create the DDC

Download and install either Chrome or Firefox.
From within the browser navigate to the https://<dbvserver_host>:4433. In this case, the standby node. (The local host/laptop has been altered to include the IP address of dbvaws02)


  Click 'Advanced' and add the security exception to proceed to the login screen

Enter the default username/password of admin/admin and proceed to the first screen, manage hosts.

Enter each of the hosts in turn, specifying the passphrase used at creation time. 

Return to the Main Menu and then proceed on to creating the DDC

The creation of the DDC file is shown in the following steps.  

Firstly Create a directory for ARCHSOURCE and ARCHDEST parameters.  

The former is only required in the event of a Graceful switchover when the Primary becomes a Standby database.  In this example, the same location is created on each server.

To create a DDC from the GUI. Choose the Manage Configurations Tab

Create a New Configuration.  Fill out the relevant entries then click 'Submit'  Careful to select the correct value for ORACLE_HOME on the remote host if the installation location differs (here it doesn't as the machine was cloned with Oracle binaries installed).

In Standby version 8.0.20 it is possible to enter the license details during the DDC creation, this option was chosen during the creation of this DDC file.

The new configuration, 'XE' can be viewed and edited from the 'Manage Configurations' Tab.

3.3 Create the Standby Database

3.3.1 Creating the Standby with the GUI

Choose the Create Standby Database Tab from the Home Screen.

Select your configuration

Select New Database

Then check there is enough space in the Source and Dest temp locations before proceeding to Submit.

Click on the Create Standby Task to view the progress

The task has completed when a small green 'tick' appears on the task icon.

3.3.2 Creating the Standby with the CLI

To Create the Standby database with the command line is shown below

3.4 Performing Basic Tasks

Some examples of basic tasks are outlined below.  Please refer to the online documentation for more details on each command.  

3.4.1 Log Gap Report

Run a log gap report from the Primary Site

Also from the GUI

3.4.2 Log Transfer

Sending the logs from the Primary via the CLI

Apply Logs at the Standby Site via the GUI

3.4.3 Daemon Status

Start the Daemons for automatic send/apply from the GUI Database Actions Tab. 

The lightning bolt icon manages the daemon processes.

When started on both sites they Log gap managed automatically and if no natural log switches have occurred, the daemon will also signal a log switch to keep the standby LAG to the desired amount. More information regarding the daemon settings can be found here in Section 4

3.4.4 Starting Standby Database in Readonly Mode

From the Database Actions Tab choose the Database Icon.  This allows the user to perform database actions on each node.

Before the Standby Database can be opened in readonly mode, there must be a log gap of 0 between the 2 systems.

Select the Standby Host, review the current status and Select Start READ ONLY.

Now, the status is Read Only for the standby database.

To switch back again.  Choose Restart

Now the Standby is back in recovery mode and the logs can be applied as normal.

3.5 Performing Graceful Switchover

The following screenshots show a Graceful Switchover from one Cloud Standby to the other using the GUI.  A first pre-requisite is to ensure that the daemons started earlier are not running whilst the switchover is in progress.

3.5.1 Check the Status of the Daemons

If the daemons have been started in the previous step, they need to be stopped before performing a graceful switchover.

3.5.2 Graceful Switchover Icon GUI

3.5.3 Check Log Gap is Zero and Click Submit

3.5.4 Locate the Task on the Task Bar

3.5.5 Monitor the Activity

Verify the Switch of hosts in the Configurations tab.

3.5.6 Verify the New Roles within each of the Databases

Verify the new database roles within the database

3.6 Activate the Standby Database

It is possible to activate the Standby Database and make it become the new Primary.  This is also called failover to the standby database.

The assumption is that the original Primary site has been lost and needs to be rebuilt.  

From the Central Console/GUI Choose the "Activate Standby Database Command"

3.6.1 Choose the Activate Standby Database

3.6.2 Select the Configuration

3.6.3 Monitor the Task from The Task Bar

3.6.4 Verify the Status within the Database

3.6.5 Manage Configurations Tab Implications

Now the Manage Configurations Tab has the option to choose the hosts. This allows you to either accept the current configuration with the new Primary (old Standby site) or start again with the original Primary site and depends on the circumstances of the Activation.