We're here to help!

Dbvisit Standby On Premise Primary to Oracle Cloud (Standby DBaaS) Example Guide

Follow

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, is 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 a 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

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 shutdown 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


At this stage these servers are ready for the next stage of installing the software.

3. Install, Configure and Run the Standby software

3.1 Installing and Configuring the Software


Unzip, Untar and the run the dbvisit installer following the instructions in the dbvisit installation guide as the user oracle. 


https://dbvisit.atlassian.net/wiki/display/DS8QSG/Dbvisit+Standby+8.0+User+Guide


[oracle@dbvcloud03 ~]$ unzip dbvisit-standby8.0.12-el6.zip
Archive:  dbvisit-standby8.0.12-el6.zip
  inflating: dbvisit-standby8.0.12-el6.tar
[oracle@dbvcloud03 ~]$ tar -xvf dbvisit-standby8.0.12-el6.tar
[oracle@dbvcloud03 ~]$ cd dbvisit
[oracle@dbvcloud03 dbvisit]$ cd installer/
[oracle@dbvcloud03 installer]$ ls -lrt
total 2768
-rwxr-x--- 1 oracle oinstall 2833364 May 11 02:16 install-dbvisit
[oracle@dbvcloud03 installer]$ ./install-dbvisit


On the cloud node  dbvcloud03 the dbvserver (option 5) was also installed.  Alternatively a 3rd host could be configured for hosting the dbvserver.   Careful to ensure during the dbvnet configuration on each node that the correct hosts are specified for source and destination. The output from the installation on the cloud host is shown below for reference.


-----------------------------------------------------------
    Welcome to the Dbvisit software installer.
-----------------------------------------------------------

    It is recommended to make a backup of our current Dbvisit software
    location (Dbvisit Base location) for rollback purposes.

    Installer Directory /home/oracle/dbvisit

>>> Please specify the Dbvisit installation directory (Dbvisit Base).

    The various Dbvisit products and components - such as Dbvisit Standby,
    Dbvisit Dbvnet will be installed in the appropriate subdirectories of
    this path.

    Enter a custom value or press ENTER to accept default [/usr/dbvisit]:
     > /usr/dbvisit
    DBVISIT_BASE = /usr/dbvisit

    -----------------------------------------------------------
    Component      Installer Version   Installed Version
    -----------------------------------------------------------
    standby        8.0.12.19052        not installed
    dbvnet         2.0.12.19052        not installed
    dbvagent       2.0.12.19052        not installed
    dbvserver      2.0.12.19052        not installed

    -----------------------------------------------------------

    What action would you like to perform?
       1 - Install component(s)
       2 - Uninstall component(s)
       3 - Terminate

    Your choice: 1

    Which component do you want to install?
       1 - Core Components (Dbvisit Standby Cli, Dbvnet, Dbvagent)
       2 - Dbvisit Standby Core (Command Line Interface)
       3 - Dbvnet (Dbvisit Network Communication)
       4 - Dbvagent (Dbvisit Agent)
       5 - Dbvserver (Dbvisit Central Console)
       6 - Exit Installer

    Your choice: 1

-----------------------------------------------------------
    Summary of the Dbvisit STANDBY configuration
-----------------------------------------------------------
    DBVISIT_BASE /usr/dbvisit

    Press ENTER to continue

-----------------------------------------------------------
    About to configure DBVISIT DBVNET
-----------------------------------------------------------

>>> Please specify the Local host name to be used by Dbvnet on this server.

    Dbvnet will be listening on the local IP Address on this server which
    resolve to the host name specified here.
    If using a cluster or virtual IP make sure the host name or alias
    specified here resolve to the IP address local to where dbvnet is
    installed.

    Enter a custom value or press ENTER to accept default [dbvcloud03]:
     >

>>> Please specify the Local Dbvnet PORT to be used.

    Dbvnet will be listening on the specified port for incoming connections
    from remote dbvnet connections.  Please make sure that this port is not
    already in use or blocked by any firewall.  You may choose any value
    between 1024 and 65535, however the default of 7890 is recommended.

    Enter a custom value or press ENTER to accept default [7890]:
     >


