Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

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 both the Primary and Standby databases hosted on DBaaS.  In another document, we focus on 'On-Premise Primary' to Standby hosts on 'DBaaS'. A link that document can be found here

...

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

Connect to Oracle Cloud Dashboard 

...

Primary Server DetailsStandby Server Details

Name: dbvcloud01

OCPUs: 1

OS: OEL6

Memory: 7.5G

Storage: 150G

Version: 12.1.0.2

Edition: Standard Edition

Database: ORCL

Dbvisit Base: /usr/dbvisit

Standby Version: 8.0.12.19052

Name: dbvcloud02

OCPUs: 1

OS: OEL6

Memory: 7.5G

Storage: 150G

Version: 12.1.0.2

Edition: Standard Edition

Database: ORCL

Dbvisit Base: /usr/dbvisit

Standby Version: 8.0.12.19052

2.2 Preparing the Servers 

Connect to each of the cloud hosts with ssh, specifying the public key uploaded when creating the service, as user opc

...

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. 

...

Code Block
[oracle@dbvcloud02 dbvagent]$ cd ../dbvserver/
[oracle@dbvcloud02 dbvserver]$ ./dbvserver -d start
[oracle@dbvcloud02 dbvserver]$ ps -ef|grep -i dbv
oracle    6423     1  0 02:24 ?        00:00:00 ./dbvnet -d start
oracle    6466     1  0 02:25 ?        00:00:00 ./dbvagent -d start
oracle    6588     1  0 02:25 ?        00:00:00 ./dbvserver -d start

3.2 Start the GUI and Create the DDC

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

...

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


3.3 Create the Standby Database


Info

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

Code Block
 dbvctl -d <ddc> -l [<new_license_key>] [--force]

E.g.

Code Block
[oracle@dbvcloud01 ~]$ cd /usr/dbvisit/standby/
[oracle@dbvcloud01 standby]$ ./dbvctl -d ORCL -l 4do6z-8fuai-u09m6-sjjni-eg3mm-2cuy1-k6lic
=============================================================
Dbvisit Standby Database Technology (8.0.12.19052) (pid 15705)
dbvctl started on dbvcloud01: Thu May 25 00:03:50 2017
=============================================================

=>Update with license key: 4do6z-8fuai-u09m6-sjjni-eg3mm-2cuy1-k6lic? <Yes/No> [Yes]: Yes
>>> Dbvisit Standby License
License Key     : 4do6z-8fuai-u09m6-sjjni-eg3mm-2cuy1-k6lic
customer_number : 1
dbname          :
expiry_date     : 2017-06-24
product_id      : 8
sequence        : 1
status          : VALID
updated         : YES

=============================================================
dbvctl ended on dbvcloud01: Thu May 25 00:03:54 2017
=============================================================


3.3.1 Creating the Standby with the GUI

Choose the Create Standby Database Tab from the Home Screen.

...

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 the command line is shown below

Code Block
[oracle@dbvcloud01 standby]$ ./dbvctl -d ORCL --csd

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

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

=>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/No> [Yes]:

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

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

Is this correct? <Yes/No> [Yes]:

-------------------------------------------------------------------------------
A temporary location must be specified on dbvcloud02 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/No> [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/ORCL/adump
*              compatible                              12.1.0.2.0
*              control_file_record_keep_time           30
*              control_files                           /u02/app/oracle/oradata/ORCL/control01.ctl,/u03/app/oracle/fast_recovery_area/ORCL/control02.ctl
*              db_block_size                           8192
*              db_create_file_dest                     /u02/app/oracle/oradata
*              db_domain                               nzdbvisit.oraclecloud.internal
*              db_files                                250
*              db_name                                 ORCL
*              db_recovery_file_dest                   /u03/app/oracle/fast_recovery_area
*              db_recovery_file_dest_size              6442450944
*              db_unique_name                          ORCLSTBY
*              diagnostic_dest                         /u01/app/oracle
*              dispatchers                             (PROTOCOL=TCP) (SERVICE=ORCL.nzdbvisit.oraclecloud.internalXDB)
*              enable_pluggable_database               true
*              encrypt_new_tablespaces                 CLOUD_ONLY
*              filesystemio_options                    setall
*              log_archive_dest_1                      LOCATION=USE_DB_RECOVERY_FILE_DEST REOPEN=60
*              log_buffer                              67108864
*              open_cursors                            300
*              pga_aggregate_target                    1837740480
*              processes                               300
*              remote_login_passwordfile               EXCLUSIVE
*              sec_protocol_error_trace_action         LOG
*              service_names                           ORCL.nzdbvisit.oraclecloud.internal
*              sga_target                              2756610720
*              spfile                                  OS default
*              sql92_security                          TRUE
*              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]: 1

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

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

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

