By Mouhamadou Diaw

The new version of Dbvisit standby is now released. In this blog we are going to see how to install dbvisit 8 and how to create a standby database.
For the installation after downloading the software, just uncompress it and then run the install-dbvisit command under the installer directory. The installation process is divided in 2 parts.
1- Core Components (Dbvisit Standby Cli, Dbvnet, Dbvagent) –On both servers
2- Dbvserver console installation. Just note that the console now needs to be installed only on one server.

We will not show all outputs, more info for the installation can be found in my precedent blog about upgrading dbvisit 7 to dbvisit 8

[oracle@dbvisit1 installer]$ pwd
/home/oracle/dbvisit/dbvisit/dbvisit/installer
[oracle@dbvisit1 installer]$ ls
install-dbvisit
[oracle@dbvisit1 installer]$
[oracle@dbvisit1 installer]$ ./install-dbvisit
-----------------------------------------------------------
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/dbvisit/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]:
> /u01/app/dbvisit
DBVISIT_BASE = /u01/app/dbvisit
-----------------------------------------------------------
Component Installer Version Installed Version
-----------------------------------------------------------
standby 8.0.04.18184 not installed
dbvnet 2.0.04.18184 not installed
dbvagent 2.0.04.18184 not installed
dbvserver 2.0.04.18184 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

And then follow instructions.
At the end of the proceesus we can start the different components: the dbvagent and the dbvserver


[oracle@dbvisit1 installer]$ /u01/app/dbvisit/dbvagent/dbvagent -d start


[oracle@dbvisit1 installer]$ /u01/app/dbvisit/dbvnet/dbvnet -d start


[oracle@dbvisit1 installer]$ ps -ef|egrep 'dbvagent|dbvnet' | grep -v grep
oracle 4064 1 0 10:46 ? 00:00:00 /u01/app/dbvisit/dbvagent/dbvagent -d start
oracle 4140 1 0 10:47 ? 00:00:00 /u01/app/dbvisit/dbvnet/dbvnet -d start
[oracle@dbvisit1 installer]$

After core components installation, we can proceed with Dbvisit Standby Central console installation (dbvserver). Just launch again install-dbvisit command and follow instructions.

[oracle@dbvisit1 installer]$ ./install-dbvisit
-----------------------------------------------------------
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/dbvisit/dbvisit
.....
.....
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

At the end of the installation, We can now start dbserver

[oracle@dbvisit1 installer]$ /u01/app/dbvisit/dbvserver/dbvserver -d start


[root@dbvisit1 ~]# netstat -taupen | grep dbvser
tcp 0 0 0.0.0.0:4433 0.0.0.0:* LISTEN 1000 37848 5348/dbvserver
[root@dbvisit1 ~]#

We should be able to connect to dbvserver console on port 4433, with admin user. The default password is admin
dbvserverconsole1
dbvserverconsole2
For example using MANAGE USERS, we can change default admin password.
Now that dbvisit standby is installed on both server, the first thing is to test connectivity. For this we will use the command dbvctl which is the main command of dbvisit 8. In dbvisit documentation you can find The first command you need to be fimiliar with is the “dbvctl -h” command which will display the syntax and usage options for the Dbvisit Standby command line interface. and it’s really true. The command dbvctl -f system_readiness will be used.

[oracle@dbvisit1 installer]$ /u01/app/dbvisit/standby/dbvctl -f system_readiness
Please supply the following information to complete the test.
Default values are in [].
Enter Dbvisit Standby location on local server: [/u01/app/dbvisit]:
Your input: /u01/app/dbvisit
Is this correct? <Yes/No> [Yes]:
Enter the name of the remote server: []: dbvisit2
Your input: dbvisit2
Is this correct? <Yes/No> [Yes]:
Enter Dbvisit Standby location on remote server: [/u01/app/dbvisit]:
Your input: /u01/app/dbvisit
Is this correct? <Yes/No> [Yes]:
Enter the name of a file to transfer relative to local install directory
/u01/app/dbvisit: [standby/doc/README.txt]:
Your input: standby/doc/README.txt
Is this correct? <Yes/No> [Yes]:
Choose copy method:
1) /u01/app/dbvisit/dbvnet/dbvnet
2) /usr/bin/scp
Please enter choice [1] : 1
Is this correct? <Yes/No> [Yes]:
Enter port for method /u01/app/dbvisit/dbvnet/dbvnet: [7890]:
Your input: 7890
Is this correct? <Yes/No> [Yes]:
-------------------------------------------------------------
Testing the network connection between local server and remote server dbvisit2.
-------------------------------------------------------------
Settings
========
Remote server =dbvisit2
Dbvisit Standby location on local server =/u01/app/dbvisit
Dbvisit Standby location on remote server =/u01/app/dbvisit
Test file to copy =/u01/app/dbvisit/standby/doc/README.txt
Transfer method =/u01/app/dbvisit/dbvnet/dbvnet
port =7890
-------------------------------------------------------------
Checking network connection by copying file to remote server dbvisit2...
-------------------------------------------------------------
Trace file /u01/app/dbvisit/standby/trace/5589_dbvctl_system_readiness_201611291139.trc
File copied successfully. Network connection between local and dbvisit2
correctly configured.
[oracle@dbvisit1 installer]$