>>> Please specify the Remote host name to be used by Dbvnet.

    By default Dbvnet will use this remote hostname for any remote
    connections.  Dbvnet must be installed and configured on the specified
    remote host. If using a cluster or virtual IP make sure the host name
    or alias specified here resolve to the IP address local to where dbvnet
    is installed.
    If you are unsure about the remote host name during installation, use
    the default value which will be the current local hostname.

    Enter a custom value or press ENTER to accept default [dbvlab01]:
     > dbvcloud01


>>> Please specify the Remote Dbvnet PORT to be used.

    Dbvnet will connect to the remote server on this specified port.
    On the remote host Dbvnet will be listening on the specified port for
    incoming connections. Please make sure that this port is not already in
    use or blocked by any firewall.  You may choose any value between 1024
    and 65535, however the default of 7890 is recommended.

    Enter a custom value or press ENTER to accept default [7890]:
     >


>>> Please specify the Dbvnet Passphrase to be used for secure connections.

    The passphrase provided must be the same in both the local and remote
    Dbvnet installations.  It is used to establish a secure (encrypted)
    Dbvnet connections

    Enter a custom value:
     > kiwi123

-----------------------------------------------------------
    Summary of the Dbvisit DBVNET configuration
-----------------------------------------------------------
    DBVISIT_BASE /usr/dbvisit
    DBVNET_LOCAL_HOST dbvcloud03
    DBVNET_LOCAL_PORT 7890
    DBVNET_REMOTE_HOST dbvlab01
    DBVNET_REMOTE_PORT 7890
    DBVNET_PASSPHRASE kiwi123

    Press ENTER to continue

-----------------------------------------------------------
    About to configure DBVISIT DBVAGENT
-----------------------------------------------------------


>>> Please specify the host name to be used for the Dbvisit Agent.

    The Dbvisit Agent (Dbvagent) will be listening on this local address.
    If you are using the Dbvserver (GUI) - connections from the GUI will be
    established to the Dbvisit Agent. The Dbvisit Agent address must be
    visible from the Dbvserver (GUI) installation.
    If using a cluster or virtual IP make sure the host name or alias
    specified here resolve to the IP address local to where dbvnet is
    installed.

    Enter a custom value or press ENTER to accept default [dbvcloud03]:
     >


>>> Please specify the listening PORT number for Dbvagent.

    The Dbvisit Agent (Dbvagent) will listening on the specified port for
    incoming requests from the GUI (Dbvserver).  Please make sure that this
    port is not already in use or blocked by any firewall.  You may choose
    any value between 1024 and 65535, however the default of 7891 is
    recommended.

    Enter a custom value or press ENTER to accept default [7891]:
     >


>>> Please specify passphrase for Dbvagent

    Each Dbvisit Agent must have a passpharse specified.  This passphrase
    does not have to match between all the servers.  It will be used to
    establish a secure connection between the GUI (Dbvserver) and the
    Dbvisit Agent.

    Enter a custom value:
     > kiwi123

-----------------------------------------------------------
    Summary of the Dbvisit DBVAGENT configuration
-----------------------------------------------------------
    DBVISIT_BASE /usr/dbvisit
    DBVAGENT_LOCAL_HOST dbvcloud03
    DBVAGENT_LOCAL_PORT 7891
    DBVAGENT_PASSPHRASE kiwi123

    Press ENTER to continue

-----------------------------------------------------------
    About to install Dbvisit STANDBY
-----------------------------------------------------------
    Component standby installed.

    Press ENTER to continue

-----------------------------------------------------------
    About to install Dbvisit DBVNET
-----------------------------------------------------------
    Component dbvnet installed.

    Press ENTER to continue

-----------------------------------------------------------
    About to install Dbvisit DBVAGENT