Is this correct? <Yes/No> [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/No> [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 ORCL is 3.83GB

>>> Backing up primary database...

    Backing up datafile 1... done
    Backing up datafile 3... done
    Backing up datafile 4... done
    Backing up datafile 5... done
    Backing up datafile 6... done
    Backing up datafile 7... done
    Backing up datafile 8... done
    Backing up datafile 9... done

>>> Creating standby control file... done

>>> Transferring backup from dbvcloud01 to dbvcloud02...

    Transferring /usr/tmp/dbv_ORCL_csd_dbf_1_03s536va_1_1.rman... done
    Transferring /usr/tmp/dbv_ORCL_csd_dbf_3_05s53709_1_1.rman... done
    Transferring /usr/tmp/dbv_ORCL_csd_dbf_4_07s5371c_1_1.rman... done
    Transferring /usr/tmp/dbv_ORCL_csd_dbf_5_09s5371u_1_1.rman... done
    Transferring /usr/tmp/dbv_ORCL_csd_dbf_6_0bs5372j_1_1.rman... done
    Transferring /usr/tmp/dbv_ORCL_csd_dbf_7_0ds5372q_1_1.rman... done
    Transferring /usr/tmp/dbv_ORCL_csd_dbf_8_0fs5373p_1_1.rman... done
    Transferring /usr/tmp/dbv_ORCL_csd_dbf_9_0hs5374f_1_1.rman... done

>>> Restoring standby control files... done

>>> Starting standby database ORCLSTBY on dbvcloud02 mount... done

>>> Restoring datafiles on dbvcloud02...

    Restoring datafile 1... done
    Restoring datafile 3... done
    Restoring datafile 4... done
    Restoring datafile 5... done
    Restoring datafile 6... done
    Restoring datafile 7... done
    Restoring datafile 8... done
    Restoring datafile 9... done

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

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

>>> Completing standby database creation... done

>>> 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:20101
TRACE:20101_dbvctl_csd_ORCL_201705250017.trc
[oracle@dbvcloud01 standby]$


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.  

Using the GUI to Send logs to the Standby Site

3.4.1 Log Gap Report

Run a log gap report from the Primary Site

Code Block
[oracle@dbvcloud01 ~]$ cd /usr/dbvisit/standby/
[oracle@dbvcloud01 standby]$ ./dbvctl -d ORCL -i
=============================================================
Dbvisit Standby Database Technology (8.0.12.19052) (pid 12163)
dbvctl started on dbvcloud01: Thu May 25 03:06:47 2017
=============================================================

Dbvisit Standby log gap report for ORCL thread 1 at 201705250306:
-------------------------------------------------------------
Destination database on dbvcloud02 is at sequence: 7.
Source database on dbvcloud01 is at log sequence: 8.
Source database on dbvcloud01 is at archived log sequence: 7.
Dbvisit Standby last transfer log sequence: 7.
Dbvisit Standby last transfer at: 2017-05-25 03:04:29.

Archive log gap for ORCL:  0.
Transfer log gap for ORCL: 0.
Standby database time lag (DAYS-HH:MI:SS): +0:01:36.


=============================================================
dbvctl ended on dbvcloud01: Thu May 25 03:06:51 2017
=============================================================

Also from the GUI


3.4.2 Log Transfer

Apply Logs at the Standby Site

3.4.3 Daemon Status

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

...

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.

...

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

3.5.2 Graceful Switchover Icon

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

3.5.6 Verify the New Roles within each of the Databases

Verify the new database roles within the database

Code Block
[oracle@dbvcloud01 trace]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Thu Jun 1 00:38:14 2017

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


Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production

SQL> select name, database_role from v$database;

NAME	  DATABASE_ROLE
--------- ----------------
ORCL	  PHYSICAL STANDBY

[oracle@dbvcloud02 ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Thu Jun 1 00:37:58 2017

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


Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production

SQL> select name, database_role from v$database;

NAME	  DATABASE_ROLE
--------- ----------------
ORCL	  PRIMARY

SQL>


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.

...

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


Code Block
[oracle@dbvcloud01 trace]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Thu Jun 1 00:45:20 2017

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


Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production

SQL>  select name, database_role from v$database;

NAME	  DATABASE_ROLE
--------- ----------------
ORCL	  PRIMARY

SQL>

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.

...