If everything is fine with the installation, now we can create a standby database using dbvctl. The configuration we use is the following:
Primary Server : dbvisit1
Standby Server: dbvisit2
Database Instance : DBPRIMA ( We suppose that database is in archive mode and in force logging mode )
First Let’s create Dbvisit Standby Database Configuration (DDC) file.The name of the DDC is generally the name of the database instance. The command dbvctl -o setup is used.

[oracle@dbvisit1 ~]$ /u01/app/dbvisit/standby/dbvctl -o setup
========================================================
Dbvisit Standby Database Technology (8.0.04.18184)
=========================================================
=>dbvctl only needs to be run on the primary server.
Is this the primary server? <Yes/No> [Yes]:
The following Dbvisit Database configuration (DDC) file(s) found on this
server:
DDC
===
1) Create New DDC
2) Cancel
Please enter choice [] : 1
Is this correct? <Yes/No> [Yes]:
END USER LICENSE AGREEMENT
PLEASE READ THIS END USER LICENSE AGREEMENT (AGREEMENT) CAREFULLY BEFORE
DOWNLOADING THE LICENSED PRODUCT. BY CLICKING I AGREE BELOW, YOU ARE
REPRESENTING THAT YOU HAVE THE RIGHT AND AUTHORITY TO LEGALLY BIND YOURSELF
…….
…….
of it on future occasions. Headings are for reference purposes only and
have no substantive effect.
Continue ? <Yes/No> [No]: yes
=========================================================
Dbvisit Standby setup begins.
=========================================================
The following Oracle instance(s) have been found on this server:
SID ORACLE_HOME
=== ===========
1) DBPRIMA /u01/app/oracle/product/12.1.0.2/dbhome_1
2) Enter own ORACLE_SID and ORACLE_HOME
Please enter choice [] : 1
Is this correct? <Yes/No> [Yes]:
=>ORACLE_SID will be: DBPRIMA
=>ORACLE_HOME will be: /u01/app/oracle/product/12.1.0.2/dbhome_1
------------------------------------------------------------------------------
Enter the primary server name.
Note: The hostname is case sensitive on UNIX based systems.
=>SOURCE is [dbvisit1]:
Your input: dbvisit1
Is this correct? <Yes/No> [Yes]:
Choice is dbvisit1
------------------------------------------------------------------------------
Please enter a filesystem directory that Dbvisit Standby use to store (archive) log files. This directory
is not the same as the database recovery area or archive destinations and should not be located in these
areas.
....
Please ensure that this directory exists on
=>ARCHSOURCE is [/u01/app/oracle/dbvisit_arch/DBPRIMA]: /u01/app/archivedbvisit/DBPRIMA
Is this correct? <Yes/No> [Yes]:
Choice is /u01/app/archivedbvisit/DBPRIMA
------------------------------------------------------------------------------
Do you want to use SSH to connect to the standby server? Note that if you are using SSH, passwordless SSH
authentication between the hosts must already be configured. By default Dbvnet will be used.
=>USE_SSH is [N]:
Your input: N
Is this correct? <Yes/No> [Yes]:
Choice is N
------------------------------------------------------------------------------
Enter the standby database hostname.
If the standby database will be Oracle RAC enabled:
Enter the the Virtual Hostname (linked to a Virtual IP) for standby database. This virtual hostname is
....
For non-RAC configurations specify the standby database server name here.
=>DESTINATION is []: dbvisit2
Your input: dbvisit2
Is this correct? <Yes/No> [Yes]:
Choice is dbvisit2
------------------------------------------------------------------------------
Specify the DBVNET or SSH port number on the standby server. The default value supplied is the dbvnet port
7890. If you specified the use of SSH, please specify the SSH port here.
=>NETPORT is [7890]:
Your input: 7890
Is this correct? <Yes/No> [Yes]:
Choice is 7890
------------------------------------------------------------------------------
Enter Dbvisit Standby installation directory on the standby server
=>DBVISIT_BASE_DR is [/u01/app/dbvisit]:
Your input: /u01/app/dbvisit
Is this correct? <Yes/No> [Yes]:
Choice is /u01/app/dbvisit
------------------------------------------------------------------------------
Enter ORACLE_HOME directory on the standby server
=>ORACLE_HOME_DR is [/u01/app/oracle/product/12.1.0.2/dbhome_1]:
Your input: /u01/app/oracle/product/12.1.0.2/dbhome_1
Is this correct? <Yes/No> [Yes]:
Choice is /u01/app/oracle/product/12.1.0.2/dbhome_1
------------------------------------------------------------------------------
Enter DB_UNIQUE_NAME on the standby server
=>DB_UNIQUE_NAME_DR is [DBPRIMA]:
Your input: DBPRIMA
Is this correct? <Yes/No> [Yes]:
Choice is DBPRIMA
------------------------------------------------------------------------------
Please enter the directory where Dbvisit Standby will transfer the (archive) log files to on standby
server.
...
Please ensure that this directory exists on the standby server
=>ARCHDEST is [/u01/app/archivedbvisit/DBPRIMA]:
Your input: /u01/app/archivedbvisit/DBPRIMA
Is this correct? <Yes/No> [Yes]:
Choice is /u01/app/archivedbvisit/DBPRIMA
------------------------------------------------------------------------------
Enter ORACLE_SID on the standby server
=>ORACLE_SID_DR is [DBPRIMA]:
Your input: DBPRIMA
Is this correct? <Yes/No> [Yes]:
Choice is DBPRIMA
------------------------------------------------------------------------------
Enter ASM instance name on the standby server, if your standby is using ASM. If you are not using ASM on
the standby leave the value blank.
=>ORACLE_SID_ASM_DR is []:
Is this correct? <Yes/No> [Yes]:
Choice is null
------------------------------------------------------------------------------
Please specify the name of the Dbvisit Database configuration (DDC) file.
The DDC file is a plain text file that contains all the Dbvisit Standby settings.
=>ENV_FILE is [DBPRIMA]:
Your input: DBPRIMA
Is this correct? <Yes/No> [Yes]:
Choice is DBPRIMA
------------------------------------------------------------------------------
Below are the list of configuration variables provided during the setup process:
Configuration Variable Value Provided
====================== ==============
ORACLE_SID DBPRIMA
ORACLE_HOME /u01/app/oracle/product/12.1.0.2/dbhome_1
SOURCE dbvisit1
ARCHSOURCE /u01/app/archivedbvisit/DBPRIMA
RAC_DR N
USE_SSH N
DESTINATION dbvisit2
NETPORT 7890
DBVISIT_BASE_DR /u01/app/dbvisit
ORACLE_HOME_DR /u01/app/oracle/product/12.1.0.2/dbhome_1
DB_UNIQUE_NAME_DR DBPRIMA
ARCHDEST /u01/app/archivedbvisit/DBPRIMA
ORACLE_SID_DR DBPRIMA
ENV_FILE DBPRIMA
Are these variables correct? <Yes/No> [Yes]:
>>> Dbvisit Database configuration (DDC) file DBPRIMA created.
>>> Dbvisit Database repository (DDR) DBPRIMA created.
Repository Version 8.0
Software Version 8.0
Repository Status VALID
PID:2330
TRACE:dbvisit_install.log
[oracle@dbvisit1 ~]$