-----------------------------------------------------------
    Component dbvagent installed.

    Press ENTER to continue

    -----------------------------------------------------------
    Component      Installer Version   Installed Version
    -----------------------------------------------------------
    standby        8.0.12.19052        8.0.12.19052
    dbvnet         2.0.12.19052        2.0.12.19052
    dbvagent       2.0.12.19052        2.0.12.19052
    dbvserver      2.0.12.19052        not installed

    -----------------------------------------------------------

    What action would you like to perform?
       1 - Install component(s)
       2 - Uninstall component(s)
       3 - Terminate

    Your choice: 1

    Which component do you want to install?
       1 - Core Components (Dbvisit Standby Cli, Dbvnet, Dbvagent)
       2 - Dbvisit Standby Core (Command Line Interface)
       3 - Dbvnet (Dbvisit Network Communication)
       4 - Dbvagent (Dbvisit Agent)
       5 - Dbvserver (Dbvisit Central Console)
       6 - Exit Installer

    Your choice: 5

-----------------------------------------------------------
    About to configure DBVISIT DBVSERVER
-----------------------------------------------------------


>>> Please specify the host name to be used for Dbvserver


    The Dbvisit Web Server (Dbvserver) will be listening on this local
    address. If using a cluster or virtual IP make sure the host name or
    alias specified here resolve to the IP address local to where Dbvserver
    is installed.
    If you are unsure about the remote host name during installation, use
    the default value which will be the current local hostname.

    Enter a custom value or press ENTER to accept default [dbvcloud02]:
     >


>>> Please specify the listening port number for Dbvserver on the local server

    You may choose any value between 1024 and 65535.  The default recommended
    value is 4433.

    Note: if you can not access this port after the installation has
    finished, then please double-check your server firewall settings
    to ensure the selected port is open.
    Enter a custom value or press ENTER to accept default [4433]:
     >

-----------------------------------------------------------
    Summary of the Dbvisit DBVSERVER configuration
-----------------------------------------------------------
    DBVISIT_BASE /usr/dbvisit
    DBVSERVER_LOCAL_HOST dbvcloud03
    DBVSERVER_LOCAL_PORT 4433

    Press ENTER to continue

-----------------------------------------------------------
    About to install Dbvisit DBVSERVER
-----------------------------------------------------------
    Component dbvserver installed.

    Press ENTER to continue

    -----------------------------------------------------------
    Component      Installer Version   Installed Version
    -----------------------------------------------------------
    standby        8.0.12.19052        8.0.12.19052
    dbvnet         2.0.12.19052        2.0.12.19052
    dbvagent       2.0.12.19052        2.0.12.19052
    dbvserver      2.0.12.19052        2.0.12.19052

    -----------------------------------------------------------

    What action would you like to perform?
       1 - Install component(s)
       2 - Uninstall component(s)
       3 - Terminate

    Your choice: 3

>>> Installation completed
    Install log /tmp/dbvisit_install.log.201706200938.


Once the software has been installed on both nodes.  Start the processes.

[oracle@dbvlab01 installer]$ cd /usr/dbvisit/dbvnet
[oracle@dbvlab01 dbvnet]$ ./dbvnet -d start
[oracle@dbvlab01 dbvnet]$ cd ../dbvagent/
[oracle@dbvlab01 dbvagent]$ ./dbvagent -d start
[oracle@dbvlab01 dbvagent]$ ps -ef|grep -i dbv
oracle    9372     1  0 20:34 ?        00:00:00 ./dbvnet -d start
oracle    9379     1  0 20:34 ?        00:00:00 ./dbvagent -d start

Additionally on the standby node, start the dbvserver process

[oracle@dbvcloud03 dbvagent]$ cd ../dbvserver/
[oracle@dbvcloud03 dbvserver]$ ./dbvserver -d start
[oracle@dbvcloud03 dbvserver]$ ps -ef|grep -i dbv
oracle   30354     1  0 09:44 ?        00:00:00 ./dbvnet -d start
oracle   30374     1  0 09:44 ?        00:00:00 ./dbvserver -d start
oracle   30549     1  0 09:45 ?        00:00:00 ./dbvagent -d start

3.2 Start the GUI and Create the DDC


Start a web browser and navigate to the https://:4433. In this case, the standby node.




Add an exception and proceed.



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.

