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 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
...
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 Servers
Connect to Oracle Cloud Dashboard and provision an 11.2.0.4 Database Service.
...
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
...
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@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://<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
E.g.
|
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@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
Code Block |
---|
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
...
Applying Logs with the GUI
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
From the "lightning 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
...
Code Block |
---|
[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 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.
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
Code Block |
---|
[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? <Yes/No> [No]: Yes Are you sure? <Yes/No> [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
Code Block |
---|
[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.
...