The DDC file we created will be used to create the standby database. But before we must enter the license key, otherwise we will have an error.Following command is used dbvctl -d DDC -l License_Key

[oracle@dbvisit1 ~]$ /u01/app/dbvisit/standby/dbvctl -d DBPRIMA -l 4jo6z-8aaai-u09b6-ijjq5-m1u6k-1uwpp-cmjfq
=============================================================
Dbvisit Standby Database Technology (8.0.04.18184) (pid 3835)
dbvctl started on dbvisit1: Tue Nov 29 14:12:08 2016
=============================================================
=>Update with license key: 4jo6z-8aaai-u09b6-ijjq5-m1u6k-1uwpp-cmjfq? <Yes/No> [Yes]:
>>> Dbvisit Standby License
License Key : 4jo6z-8aaai-u09b6-ijjq5-m1u6k-1uwpp-cmjfq
customer_number : 1
dbname :
expiry_date : 2016-12-29
product_id : 8
sequence : 1
status : VALID
updated : YES
=============================================================
dbvctl ended on dbvisit1: Tue Nov 29 14:12:17 2016
=============================================================
[oracle@dbvisit1 ~]$

And then we can proceed with the standby database creation using the command dbvctl -d DDC –csd

[oracle@dbvisit1 ~]$ /u01/app/dbvisit/standby/dbvctl -d DBPRIMA --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
-------------------------------------------------------------------------------
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]: y
Your input: Y
Is this correct? <Yes/No> [Yes]: 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/DBPRIMA/adump
* compatible 12.1.0.2.0
* control_files /u01/app/oracle/oradata/DBPRIMA/control01.ctl,/u01/app/oracle/fast_recovery_area/DBPRIMA/control02.ctl
* db_block_size 8192
* db_domain
* db_name DBPRIMA
* db_recovery_file_dest /u01/app/oracle/fast_recovery_area
* db_recovery_file_dest_size 10485760000
* db_unique_name DBPRIMA
* diagnostic_dest /u01/app/oracle
* dispatchers (PROTOCOL=TCP) (SERVICE=DBPRIMAXDB)
* log_archive_format %t_%s_%r.dbf
* open_cursors 300
* pga_aggregate_target 304087040
* processes 300
* remote_login_passwordfile EXCLUSIVE
* sga_target 912261120
* 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]: 1
......
=>Create standby database template for DBPRIMA 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]:
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 DBPRIMA is 1.57GB
>>> Creating standby control file... done
>>> Transferring datafiles from dbvisit1 to dbvisit2...
Transferring /u01/app/oracle/oradata/DBPRIMA/system01.dbf...
Transferring /u01/app/oracle/oradata/DBPRIMA/sysaux01.dbf... done
Transferring /u01/app/oracle/oradata/DBPRIMA/undotbs01.dbf... done
Transferring /u01/app/oracle/oradata/DBPRIMA/users01.dbf... done
>>> Restoring standby control files... done
>>> Starting standby database DBPRIMA on dbvisit2 mount... done
>>> Restoring datafiles on dbvisit2...
>>> Renaming standby redo logs and tempfiles on dbvisit2... done
>>> Performing checkpoint and archiving logs... done
>>> Finishing 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:3915
TRACE:3915_dbvctl_csd_DBPRIMA_201611291413.trc