[oracle@dbvcloud03 ~]$ mkdir /u01/app/oracle/dbvisit_arch


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



Create a New Configuration.  Fill out the relevant entries (as shown in the example below) the click 'Submit'


3.3 Create the Standby Database


Before Creating the Standby Database you must apply the v8 license.

This can be done either via the GUI, by pasting the key into the boxes and choosing 'license dbvisit'


Or on the command line

 dbvctl -d  -l [] [--force]

E.g.

oracle@dbvlab01[/usr/dbvisit/standby]: ./dbvctl -d SAM -l 4jo6z-8aaai-u09b6-ijjns-sivgw-1tj9u-5mzlp
=============================================================
Dbvisit Standby Database Technology (8.0.12.19052) (pid 4935)
dbvctl started on dbvlab01: Wed Jun 21 10:25:15 2017
=============================================================

=>Update with license key: 4jo6z-8aaai-u09b6-ijjns-sivgw-1tj9u-5mzlp?  [Yes]:
>>> Dbvisit Standby License
License Key     : 4jo6z-8aaai-u09b6-ijjns-sivgw-1tj9u-5mzlp
customer_number : 1
dbname          :
expiry_date     : 2017-07-21
product_id      : 8
sequence        : 1
status          : VALID
updated         : YES

=============================================================
dbvctl ended on dbvlab01: Wed Jun 21 10:25:23 2017
=============================================================

oracle@dbvlab01[/usr/dbvisit/standby]:

3.3.1 Creating the Standby with the GUI

Choose the Create Standby Database Tab from the Home Screen.

Select your configuration, New Database edit the spfile parameters if required and then check there is enough space in the Source and Dest temp locations.


Be careful to check that the File Mappings are consistent with the directories on the Cloud host. By default Oracle uses /u01,  /u02, /u03 and /u04 filesystems


Check there is enough space in your chosen temp location before clicking submit.


Click Submit.  The progress can be monitored from the resulting icon in the status bar.


3.3.2 Creating the Standby with the CLI

To Create the Standby database with command line is shown below

oracle@dbvlab01[/usr/dbvisit/standby]: ./dbvctl -d SAM -l 4jo6z-8aaai-u09b6-ijjns-sivgw-1tj9u-5mzlp
=============================================================
Dbvisit Standby Database Technology (8.0.12.19052) (pid 4935)
dbvctl started on dbvlab01: Wed Jun 21 10:25:15 2017
=============================================================

=>Update with license key: 4jo6z-8aaai-u09b6-ijjns-sivgw-1tj9u-5mzlp?  [Yes]:
>>> Dbvisit Standby License
License Key     : 4jo6z-8aaai-u09b6-ijjns-sivgw-1tj9u-5mzlp
customer_number : 1
dbname          :
expiry_date     : 2017-07-21
product_id      : 8
sequence        : 1
status          : VALID
updated         : YES

=============================================================
dbvctl ended on dbvlab01: Wed Jun 21 10:25:23 2017
=============================================================

oracle@dbvlab01[/usr/dbvisit/standby]: cd /tmp
oracle@dbvlab01[/tmp]: ls -lrt
total 20
drwxr-xr-x  3 root   root     4096 Feb 10 04:34 par-root
drwx------  3 root   root     4096 Mar 30 10:06 par-726f6f74
drwxr-xr-x  5 oracle oinstall 4096 Jun 16 12:31 par-oracle
drwxr-xr-x 35 oracle oinstall 4096 Jun 21 10:23 pdk-oracle
drwxr-xr-x  2 oracle oinstall 4096 Jun 21 10:32 hsperfdata_oracle
oracle@dbvlab01[/tmp]:
oracle@dbvlab01[/tmp]:
oracle@dbvlab01[/tmp]:
oracle@dbvlab01[/tmp]: cd
oracle@dbvlab01[/home/oracle]: cd /usr/dbvisit/standby/
oracle@dbvlab01[/usr/dbvisit/standby]:
oracle@dbvlab01[/usr/dbvisit/standby]:
oracle@dbvlab01[/usr/dbvisit/standby]:
oracle@dbvlab01[/usr/dbvisit/standby]:
oracle@dbvlab01[/usr/dbvisit/standby]:
oracle@dbvlab01[/usr/dbvisit/standby]:
oracle@dbvlab01[/usr/dbvisit/standby]: ./dbvctl -d SAM --csd

