On Premise -> Oracle Cloud (DBaaS)

On Premise -> Oracle Cloud (DBaaS)

1. Introduction

The purpose of this Deployment guide is to demonstrate the way in which Dbvisit Standby 8.0 software can be used within the Oracle Database As A Service (DBaaS) space. In this guide, we focus on the Primary being 'on-premise' and the Standby database hosted on DBaaS.  In another document, we focus on both Primary and Standby Databases hosted on 'DBaaS'.  This document can be found here

 

The setup will be from Single Instance Primary Databases to Single Instance Standby Databases with Datafiles stored on standard filesystems. However the options for configuring Dbvisit Standby in the Oracle Cloud are in no way limited to this, it has simply been chosen for demonstration purposes.

2. Initial Setup and Configuration

2.1 Provisioning the Servers 

Connect to Oracle Cloud Dashboard and provision an 11.2.0.4 Database Service.

We opted for "Oracle Database Cloud Service" for Service level and have a pre-created database on the host. It was deemed faster to drop the database on the host rather than choose the "Oracle Database Cloud Service - Virtual Image" as this does not come with binaries installed as indicated.

 

I generated a private and public set of key files using ssh-keygen from my local Linux machine.

oracle@dbvlab01[/home/oracle]: ssh-keygen -b 2048 -t rsa -f oraclecloud Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in oraclecloud. Your public key has been saved in oraclecloud.pub. The key fingerprint is: 35:6b:e6:39:cd:06:c0:04:d9:7e:73:4d:85:80:33:ab oracle@dbvlab01.dbvisit.co.nz oracle@dbvlab01[/home/oracle]:

I could then import this file into the cloud setup.

For the purposes of the Demo, the Backup Destination is set to None.


I generated a private and public set of key files using ssh-keygen from my local Linux machine.

oracle@dbvlab01[/home/oracle]: ssh-keygen -b 2048 -t rsa -f oraclecloud Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in oraclecloud. Your public key has been saved in oraclecloud.pub. The key fingerprint is: 35:6b:e6:39:cd:06:c0:04:d9:7e:73:4d:85:80:33:ab oracle@dbvlab01.dbvisit.co.nz oracle@dbvlab01[/home/oracle]:

I could then import this file into the cloud setup in both cases. Confirm your setup and click "create" and after around 20mins the Service is available.

 

 

In order for Dbvisit Standby to communicate between the 2 hosts, and to enable access to the GUI frontend, 3 ports need to be made available.  These are 7890 (Dbvnet), 7891 (Dbvagent) and 4433 (dbvserver: GUI). To do this, navigate to the summary page and choose Access Rules from the menu. From here, click the "create rule" button and fill in the details.  The example below shows 1 rule per port range named dbvisit_ports.  It is also possible to create 1 rule per port and name them accordingly.

 

 

The Primary Host will be an Oracle VirtualBox, Virtual Machine running Oracle Linux v6

 

 

oracle@dbvlab01[/home/oracle]: uname -a Linux dbvlab01.dbvisit.co.nz 3.8.13-68.3.3.el6uek.x86_64 #2 SMP Tue Jun 23 23:43:15 PDT 2015 x86_64 x86_64 x86_64 GNU/Linux oracle@dbvlab01[/home/oracle]: ps -ef|grep -i pmon grid 3959 1 0 11:17 ? 00:00:02 asm_pmon_+ASM oracle 8732 1 0 19:13 ? 00:00:00 ora_pmon_SAM oracle@dbvlab01[/home/oracle]:

 

Here is a brief overview of the 2 servers involved.  

 

Primary Server (On-Premise) Details

Standby Server (Cloud) Details

Primary Server (On-Premise) Details

Standby Server (Cloud) Details

Name: dbvlab01

OCPUs: 1

OS: OEL6

Memory: 3G

Storage: 20G

Version: 11.2.0.4

Edition: Enterprise Edition

Database: SAM

Dbvisit Base: /usr/dbvisit

Standby Version: 8.0.12.19052

Name: dbvcloud03

OCPUs: 1

OS: OEL6

Memory: 7.5G

Storage: 144G

Version: 11.2.0.4

Edition: Enterprise Edition

Database: SAM

Dbvisit Base: /usr/dbvisit

Standby Version: 8.0.12.19052

2.2 Preparing the Servers 

Copy the Dbvisit Standby v8 software to dbvcloud03 and the local machine

 

Lorraines-MBP:Downloads landers$ scp -i oraclecloud dbvisit-standby8.0.12-el6.zip oracle@dbvcloud03:/home/oracle dbvisit-standby8.0.12-el6.zip 100% 70MB 456.5KB/s 02:38 Lorraines-MBP:Downloads landers$ scp dbvisit-standby8.0.12-el6.zip oracle@dbvlab01:/home/oracle dbvisit-standby8.0.12-el6.zip 100% 70MB 70.4MB/s 00:00

 

Prepare the $DBVISIT_BASE directory and ownership.

 

Lorraines-MBP:~ landers$ ssh -i /Users/landers/Downloads/oraclecloud opc@dbvcloud03 [opc@dbvcloud03 ~]$ sudo -s [root@dbvcloud03 opc]# mkdir /usr/dbvisit [root@dbvcloud03 opc]# chown oracle:oinstall /usr/dbvisit

Setup the VM to be available from the cloud host.

 

Configure the VirtualBox VM to be 'available' externally.

To do this, update the relevant network controller enabling it to gain it's IP address from the Router and then shut down the machine.

 

root@dbvlab01[/etc/sysconfig/network-scripts]: cat ifcfg-eth0 DEVICE=eth0 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=dhcp #IPADDR=10.0.2.51 NETMASK=255.255.255.0 GATEWAY=192.168.1.254 DNS1=8.8.8.8 DNS2=8.8.4.4 DOMAIN=dbvisit.co.nz DEFROUTE=yes

 

Update the VM network settings to have a "Bridged Adapter" rather than "NAT Network" and then restart the machine

 

 

Once the machine is available, check that it can access external IP addresses and add the IP of dbvcloud03 to the /etc/hosts file.

 

root@dbvlab01[/etc/sysconfig/network-scripts]: ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=60 time=29.1 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=60 time=25.2 ms root@dbvlab01[/etc/sysconfig/network-scripts]: vi /etc/hosts

 

The IP to enter into the Hosts file on dbvcloud03 is that of our office router. The actual entry is not displayed here for obvious reasons.

[root@dbvcloud03 opc]# vi /etc/hosts