Let’s now run dbvctl -d DDC on the primary server to send all archived logs and on the standby server to apply all archived logs.

[oracle@dbvisit1 ~]$ /u01/app/dbvisit/standby/dbvctl -d DBPRIMA
=============================================================
Dbvisit Standby Database Technology (8.0.04.18184) (pid 4354)
dbvctl started on dbvisit1: Tue Nov 29 14:24:11 2016
=============================================================
>>> Obtaining information from standby database (RUN_INSPECT=Y)... done
>>> Sending heartbeat message... skipped
Performing a log switch...
>>> Transferring Log file(s) from DBPRIMA on dbvisit1 to dbvisit2 for thread 1:
thread 1 sequence 29 (o1_mf_1_29_d3v083x6_.arc)
=============================================================
dbvctl ended on dbvisit1: Tue Nov 29 14:24:16 2016
=============================================================
[oracle@dbvisit1 ~]$


[oracle@dbvisit2 DBPRIMA]$ /u01/app/dbvisit/standby/dbvctl -d DBPRIMA
=============================================================
Dbvisit Standby Database Technology (8.0.04.18184) (pid 8665)
dbvctl started on dbvisit2: Tue Nov 29 14:25:07 2016
=============================================================
>>> Sending heartbeat message... skipped
>>> Applying Log file(s) from dbvisit1 to DBPRIMA on dbvisit2:
thread 1 sequence 29 (1_29_926978008.arc)
=============================================================
dbvctl ended on dbvisit2: Tue Nov 29 14:25:09 2016
=============================================================
[oracle@dbvisit2 DBPRIMA]$

We can check the sync status with dbvctl -d DDC -i

[oracle@dbvisit1 ~]$ /u01/app/dbvisit/standby/dbvctl -d DBPRIMA -i
=============================================================
Dbvisit Standby Database Technology (8.0.04.18184) (pid 4420)
dbvctl started on dbvisit1: Tue Nov 29 14:26:11 2016
=============================================================
Dbvisit Standby log gap report for DBPRIMA thread 1 at 201611291426:
-------------------------------------------------------------
Destination database on dbvisit2 is at sequence: 29.
Source database on dbvisit1 is at log sequence: 30.
Source database on dbvisit1 is at archived log sequence: 29.
Dbvisit Standby last transfer log sequence: 29.
Dbvisit Standby last transfer at: 2016-11-29 14:24:16.
Archive log gap for DBPRIMA: 0.
Transfer log gap for DBPRIMA: 0.
Standby database time lag (DAYS-HH:MI:SS): +0:01:37.
=============================================================
dbvctl ended on dbvisit1: Tue Nov 29 14:26:12 2016
=============================================================
[oracle@dbvisit1 ~]$

Now it’s time to import our configuration in our graphical console. For this let’s use MANAGE HOSTS
hosts

And then add hosts using the option NEW
hosts2

Fill info and click on CREATE NEW HOST
hosts3
After we add all hosts
hosts4

We can now import our standby configuration using the MANAGE CONFIGURATIONS tab.
config1

Using IMPORT
config2
config3

Now we can manage our configuration either by command line using dbvctl or by using the graphical console. In a next blog we will talk about how to do a SWITCHOVER and a FAILOVER