>>> Running pre-checks please wait... done
What would you like to do:
   1 - Create standby database (and optionally save settings in template)
   2 - Create standby database using existing template (previously saved)
   3 - Help
   4 - Terminate processing
   Please enter your choice [1]:

-------------------------------------------------------------------------------
Answer Yes to transfer the datafiles directly to the standby server (not
recommended for large database or slow networks)
Note tablespaces will be placed in backup mode for direct copy.
Answer No (recommended) to create an RMAN backup of primary datafiles in a
temporary location and transfer the backup to the standby server

=>Do you want to copy database files directly to the standby server? [N]:
Your input: N

Is this correct?  [Yes]:

-------------------------------------------------------------------------------

=>Do you want to use TRANSPORTABLE MEDIA to transfer the database backup to the
standby server? Transportable media is an external device such as a USB drive
that is first plugged into the primary server and then manually transferred to
the standby site and plugged into the standby server to continue the process.
It can be used for large databases or slow networks.
Specifying No means the network will be used to transfer the database backup.
[N]:
Your input: N

Is this correct?  [Yes]:

-------------------------------------------------------------------------------
A temporary location must be specified on dbvlab01 where the database will be
backed up to first.
This location must be big enough to hold RMAN backup of the whole database
(1.38GB).

=>Specify the location on this server: [/usr/tmp]:
Your input: /usr/tmp

Is this correct?  [Yes]:

-------------------------------------------------------------------------------
A temporary location must be specified on dbvcloud03 where the database backup
will be copied to before moving to specified locations.

=>Specify location on remote server: [/usr/tmp]:
Your input: /usr/tmp

Is this correct?  [Yes]:

The following oracle database parameters will be set in the standby database pfile or spfile:
-------------------------------------------------------------------------------
SID            NAME                                    VALUE

*              audit_file_dest                         /u01/app/oracle/admin/SAM/adump
*              compatible                              11.2.0.4.0
*              control_files                           /u01/app/oracle/oradata/SAM/control01.ctl,/u01/app/oracle/fast_recovery_area/SAM/control02.ctl
*              db_block_size                           8192
*              db_domain
*              db_name                                 SAM
*              db_recovery_file_dest                   /u01/app/oracle/fast_recovery_area
*              db_recovery_file_dest_size              4007657472
*              db_unique_name                          SAM
*              diagnostic_dest                         /u01/app/oracle
*              dispatchers                             (PROTOCOL=TCP) (SERVICE=SAMXDB)
*              log_archive_format                      %t_%s_%r.arc
*              open_cursors                            300
*              pga_aggregate_target                    268435456
*              processes                               150
*              remote_login_passwordfile               EXCLUSIVE
*              sga_target                              805306368
*              spfile                                  OS default
*              undo_tablespace                         UNDOTBS1

-------------------------------------------------------------------------------
What would you like to do:
   1 - Proceed with creating the standby database
   2 - Edit oracle database parameters for the standby database pfile/spfile
   3 - Terminate processing
   Please enter your choice [1]: 2

WARNING: Do NOT use single or double quotes to enclose parameter values!
Separate multiple values with a comma. If a comma is part of a value, escape it
with a backslash.
If a comma is part of a value, escape it with a backslash.

=>Enter full parameter name: []: control_files
Leave blank to create Oracle Managed Control File(s) if creating of OMF files
is enabled
   1 - Remove from the standby parameter file
       (parameter will be set to default value)
   2 - New value in the standby parameter file

=>Please enter your choice: []: 2

=>Enter new value (leave blank to set to null) []: /u01/app/oracle/oradata/SAM/control01.ctl,/u03/app/oracle/fast_recovery_area/SAM/control02.ctl
Validating ... please wait

The following oracle database parameters will be set in the standby database pfile or spfile:
-------------------------------------------------------------------------------
SID            NAME                                    VALUE

*              audit_file_dest                         /u01/app/oracle/admin/SAM/adump
*              compatible                              11.2.0.4.0
*              control_files                           /u01/app/oracle/oradata/SAM/control01.ctl,/u03/app/oracle/fast_recovery_area/SAM/control02.ctl
*              db_block_size                           8192
*              db_domain
*              db_name                                 SAM
*              db_recovery_file_dest                   /u01/app/oracle/fast_recovery_area
*              db_recovery_file_dest_size              4007657472
*              db_unique_name                          SAM
*              diagnostic_dest                         /u01/app/oracle
*              dispatchers                             (PROTOCOL=TCP) (SERVICE=SAMXDB)
*              log_archive_format                      %t_%s_%r.arc
*              open_cursors                            300
*              pga_aggregate_target                    268435456
*              processes                               150
*              remote_login_passwordfile               EXCLUSIVE
*              sga_target                              805306368
*              spfile                                  OS default
*              undo_tablespace                         UNDOTBS1

-------------------------------------------------------------------------------
What would you like to do:
   1 - Proceed with creating the standby database
   2 - Edit oracle database parameters for the standby database pfile/spfile
   3 - Terminate processing
   Please enter your choice [1]: 2

WARNING: Do NOT use single or double quotes to enclose parameter values!
Separate multiple values with a comma. If a comma is part of a value, escape it
with a backslash.
If a comma is part of a value, escape it with a backslash.

=>Enter full parameter name: []: db_recovery_file_dest
   1 - Remove from the standby parameter file
       (parameter will be set to default value)
   2 - New value in the standby parameter file

=>Please enter your choice: []: 2

=>Enter new value (leave blank to set to null) []: /u03/app/oracle/fast_recovery_area
Validating ... please wait

The following oracle database parameters will be set in the standby database pfile or spfile:
-------------------------------------------------------------------------------
SID            NAME                                    VALUE

*              audit_file_dest                         /u01/app/oracle/admin/SAM/adump
*              compatible                              11.2.0.4.0
*              control_files                           /u01/app/oracle/oradata/SAM/control01.ctl,/u03/app/oracle/fast_recovery_area/SAM/control02.ctl
*              db_block_size                           8192
*              db_domain
*              db_name                                 SAM
*              db_recovery_file_dest                   /u03/app/oracle/fast_recovery_area
*              db_recovery_file_dest_size              4007657472
*              db_unique_name                          SAM
*              diagnostic_dest                         /u01/app/oracle
*              dispatchers                             (PROTOCOL=TCP) (SERVICE=SAMXDB)
*              log_archive_format                      %t_%s_%r.arc
*              open_cursors                            300
*              pga_aggregate_target                    268435456
*              processes                               150
*              remote_login_passwordfile               EXCLUSIVE
*              sga_target                              805306368
*              spfile                                  OS default
*              undo_tablespace                         UNDOTBS1

-------------------------------------------------------------------------------
What would you like to do:
   1 - Proceed with creating the standby database
   2 - Edit oracle database parameters for the standby database pfile/spfile
   3 - Terminate processing
   Please enter your choice [1]:

Validating oracle database parameters... please wait
=>SUCCEEDED

-------------------------------------------------------------------------------

=>Create standby database template for SAM using provided answers? [Y]: Y
Your input: 1

Is this correct?  [Yes]:

-------------------------------------------------------------------------------

=>Continue with creating a standby database? (If No processing will terminate,
the saved template will be available for future use) [Y]:
Your input: 1

Is this correct?  [Yes]:

>>> dbvctl will now run a pre-flight check for standby database creation. An attempt will
    be made to create a standby (s)pfile using oracle standby database parameters, followed
    by trying to start the standby instance. If this step fails, then please double-check
    the following items before re-running dbvctl again:

    1) Review the standby database parameters you have supplied and provide valid values
    unless a template is used.
    2) Recreate the template to provide valid values for standby database parameters if a
    template is used.

>>> Running pre-flight check for standby creation, please wait... done

>>> Total database size for SAM is 1.38GB

>>> Backing up primary database...

    Backing up datafile 1... done
    Backing up datafile 2... done
    Backing up datafile 3... done
    Backing up datafile 4... done

>>> Creating standby control file... done

>>> Transferring backup from dbvlab01 to dbvcloud03...

    Transferring /usr/tmp/dbv_SAM_csd_dbf_1_07s7bhj4_1_1.rman... done
    Transferring /usr/tmp/dbv_SAM_csd_dbf_1_08s7bhjt_1_1.rman... done
    Transferring /usr/tmp/dbv_SAM_csd_dbf_2_09s7bhjv_1_1.rman... done
    Transferring /usr/tmp/dbv_SAM_csd_dbf_3_0as7bhke_1_1.rman... done
    Transferring /usr/tmp/dbv_SAM_csd_dbf_4_0bs7bhkg_1_1.rman... done

>>> Restoring standby control files... done

>>> Starting standby database SAM on dbvcloud03 mount... done

>>> Restoring datafiles on dbvcloud03...

    Restoring datafile 1... done
    Restoring datafile 2... done
    Restoring datafile 3... done
    Restoring datafile 4... done

>>> Renaming standby redo logs and tempfiles on dbvcloud03... done

>>> Performing checkpoint and archiving logs... done

>>> Completing standby database creation...

>>> Standby database created.

To complete creating standby database please run dbvctl on the primary server first,
then on the standby server, to ensure the standby database is in sync with the primary
database.

PID:5693
TRACE:5693_dbvctl_csd_SAM_201706211045.trc


The /etc/oratab has also been updated to reflect the new standby database

[oracle@dbvcloud03 ~]$ cat /etc/oratab
# Next line added by Dbvisit Standby at Tue Jun 20 23:06:43 2017
SAM:/u01/app/oracle/product/11.2.0/dbhome_1:N


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

oracle@dbvlab01[/home/oracle]: cd /usr/dbvisit/standby/
oracle@dbvlab01[/usr/dbvisit/standby]: ./dbvctl -d SAM -i
=============================================================
Dbvisit Standby Database Technology (8.0.12.19052) (pid 6516)
dbvctl started on dbvlab01: Wed Jun 21 11:29:38 2017
=============================================================

Dbvisit Standby log gap report for SAM thread 1 at 201706211129:
-------------------------------------------------------------
Destination database on dbvcloud03 is at sequence: 123.
Source database on dbvlab01 is at log sequence: 127.
Source database on dbvlab01 is at archived log sequence: 126.
Dbvisit Standby last transfer log sequence: 126.
Dbvisit Standby last transfer at: 2017-06-21 11:20:36.

Archive log gap for SAM:  3.
Transfer log gap for SAM: 0.
Standby database time lag (DAYS-HH:MI:SS): -11:-27:45.


=============================================================
dbvctl ended on dbvlab01: Wed Jun 21 11:29:52 2017
=============================================================

oracle@dbvlab01[/usr/dbvisit/standby]:

Also from the GUI







3.4.2 Log Transfer

For the purposes of the Documentation we will use the CLI to Send logs to the Standby Site and then Apply them on the Standby site using the GUI

oracle@dbvlab01[/usr/dbvisit/standby]: ./dbvctl -d SAM
=============================================================
Dbvisit Standby Database Technology (8.0.12.19052) (pid 6584)
dbvctl started on dbvlab01: Wed Jun 21 11:35:53 2017
=============================================================

>>> Obtaining information from standby database (RUN_INSPECT=Y)... done
Note FORCE_LOGGING is disabled in the primary database.
    Performing a log switch...


>>> Transferring Log file(s) from SAM on dbvlab01 to dbvcloud03 for thread 1:

    thread 1 sequence 127 (o1_mf_1_127_dnmddq6q_.arc)

=============================================================
dbvctl ended on dbvlab01: Wed Jun 21 11:37:01 2017
=============================================================

oracle@dbvlab01[/usr/dbvisit/standby]:


Applying Logs with the GUI


3.4.3 Daemon Status

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

The lightening bolt icon manages the daemon processes as shown below.

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


https://dbvisit.atlassian.net/wiki/display/DS8QSG/Dbvisit+Standby+Scheduling

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 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

From the lightening bolt icon stop the running Daemons for each site.

3.5.2 Graceful Switchover Icon

Performing a graceful switchover reverses the roles of the Primary and Standby databases and in this instance the cloud server will host the primary database. This can be a temporary test or for a long as required by your business needs.

This task can be performed from either the GUI or the command line, here we demonstrate a Graceful Switchover from the GUI.

3.5.3 Check Log Gap is Zero and Click Submit

3.5.4 Locate the Task on the Task Bar and Monitor the Activity

3.5.5 Verify the New Roles within each of the Databases

Verify the new database roles within the database

oracle@dbvlab01[/usr/dbvisit/standby/trace]: sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 21 12:34:53 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name, database_role from v$database;

NAME	  DATABASE_ROLE
--------- ----------------
SAM		  PHYSICAL STANDBY

oracle@dbvcloud03 standby]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 21 00:42:30 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning and Real Application Testing options

SQL> select name, database_role from v$database;

NAME	  DATABASE_ROLE
--------- ----------------
SAM 	  PRIMARY

SQL>

Also note that the primary and standby hosts are reversed in the Configuration Tab:

Using the CLI we can reverse the operation as follows.

[oracle@dbvcloud03 standby]$ ./dbvctl -d SAM -o switchover
=============================================================
Dbvisit Standby Database Technology (8.0.12.19052) (pid 11238)
dbvctl started on dbvcloud03: Wed Jun 21 00:51:20 2017
=============================================================

>>> Starting Switchover between dbvcloud03 and dbvlab01

Running pre-checks       ... done
Pre processing           ... done
Processing primary       ... done
Processing standby       ... done
Converting standby       ... done
Converting primary       ... done
Completing               ... done
Synchronizing            ... done
Post processing          ... done

>>> Graceful switchover completed.
    Primary Database Server: dbvlab01
    Standby Database Server: dbvcloud03

>>> Dbvisit Standby can be run as per normal:
    dbvctl -d SAM


PID:11238
TRACE:11238_dbvctl_switchover_SAM_201706210051.trc

=============================================================
dbvctl ended on dbvcloud03: Wed Jun 21 00:55:25 2017
=============================================================

[oracle@dbvcloud03 standby]$

3.6 Activate the Standby Database

It is possible 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.  


3.6.1 Activate Standby Database from the Central Console/GUI


Select the Configuration and then click submit.  

Locate the Task and monitor it from the Task Bar.

3.6.2 Activate From the Command Line


[oracle@dbvcloud03 standby]$ ./dbvctl -d SAM -o activate
=============================================================
Dbvisit Standby Database Technology (8.0.12.19052) (pid 14588)
dbvctl started on dbvcloud03: Wed Jun 21 00:59:57 2017
=============================================================

Activating means this database will become a Primary Database.
It will no longer be a Standby Database for SAM on dbvlab01.
Activation cannot be reversed.
=>Activate Standby Database on dbvcloud03?  [No]: Yes
Are you sure?  [No]: Yes
>>> Activating now...

File /usr/dbvisit/standby/conf/dbv_SAM.env copied to /usr/dbvisit/standby/conf/dbv_SAM.env.201706210059.

>>> Activation complete. Please ensure a backup of this Database is made
>>> Old archives from before the activation should be removed to avoid mix-up between new
    and old archive logs


>>> Process complete

=============================================================
dbvctl ended on dbvcloud03: Wed Jun 21 01:02:09 2017
=============================================================

[oracle@dbvcloud03 standby]$


3.6.3 Verify the Status within the Database


[oracle@dbvcloud03 standby]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 21 01:08:09 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning and Real Application Testing options

SQL> select name, database_role from v$database;

NAME	  DATABASE_ROLE
--------- ----------------
SAM	  PRIMARY

SQL>

3.6.4 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.

Have more questions? Submit a request

Comments