We're here to help!

Advanced - Oracle RAC Configurations

Follow

1.  Introduction

In this section we will cover a few of the Advance topics with regards to Dbvisit Standby version 8 and Oracle RAC configurations.

In this section the concepts will be explained by use of an example.


1.1.  Different types of Oracle RAC configurations

Dbvisit Standby version 8 handles Oracle RAC configurations different than previous installations.  

It is important to take not of this and not attempt a version 7.0.x to 8.0.x upgrade without knowing this as you will not be able to perform a direct upgrade.  

If you are moving from version 7 to version 8, you MUST create a new DDC file.  You will not be allowed to upgrade the current version 7 DDC file if Oracle RAC is being detected.

Dbvisit Standby version 8 is designed to be more Oracle RAC aware.  This include

  1. Run Dbvisit Standby on only one of the Oracle RAC nodes
  2. To allow for this use a new Virtual IP - to be created and assigned to run on the preferred node of your choosing.  This allows Dbvisit Standby to treat the cluster as "one" node.  Example, if the VIP is 10.0.2.79 and the name attached to this is dbv-vip.  We can anywhere on the network (as long as dbv-vip for 10.0.2.79 is in the DNS) ping or attempt a connection to dbv-vip and it will always run on one of the RAC nodes, it does not make a difference which one.  The VIP will run on the node where the Dbvisit Standby components are running.  That way you do not have to configure Dbvisit Standby on all the RAC nodes, but only on one.  Which is much more effective and better use of resources.
  3. If this preferred node fail for some reason, switch the dbv-vip (Virtual IP) and the Dbvisit components (resources) to the second node (using action scripts and adding these components as cluster resources).
  4. Now to achieve this configuration, as you might have guessed, Shared storage is used.  This allows the software to be installed once, configured to use the Virtual IP (example dbv-vip) and then you can switch between the nodes (after resources have been configured and added to clusterware).
  5. Shared Storage can be ACFS, NFS or possibly any other cluster filesystem.  This filesystem will store the Dbvisit Software as well as copies of the Archive Logs during certain phases of Dbvisit Standby use, depending on your configuration.
  6. It is recommended that the Dbvisit ARCHSOURCE and ARCHDEST be located on shared storage.  (Remember when a Graceful Switchover - role reversal is perfomred, the ARCHSOURCE and ARCHDEST parameter values are swapped.  So make sure that ARCHSOURCE is located on the shared storage.  This is where archive logs will be stored when the RAC cluster becomes a standby - and if on shared storage, both nodes can perform recovery (which ever one would be running the Dbvisit Standby resources at the time).
  7. Note: this does not mean you cannot use local storage.  The downside is if you use local storage and not shared storage, you can only run of one node, unless you implement something like "rsync" to syncrhonize the local folder for the node 1 (maybe node 1 is your preferred node) to the secondary node 2.  That way you have the resources for Dbvisit Standby running on node 1 and all files are synced with node 2 (using "rsync" and a "CRON" schedule).  This is not a perfect solution, but is an option if you really cannot implement the use of shared storage.


On this page:


2.  Example 1:  Oracle RAC Primary to Single Instance Standby


Two Options are available, using shared storage on the Oracle RAC cluster for the Dbvisit Standby installation, or using local storage and run of only one node and optionally configure "rsync" to have the Dbvisit Standby folder synced between the primary nodes.

The two diagrams below explain the configuration in more detail:





2.2.  Option 2 - Using Local Storage


The diagram below provides an overview of the Architecture:




To explain the configuration further we will use an example.  Below is a diagram that provides the high level details for the environment:


The key parts to note:

  1.  The primary RAC Cluster consist out of two nodes (kiwi1 and kiwi2)
  2.  The fist node (kiwi1) will be used as the node to run Dbvisit Standby on local storage
  3.  The "Dbvisit Base" folder "/usr/dbvisit" will be synced between the primary node kiwi1 and kiwi2 using the "rsync" utility and a CRON schedule.
  4.  The standby server is a single instance system using Filesystem Bases storage:
    1. /u01/app/oracle/oradata1  --> this location will hold the database files (OMF - Oracle Managed Files will be used), this location will also hold a copy of the redo logs (OMF)
    2. /u01/app/oracle/oradata2   → This location will hold the second copy of the redo logs 
    3. /011/app/oracle/fast_recovery_area . → This location will be used as the recovery area on the standby server


The Dbvisit Standby locations are:

  • DBVISIT_BASE = /usr/dbvisit
  • ARCHSOURCE = /u01/app/oracle/dbvisit_arch/DEV
  • ARCHDEST = /u01/app/oracle/dbvisit_arch/DEV


Now that we have an overview of the configuration, we can start with the installation. 

We will install Dbvisit Standby software on node 1 (kiwi1) and on the standby server (kiwi221).

The installation of the software on kiwi1 will be synced later (see 2.2.4 below).



2.2.1.  Installing the Software


Below is an example of installing the Dbvisit Standby software onto a local folder - the default which is /usr/dbvisit

Remember in this example, the VIP on the RAC Cluster is running on kiwi1 and is called "dbv-vip"

We first install the software on node 1 (kiwi1) and then on the standby node (kiwi221).


2.2.1.1.  Installing Dbvisit Standby on the RAC Node 1 (kiwi1)


oracle@kiwi1[/home/oracle/8.0/dbvisit/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/8.0/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.08.18506        not installed
    dbvnet         2.0.08.18506        not installed
    dbvagent       2.0.08.18506        not installed
    dbvserver      2.0.08.18506        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 [kiwi1]:
     > dbv-vip

>>> 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]:
     > 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 [kiwi1]:
     > kiwi221


>>> 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]:
     > 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 dbv-vip
    DBVNET_LOCAL_PORT 7890
    DBVNET_REMOTE_HOST kiwi221
    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 [kiwi1]:
     > dbv-vip


>>> 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]:
     > 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 dbv-vip
    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.08.18506        8.0.08.18506
    dbvnet         2.0.08.18506        2.0.08.18506
    dbvagent       2.0.08.18506        2.0.08.18506
    dbvserver      2.0.08.18506        not installed

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

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

oracle@kiwi1[/home/oracle/8.0/dbvisit/installer]: cd /usr/dbvisit


oracle@kiwi1[/usr/dbvisit]: ls
dbvagent  dbvnet  standby

oracle@kiwi1[/usr/dbvisit]: tree . -d
.
├── dbvagent
│   ├── conf
│   ├── doc
│   ├── log
│   └── tmp
├── dbvnet
│   ├── conf
│   ├── doc
│   └── log
└── standby
    ├── conf
    ├── doc
    ├── gs
    ├── lib
    ├── log
    ├── pid
    ├── tmp
    └── trace

18 directories


The next step is to start the Dbvisit Components on kiwi1 - dbvnet and dbvagent:

oracle@kiwi1[/usr/dbvisit/standby]: cd ../dbvnet
oracle@kiwi1[/usr/dbvisit/dbvnet]: ./dbvnet -d start

oracle@kiwi1[/usr/dbvisit/dbvnet]: cd ../dbvagent
oracle@kiwi1[/usr/dbvisit/dbvagent]: ./dbvagent -d start
oracle@kiwi1[/usr/dbvisit/dbvagent]: ps -ef|grep dbv
oracle     908     1  0 14:09 ?        00:00:00 ./dbvnet -d start
oracle     931     1  0 14:09 ?        00:00:00 ./dbvagent -d start
oracle    1321 12286  0 14:09 pts/0    00:00:00 grep dbv



2.2.1.2.  Installing Dbvisit Standby on Standby Server (kiwi221)

Below is the output of the installation on the standby server.  

IMPORTANT: In this example the Central Console is installed on the Standby server.  Ideally it should be installed on its own server, but if you do not have a 3rd system available for the central console, you can install it on either the primary or standby - we recommend the standby.


oracle@kiwi221[/home/oracle/8.0/dbvisit/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/8.0/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.08.18506        not installed
    dbvnet         2.0.08.18506        not installed
    dbvagent       2.0.08.18506        not installed
    dbvserver      2.0.08.18506        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 [kiwi221]:
     > kiwi221

>>> 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]:
     > 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 [kiwi221]:
     > dbv-vip


>>> 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]:
     > 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 kiwi221
    DBVNET_LOCAL_PORT 7890
    DBVNET_REMOTE_HOST dbv-vip
    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 [kiwi221]:
     > kiwi221


>>> 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]:
     > 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 kiwi221
    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.08.18506        8.0.08.18506
    dbvnet         2.0.08.18506        2.0.08.18506
    dbvagent       2.0.08.18506        2.0.08.18506
    dbvserver      2.0.08.18506        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 [kiwi221]:
     > kiwi221


>>> 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]:
     > 4433

-----------------------------------------------------------
    Summary of the Dbvisit DBVSERVER configuration
-----------------------------------------------------------
    DBVISIT_BASE /usr/dbvisit
    DBVSERVER_LOCAL_HOST kiwi221
    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.08.18506        8.0.08.18506
    dbvnet         2.0.08.18506        2.0.08.18506
    dbvagent       2.0.08.18506        2.0.08.18506
    dbvserver      2.0.08.18506        2.0.08.18506

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

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


Following the installation Start the Dbvisit Standby components: dbvnet, dbvagent, dbvserver:

oracle@kiwi221[/usr/dbvisit]: cd dbvagent
oracle@kiwi221[/usr/dbvisit/dbvagent]: ./dbvagent -d start

oracle@kiwi221[/usr/dbvisit/dbvagent]: cd ../dbvnet
oracle@kiwi221[/usr/dbvisit/dbvnet]: ./dbvnet -d start

oracle@kiwi221[/usr/dbvisit/dbvnet]: cd ../dbvserver
oracle@kiwi221[/usr/dbvisit/dbvserver]: ./dbvserver -d start


oracle@kiwi221[/usr/dbvisit/dbvserver]: ps -ef|grep dbv
oracle    6527     1  0 14:07 ?        00:00:00 ./dbvagent -d start
oracle    6535     1  0 14:07 ?        00:00:00 ./dbvnet -d start
oracle    6563     1  0 14:07 ?        00:00:00 ./dbvserver -d start
oracle    6566  2786  0 14:07 pts/0    00:00:00 grep dbv
oracle@kiwi221[/usr/dbvisit/dbvserver]:




2.2.2.  Creating a DDC File

There are two options now available to you for creating the DDC file, using the Command Line Interface (CLI) or the Central Console (GUI)


2.2.2.1 . Using the Command Line Interface

The DDC file creation must be run from the Primary server (kiwi1) in this example.

The command used is:  ./dbvctl -o setup --noprompt

oracle@kiwi1[/usr/dbvisit/standby]: ./dbvctl -o setup --noprompt


=========================================================

     Dbvisit Standby Database Technology (8.0.08.18506)
           http://www.dbvisit.com

=========================================================

=>dbvctl only needs to be run on the primary server.

Is this the primary server?  [Yes]: Yes
The following Dbvisit Database configuration (DDC) file(s) found on this
server:

     DDC
     ===
1)   Create New DDC
2)   Cancel

Please enter choice [] : 1

    END USER LICENSE AGREEMENT
    PLEASE READ THIS END USER LICENSE AGREEMENT (AGREEMENT) CAREFULLY BEFORE
....
....
....  << [No]: Yes

=========================================================
Dbvisit Standby setup begins.
=========================================================
The following Oracle instance(s) have been found on this server:

     SID            ORACLE_HOME
     ===            ===========
1)   DEV1           /u01/app/oracle/product/12.1.0/dbhome_1
2)   -MGMTDB        /u01/app/12.1.0/grid
3)   DEV            /u01/app/oracle/product/12.1.0/dbhome_1
4)   Enter own ORACLE_SID and ORACLE_HOME
Please enter choice [] : 1
=>ORACLE_SID will be: DEV1
=>ORACLE_HOME will be: /u01/app/oracle/product/12.1.0/dbhome_1

------------------------------------------------------------------------------
Enter the the virtual hostname (linked to a Virtual IP) for primary database.  This virtual hostname is attached to a VIP that will be able to move
between the RAC nodes. Dbvisit Standby will only run on the server where this virtual hostname (VIP) resource is running.
The Virtual Hostname (and VIP) should be configured as a resouce in clusterware and must be enabled and started on one of the nodes before yo
continue with the setup.
NOTE: If you are not using a Virtual Hostname (Highly Recommended), Dbvisit Standby can only be configured to run on one dedicated node in the RAC
configuration - specify the hosts name here if you do not have a Virtual Hostname (attached to VIP) for the cluster configured.

=>SOURCE is []: dbv-vip
Choice is dbv-vip

------------------------------------------------------------------------------
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.
The ARCHSOURCE directory is located on the primary server and will become the ARCHDEST location when the primary database is converted to a standby
database during a Graceful Switchover operation.
This directory will ONLY contain (archive) log files related to this database. It should not contain any other (non archive log) files.
Please ensure that this directory exists on

=>ARCHSOURCE is [/u01/app/oracle/dbvisit_arch/DEV]:
Choice is /u01/app/oracle/dbvisit_arch/DEV

------------------------------------------------------------------------------
Enter primary Oracle database instance for thread 1
=>RAC1_SID is [DEV1]: DEV1
Choice is DEV1

------------------------------------------------------------------------------
Enter primary host name for thread 1
=>RAC1_HOST is [kiwi1]: kiwi1
Choice is kiwi1

------------------------------------------------------------------------------
Enter primary ASM instance for thread 1
=>RAC1_SID_ASM is [+ASM1]: +ASM1
Choice is +ASM1

------------------------------------------------------------------------------
Enter primary Oracle database instance for thread 2
=>RAC2_SID is [DEV2]: DEV2 
Choice is DEV2

------------------------------------------------------------------------------
Enter primary host name for thread 2
=>RAC2_HOST is [kiwi2]: kiwi2
Choice is kiwi2

------------------------------------------------------------------------------
Enter primary ASM instance for thread 2
=>RAC2_SID_ASM is [+ASM2]: +ASM2
Choice is +ASM2

------------------------------------------------------------------------------
Will the standby database be a RAC database?
=>RAC_DR is [N]: N
Choice is N

------------------------------------------------------------------------------
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]: N
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 attached to a VIP that will be able to move
between the RAC nodes. Dbvisit Standby will only run on the server where this virtual hostname (VIP) resource is running.
The Virtual Hostname (and VIP) should be configured as a resouce in clusterware and must be enabled and started on one of the nodes before yo
continue with the setup.  If you are not using a Virtual Hostname (Highly Recommended), Dbvisit Standby can only be configured to run on one
dedicated node in the RAC configuration - specify the hosts name here if you do not have a Virtual Hostname (attached to VIP) for the cluster
configured.
For non-RAC configurations specify the standby database server name here.

=>DESTINATION is []: kiwi221
Choice is kiwi221

------------------------------------------------------------------------------
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]: 7890
Choice is 7890

------------------------------------------------------------------------------
Enter Dbvisit Standby installation directory on the standby server
=>DBVISIT_BASE_DR is [/usr/dbvisit]: /usr/dbvisit
Choice is /usr/dbvisit

------------------------------------------------------------------------------
Enter ORACLE_HOME directory on the standby server
=>ORACLE_HOME_DR is [/u01/app/oracle/product/12.1.0/dbhome_1]: /u01/app/oracle/product/12.1.0/dbhome_1
Choice is /u01/app/oracle/product/12.1.0/dbhome_1

------------------------------------------------------------------------------
Enter DB_UNIQUE_NAME on the standby server
=>DB_UNIQUE_NAME_DR is [DEV]: DEV
Choice is DEV

------------------------------------------------------------------------------
Please enter the directory where Dbvisit Standby will transfer the (archive) log files to on standby server.   This directory is not the same as the
database recovery area or archive destinations and should not be located in these areas.
This directory should ONLY contain (archive) log files related to this database. It should not contain any other (non archive log) files.
Please ensure that this directory exists on the standby server

=>ARCHDEST is [/u01/app/oracle/dbvisit_arch/DEV]:
Choice is /u01/app/oracle/dbvisit_arch/DEV

------------------------------------------------------------------------------
Enter ORACLE_SID on the standby server
=>ORACLE_SID_DR is [DEV1]: DEV
Choice is DEV

------------------------------------------------------------------------------
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 []:
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 [DEV]:
Choice is DEV

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


Below are the list of configuration variables provided during the setup process:

Configuration Variable             Value Provided
======================             ==============
ORACLE_SID                         DEV1
ORACLE_HOME                        /u01/app/oracle/product/12.1.0/dbhome_1

SOURCE                             dbv-vip
ARCHSOURCE                         /u01/app/oracle/dbvisit_arch/DEV
RAC1_THREAD                        1
RAC1_SID                           DEV1
RAC1_HOST                          kiwi1
RAC1_SID_ASM                       +ASM1
RAC2_THREAD                        2
RAC2_SID                           DEV2
RAC2_HOST                          kiwi2
RAC2_SID_ASM                       +ASM2
RAC_DR                             N
USE_SSH                            N
DESTINATION                        kiwi221
NETPORT                            7890
DBVISIT_BASE_DR                    /usr/dbvisit
ORACLE_HOME_DR                     /u01/app/oracle/product/12.1.0/dbhome_1
DB_UNIQUE_NAME_DR                  DEV
ARCHDEST                           /u01/app/oracle/dbvisit_arch/DEV
ORACLE_SID_DR                      DEV
ENV_FILE                           DEV

Are these variables correct?  [Yes]: Yes

>>> Dbvisit Database configuration (DDC) file DEV created.

>>> Dbvisit Database repository (DDR) DEV created.
   Repository Version          8.0
   Software Version            8.0
   Repository Status           VALID


PID:2200
TRACE:dbvisit_install.log

oracle@kiwi1[/usr/dbvisit/standby]: ls conf
dbv_DEV.env  dev.db


From the above example we can see that we now have a DDC file called "dbv_DEV.env" and a repository for this DDC file called "dev.db"



2.2.2.2.  Using the Central Console

Below are the screenshots showing you how you can use the Central Console to create the DDC file for this configuration:

Step 1:  Open Main Screen, and navigate to manage hosts and first add the two hosts (dbv-vip and kiwi221)



Step 2:   Add new host

Step 3: Add the RAC node 1 (kiwi1) - but not the host details - you must use the RAC VIP that we assigned - this allows us to move to kiwi2 without having to update names as we use the Virtual IP (dbv-vip) which moves between them.


Step 4: Review host and click add new to add standby host - kiwi221


Step 5:  Add kiwi221 host


Step 6:  Review hosts


Step 7: Add new DDC → navigate to Manage Configurations


Step 8:  Start new DDC process by selecting "NEW"


Step 9:  Fill in the required details:


Once the details are provided, click on Submit and the DDC file will be created.


Step 10:  Review the DDC file


Step 11:  Make sure you apply your License key for this newly created DDC before you move onto the Create Standby Database (CSD)



2.2.3.  Creating the Standby Database (CSD)

This example will only show using the Central Console.

It is possible to create the standby database either via the Command Line Interface (CLI) using the command:  ./dbvctl -d --csd   in this example:  "./dbvctl -d DEV --csd"

To use the Central Console, navigate to the Central Console page and follow the steps as outlined below:


Step 1:  Navigate to the Create Standby Database (CSD) Menu


Step 2.1:  Select the DDC, Create New Database option and update the Database SPFILE parameters to match the Standby server configuration:

In this example the standby is Filesystem Based Storage

As we are using OMF - Oracle Managed Files on ASM (Which is recommended) we have to adjust the OMF parameters according - see 3,4,5 and 6 as marked below:


Step 2.2: Review Temporary Backup Locations - Make sure that this location has sufficient space for a full RMAN compressed backup of the database.  In this example /usr/tmp has sufficient space on both the primary and standby.



2.2.4.  Initial Send/Apply Logs

This section will show you how you can send/apply logs following the CSD process.

This can be done either via the Command Line Interface or the Central Console.

2.2.4.1.  Using the Command Line Interface (Send/Apply)


From the primary node running the Dbvisit Standby processes (kiwi1)

oracle@kiwi1[/usr/dbvisit/standby]: ./dbvctl -d DEV
=============================================================
Dbvisit Standby Database Technology (8.0.08.18506) (pid 24299)
dbvctl started on dbv-vip: Mon Jan 23 15:14:59 2017
=============================================================

>>> Obtaining information from standby database (RUN_INSPECT=Y)... done
Note FORCE_LOGGING is disabled in the primary database.
>>> Sending heartbeat message... skipped

>>> Transferring Log file(s) from DEV1 on dbv-vip to kiwi221 for thread 1:

    thread 1 sequence 143 (thread_1_seq_143.514.934038505)

>>> Transferring Log file(s) from DEV1 on dbv-vip to kiwi221 for thread 2:

    thread 2 sequence 81 (thread_2_seq_81.513.934038505)

=============================================================
dbvctl ended on dbv-vip: Mon Jan 23 15:15:06 2017
=============================================================

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


The same command:  "./dbvctl -d DEV" can be executed on the standby server kiwi221 to apply the logs already shipped.

Running a log gap report is done from the primary node (kiwi1) .  Here is an example:

oracle@kiwi1[/usr/dbvisit/standby]: ./dbvctl -d DEV -i
=============================================================
Dbvisit Standby Database Technology (8.0.08.18506) (pid 32181)
dbvctl started on dbv-vip: Mon Jan 23 15:38:49 2017
=============================================================

Dbvisit Standby log gap report for DEV thread 1 at 201701231538:
-------------------------------------------------------------
Destination database on kiwi221 is at sequence: 144.
Source database on dbv-vip is at log sequence: 145.
Source database on dbv-vip is at archived log sequence: 144.
Dbvisit Standby last transfer log sequence: 144.
Dbvisit Standby last transfer at: 2017-01-23 15:17:27.

Archive log gap for DEV1:  0.
Transfer log gap for DEV1: 0.
Standby database time lag (DAYS-HH:MI:SS): +0:20:06.

Dbvisit Standby log gap report for DEV thread 2 at 201701231538:
-------------------------------------------------------------
Destination database on kiwi221 is at sequence: 81.
Source database on dbv-vip is at log sequence: 83.
Source database on dbv-vip is at archived log sequence: 82.
Dbvisit Standby last transfer log sequence: 82.
Dbvisit Standby last transfer at: 2017-01-23 15:17:28.

Archive log gap for DEV1:  1.
Transfer log gap for DEV1: 0.
Standby database time lag (DAYS-HH:MI:SS): +0:20:06.


=============================================================
dbvctl ended on dbv-vip: Mon Jan 23 15:38:51 2017
=============================================================




2.2.4.2.  Using the Central Console (Send/Apply)

Step 1:  Navigate to Manage Databases


Step 2: Select the DDC, click on [2] Send Logs icon and an Active Task will appear [3] which will turn to a green tick when done.  View the details by clicking on the task [3] and you will see the details [4]


Step 3:  Select the DDC, click on the Apply Logs icon [2].  The active task will be created [3] and when selected the details will be displayed [4]




2.2.5.  Use "rsync" to sync local storage on RAC nodes

The next step in this example is to use the UNIX "rsync" utility to copy the files located in the /usr/dbvisit directory (The DBVISIT_BASE) from the "preferred node" which is the node where Dbvisit Standby normally is set to run, which in this example is "kiwi1".  It will be set to copy the files from this location to the secondary node kiwi2 in this example.  From kiwi2 there will be no Dbvisit Standby processes running as the Virtual IP (dbv-vip) will be running on kiwi1.  

You will only start the Dbvisit Processes on kiwi2 if the Virtual IP cluster resource (dbv-vip) has been switched over - (re-allocated or failed over) to run on kiwi2.  For more detail on configuration of the VIP and the Action Scripts for Dbvnet and Dbvagent please see here - OracleRACConfigurations-5.Example2:AddDbvnetandDbvagentasClusterResources


Note:  The /usr/dbvisit directory (The Dbvisit Base) location must exist on both Primary RAC nodes and that the permission of this folder is set to have the "oracle" Unix account (the user that runs your database software) as the owner.  At this stage the folder on the secondary server (kiwi2) will be empty as we have not synced the files yet.


Step 1:  Create a "rsync" script 

The first step now is to create a script that will be used to copy the files from node 1 (kiwi1 in this example) to node 2 (kiwi2).

IMPORTANT

Please note that this example of showing how "rsync" can be used.

These steps and scripts must be tested and modified to suit your environment prior to implementing it into production.

Make sure that you disable the rsync schedule prior to running a Graceful Switchover - it can be re-enabled again after that.


Sample "rsync-dbvisit" script

Note - this script can be copied into a folder /home/oracle/bin and enabled via a UNIX CRON schedule to run on a regular basis.

#!/bin/bash
#
# Note this is a sample script and it must be modified to suit your environment.
# Test this script before implementing into a production environment.
# Basic script to sync /usr/dbvisit local with remote /usr/dbvisit directory.
# This script: rsync-dbvisit will be located in /home/oracle/bin folder.
#
#
remote_server=kiwi2
dbv_base_log=/tmp/rsync-dbvisit-base.log
dbv_arch_log=/tmp/rsync-dbvisit-arch.log

echo "Start Sync: `date`" > ${dbv_base_log}
## Run the rsync command over SSH
## options used are to preservice times, have a 2min i/o timout and to exclude trace files
##
rsync -aqzte ssh --exclude '*.trc' --log-file=${dbv_base_log} /usr/dbvisit/ oracle@${remote_server}:/usr/dbvisit/
echo "End Sync: `date`" >> ${dbv_base_log}


echo "Start Sync: `date`" > ${dbv_arch_log}
## We also need to sync the ARCHSOURCE and ARCHDEST location if on local storage and not shared
rsync -aqzte ssh --exclude '*.trc' --log-file=${dbv_arch_log} /u01/app/oracle/dbvisit_arch/DEV/ oracle@${remote_server}:/u01/app/oracle/dbvisit_arch/DEV/
echo "End Sync: `date`" >> ${dbv_arch_log}


Once you have created this script, make sure that it has sufficient permissions and that the owner "oracle" user in this case, have execute permission (example  "chmod +x oracle rsync-dbvisit" ).  For more detail please see the "chmod" command man pages or online help for your UNIX distribution.

The above script is making use of the UNIX "rsync" command.  For more details on the use of this command and all parameters please see the UNIX man pages or online documentation.  

Once you have created the script you can run it manually first time to ensure the directories are kept in sync.  

oracle@kiwi1[/home/oracle]: cd bin
oracle@kiwi1[/home/oracle/bin]: ./rsync-dbvisit


Then review the log file in /tmp/dbvisit-rsync.log as well as the /usr/dbvisit directory on the secondary server (kiwi2 in this example)


Step 2:  Schedule the Script

In this example, we will schedule the script to run every 10 minutes.  This should be sufficient for most configurations. 

The schedule can be adjusted if required based on your configuration and environment.


##
# CRON: Synchronize the Dbvisit Base folder between kiwi1 and kiwi2
##
*/10 * * * * cd /home/oracle/bin; ./rsync-dbvisit >>/dev/null 2>&1

To schedule a cron use the "crontab -e" command and to view any existing schedules use "crontab -l"


Step 3:  Monitor

Have Dbvisit Standby run either via a schedule or via the Daemon process for a period and then monitor the /usr/dbvisit folder on the standby server.

You should see files being updated in the secondary server following a run of the above schedule.


2.2.6.  Next Step - Scheduling

The next step is to schedule Dbvisit Standby or to run the Daemon process.

Both method can be used.  

Example if you want to run the Schedule using the Unix Cron, you can use the following example CRON entries:


On the Primary (kiwi1)

##
# CRON: Synchronize the Dbvisit Base folder between kiwi1 and kiwi2
##
*/10 * * * * cd /home/oracle/bin; ./rsync-dbvisit >>/dev/null 2>&1
##
##
# Dbvisit Standby Scheduled to run every 5 min
*/5 * * * * cd /usr/dbvisit/standby; ./dbvctl -d DEV >>/dev/null 2>&1


On the Standby (kiwi221) - apply logs every 15min, this can provide a buffer (delay in applying logs) to possibly stop Human error (deletion of data etc).  

##
# Dbvisit Standby Scheduled to run every 15 min
*/15 * * * * cd /usr/dbvisit/standby; ./dbvctl -d DEV >>/dev/null 2>&1


For more detail on scheduling or running Dbvisit Standby as a background Daemon/Process please see here - Dbvisit Standby Scheduling



2.2.7.  Example Graceful Switchover in this Configuration

This example is just to show Graceful Switchover that was performed on this environment.

Before the Graceful Switchover (GS) a log gap report was run to make sure that the primary and standby is up to date.

oracle@kiwi1[/usr/dbvisit/standby]: ./dbvctl -d DEV -o switchover
=============================================================
Dbvisit Standby Database Technology (8.0.08.18506) (pid 2736)
dbvctl started on dbv-vip: Mon Jan 23 15:46:27 2017
=============================================================

>>> Starting Switchover between dbv-vip and kiwi221

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: kiwi221
    Standby Database Server: dbv-vip

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


PID:2736
TRACE:2736_dbvctl_switchover_DEV_201701231546.trc

=============================================================
dbvctl ended on dbv-vip: Mon Jan 23 15:56:57 2017
=============================================================


Following this process, kiwi221 is now a single instance primary with kiwi1/kiwi2 as the standby database.





3.  Example 2: Oracle RAC primary to Oracle RAC standby

In the example we will discuss in this section we will explain the configuration of a Standby Oracle RAC environment for a Primary Oracle RAC environment.

The Diagram below provide a summary of the environment:

3.1.  The Primary Oracle RAC Configuration - Overview

In the example the primary RAC configuration exist out of two Nodes:

  • Primary node 1: kiwi81
  • Primary node 2: kiwi82

The IP address details are listed below:

## Public IP addresses
10.0.2.81	kiwi81.oraclekiwi.co.nz kiwi81
10.0.2.82	kiwi82.oraclekiwi.co.nz kiwi82

## Virtual IP Addresses
10.0.2.83	kiwi81-vip.oraclekiwi.co.nz kiwi81-vip
10.0.2.84	kiwi82-vip.oraclekiwi.co.nz kiwi82-vip

## Private Interconnect Addresses
10.5.5.81	kiwi81-priv.oraclekiwi.co.nz kiwi81-priv
10.5.5.82	kiwi82-priv.oraclekiwi.co.nz kiwi82-priv

## SCAN address list in DNS Only
# 10.0.2.85       kiwi812-scan.oraclekiwi.co.nz kiwi812-scan
# 10.0.2.86       kiwi812-scan.oraclekiwi.co.nz kiwi812-scan
# 10.0.2.87       kiwi812-scan.oraclekiwi.co.nz kiwi812-scan

# Dbvisit Standby VIP 
10.0.2.89	kiwi812-vip.oraclekiwi.co.nz kiwi812-vip

These details are added to the /etc/hosts file as well as to the DNS.

Having the values in the DNS is highly recommended.  

The Oracle SCAN details must be in the DNS.  

3.1.1.  The new Virtual IP

Take note of the new Virtual IP that is specified.  This new Virtual IP is created and will be assigned to one specific node at a time.  But it can move between the RAC nodes.  Dbvisit Standby version 8 will be configured to use this address as the "cluster address".  That way we can decide on which node we want Dbvisit Standby components to run.

  • Get new IP address on public network (network used by Primary/Standby)
  • Create new Cluster Resource – Virtual IP (as root user)
  • Review Oracle Documentation on creating a Virtual IP!

The steps to create the Virtual IP address is listed below (Note these are executed as the root user)

# appvipcfg create -network=1 -ip=10.0.2.89 -vipname=kiwi812-vip -user=root
# crsctl setperm resource kiwi812-vip -u user:oracle:r-x
# crsctl setperm resource kiwi812-vip -u user:grid:r-x
# crsctl start resource kiwi812-vip -n kiwi81

# crsctl status resource kiwi812-vip -p
# crsctl relocate kiwi812-vip
# crsctl relocate resource kiwi812-vip -n kiwi81

The last step is to make sure you add to the DNS:  10.0.2.89 kiwi812-vip

3.1.2.  ASM Disk Groups

  • +DATA 
    • Datafiles, Redo Logs, Controlfile
  • +FRA 
    • Recovery Area, Redo Logs, Contolfile, Archivelogs
  • +ACFS 
    • Used for /acfs shared filesystem

3.1.3.  Dbvisit Standby Installation

  • DBVISIT_BASE : /acfs/dbvisit
  • SOURCE : kiwi812-vip
  • DESTINATION : kiwi912-vip
  • ARCHSOURCE location : /acfs/dbvisit_ach/DEV
  • ARCHDEST Location : /acfs/dbvisit_ach/DEV

3.1.4.  Node 1 and 2 storage overview

Primary RAC Node 1: kiwi81 Primary RAC Node 2: kiwi82
oracle@kiwi81[/home/oracle]: df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_oel6-lv_root
                       12G  8.2G  2.7G  76% /
tmpfs                 1.4G  117M  1.3G   9% /dev/shm
/dev/sda1             976M  126M  784M  14% /boot
/dev/mapper/vg_oel6-lv_u01
                       23G   13G  9.3G  57% /u01
tmpfs                 2.0G  4.3M  2.0G   1% /tmp
/dev/asm/acfsvol-260  9.0G  423M  8.6G   5% /acfs
oracle@kiwi82[/home/oracle]: df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_oel6-lv_root
                       12G  7.6G  3.4G  70% /
tmpfs                 1.4G  118M  1.3G   9% /dev/shm
/dev/sda1             976M  126M  784M  14% /boot
/dev/mapper/vg_oel6-lv_u01
                       23G   14G  8.1G  63% /u01
tmpfs                 2.0G  6.8M  2.0G   1% /tmp
/dev/asm/acfsvol-260  9.0G  423M  8.6G   5% /acfs


3.2.  The Standby Oracle RAC Configuration - Overview

In the example the standby RAC configuration exist out of two Nodes:

  • Standby node 1: kiwi91
  • Standby node 2: kiwi92

The IP address details are listed below:

## Public IP addresses
10.0.2.91	kiwi91.oraclekiwi.co.nz kiwi91
10.0.2.92	kiwi92.oraclekiwi.co.nz kiwi92

## Virtual IP Addresses
10.0.2.93	kiwi91-vip.oraclekiwi.co.nz kiwi91-vip
10.0.2.94	kiwi92-vip.oraclekiwi.co.nz kiwi92-vip

## Private Interconnect Addresses
10.5.5.91	kiwi91-priv.oraclekiwi.co.nz kiwi91-priv
10.5.5.92	kiwi92-priv.oraclekiwi.co.nz kiwi92-priv

## SCAN address list in DNS Only
# 10.0.2.95       kiwi912-scan.oraclekiwi.co.nz kiwi912-scan
# 10.0.2.96       kiwi912-scan.oraclekiwi.co.nz kiwi912-scan
# 10.0.2.97       kiwi912-scan.oraclekiwi.co.nz kiwi912-scan

# Dbvisit Standby VIP 
10.0.2.99	kiwi912-vip.oraclekiwi.co.nz kiwi912-vip

  • These details are added to the /etc/hosts file as well as to the DNS.
  • Having the values in the DNS is highly recommended.
  • The Oracle SCAN details must be in the DNS.

3.2.1.  The new Virtual IP

Take note of the new Virtual IP that is specified. This new Virtual IP is created and will be assigned to one specific node at a time. But it can move between the RAC nodes. Dbvisit Standby version 8 will be configured to use this address as the "cluster address". That way we can decide on which node we want Dbvisit Standby components to run.

  • Get new IP address on public network (network used by Primary/Standby)
  • Create new Cluster Resource – Virtual IP (as root user)
  • Review Oracle Documentation on creating a Virtual IP!

The steps to create the Virtual IP address is listed below (Note these are executed as the root user)


# appvipcfg create -network=1 -ip=10.0.2.99 -vipname=kiwi912-vip -user=root
# crsctl setperm resource kiwi912-vip -u user:oracle:r-x
# crsctl setperm resource kiwi912-vip -u user:grid:r-x
# crsctl start resource kiwi912-vip -n kiwi91

# crsctl status resource kiwi912-vip -p
# crsctl relocate kiwi912-vip
# crsctl relocate resource kiwi912-vip -n kiwi91


The last step is to make sure you add to the DNS: 10.0.2.99 kiwi912-vip

3.2.2.  ASM Disk Groups

  • +DATA
    • Datafiles, Redo Logs, Controlfile
  • +FRA
    • Recovery Area, Redo Logs, Contolfile, Archivelogs
  • +ACFS
    • Used for /acfs shared filesystem

3.2.3.  Dbvisit Standby Installation

  • DBVISIT_BASE : /acfs/dbvisit
  • SOURCE : kiwi812-vip
  • DESTINATION : kiwi912-vip
  • ARCHSOURCE location : /acfs/dbvisit_ach/DEV
  • ARCHDEST Location : /acfs/dbvisit_ach/DEV

3.2.4.  Node 1 and 2  storage overview


Standby RAC Node 1: kiwi91 Standby RAC Node 1: kiwi92
oracle@kiwi91[/home/oracle]: df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_oel6-lv_root
                       12G  8.4G  2.6G  77% /
tmpfs                 1.4G  133M  1.3G  10% /dev/shm
/dev/sda1             976M  126M  784M  14% /boot
/dev/mapper/vg_oel6-lv_u01
                       23G   14G  7.7G  65% /u01
/dev/asm/acfsvol-229  9.0G  390M  8.7G   5% /acfs
oracle@kiwi92[/home/oracle]: df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_oel6-lv_root
                       12G   10G  889M  93% /
tmpfs                 1.4G  136M  1.3G  10% /dev/shm
/dev/sda1             976M  126M  784M  14% /boot
/dev/mapper/vg_oel6-lv_u01
                       23G   13G  9.2G  58% /u01
/dev/asm/acfsvol-229  9.0G  390M  8.7G   5% /acfs


4.  Example 2:  The Core Component Installation

4.1.  Primary Cluster - Node 1 (kiwi81)

  • The primary cluster Virtual IP is 10.0.2.89 and is using the hostname alias kiwi812-vip.  We will use this as the SOURCE address name for the Primary Cluster.
  • At the time of installing the software the Virtual IP was configured to run on node 1 - kiwi81.
  • The steps below explain the installation of the Dbvisit Standby Core components - Dbvnet, Dbvagent and Dbvisit Standby CLI
  • Dbvisit Standby components are installed onto the shared storage which is mounted under /acfs directory
  • The directory /acfs/dbvisit and /acfs/dbvisit_arch is created and the "oracle" Unix account is made the owner
  • In this example a basic passphrase of "kiwi123" is used for Dbvnet and the Dbvagent

    oracle@kiwi81[/home/oracle/8.0/dbvisit/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/8.0/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]:
         > /acfs/dbvisit
        DBVISIT_BASE = /acfs/dbvisit
    
        -----------------------------------------------------------
        Component      Installer Version   Installed Version
        -----------------------------------------------------------
        standby        8.0.01.18066        not installed
        dbvnet         2.0.01.18066        not installed
        dbvagent       2.0.01.18066        not installed
        dbvserver      2.0.01.18066        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 /acfs/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 [kiwi81]:
         > kiwi812-vip
    
    >>> 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]:
         > 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 [kiwi81]:
         > kiwi912-vip
    
    
    >>> 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]:
         > 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 /acfs/dbvisit
        DBVNET_LOCAL_HOST kiwi812-vip
        DBVNET_LOCAL_PORT 7890
        DBVNET_REMOTE_HOST kiwi912-vip
        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 [kiwi81]:
         > kiwi812-vip
    
    
    >>> 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]:
         > 7890
    
    
    >>> 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 /acfs/dbvisit
        DBVAGENT_LOCAL_HOST kiwi812-vip
        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.01.18066        8.0.01.18066
        dbvnet         2.0.01.18066        2.0.01.18066
        dbvagent       2.0.01.18066        2.0.01.18066
        dbvserver      2.0.01.18066        not installed
    
        -----------------------------------------------------------
    
        What action would you like to perform?
           1 - Install component(s)
           2 - Uninstall component(s)
           3 - Terminate
    
        Your choice: 3
    >>> Install log /tmp/dbvisit_install.log.201611062039
    oracle@kiwi81[/home/oracle/8.0/dbvisit/installer]

4.2.  Standby Cluster - Node 1 (kiwi92)

  • The standby cluster Virtual IP is 10.0.2.99 and is using the hostname alias kiwi912-vip.  We will use this as the SOURCE address name for the Primary Cluster.
  • At the time of installing the software the Virtual IP was configured to run on node 1 - kiwi91.
  • The steps below explain the installation of the Dbvisit Standby Core components - Dbvnet, Dbvagent and Dbvisit Standby CLI
  • Dbvisit Standby components are installed onto the shared storage which is mounted under /acfs directory
  • The directory /acfs/dbvisit and /acfs/dbvisit_arch is created and the "oracle" Unix account is made the owner
  • In this example a basic passphrase of "kiwi123" is used for Dbvnet and the Dbvagent
oracle@kiwi91[/home/oracle/8.0/dbvisit/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/8.0/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]:
     > /acfs/dbvisit
    DBVISIT_BASE = /acfs/dbvisit

    -----------------------------------------------------------
    Component      Installer Version   Installed Version
    -----------------------------------------------------------
    standby        8.0.01.18066        not installed
    dbvnet         2.0.01.18066        not installed
    dbvagent       2.0.01.18066        not installed
    dbvserver      2.0.01.18066        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 /acfs/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 [kiwi91]:
     > kiwi912-vip

>>> 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]:
     > 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 [kiwi91]:
     > kiwi812-vip


>>> 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]:
     > 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 /acfs/dbvisit
    DBVNET_LOCAL_HOST kiwi912-vip
    DBVNET_LOCAL_PORT 7890
    DBVNET_REMOTE_HOST kiwi812-vip
    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 [kiwi91]:
     > kiwi912-vip


>>> 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]:
     > 7890


>>> 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 /acfs/dbvisit
    DBVAGENT_LOCAL_HOST kiwi912-vip
    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.01.18066        8.0.01.18066
    dbvnet         2.0.01.18066        2.0.01.18066
    dbvagent       2.0.01.18066        2.0.01.18066
    dbvserver      2.0.01.18066        not installed

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

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

    Your choice: 3
>>> Install log /tmp/dbvisit_install.log.201611062039
oracle@kiwi91[/home/oracle/8.0/dbvisit/installer]


5. Example 2:  Add Dbvnet and Dbvagent as Cluster Resources

In this section we will show you how to add Dbvnet and Dbvagent as cluster resources.

We will make use of an action script for each component, which will then be used to manage these two resources.

Note: these scripts are provided as examples and should be tested in you development or test environments before implementing it into production as each environment is different and they might need to be adjusted for your environment.


5.1.  Dbvnet Action Script

The script below is a sample action script that will be used to manage dbvnet.  

This script is created in the dbvnet folder /acfs/dbvisit/dbvnet

#!/bin/bash
#
# Dbvnet Action Script 

#  Function to change database environments
###########################################

## set following to ensure oraenv is picked up from /usr/local/bin
export PATH=/usr/local/bin:$PATH

set_env ()
{
  export ORAENV_ASK=NO
  export ORACLE_SID=$1
  . oraenv >> /dev/null
  export ORAENV_ASK=YES
}

#################
## Main Section
#################

# This is logged to CRSD agent log file
echo "`date` Action script '$_CRS_ACTION_SCRIPT' for resource [$_CRS_NAME] called for action $1"

# set environment
set_env DEV
cd /acfs/dbvisit/dbvnet


case "$1" in
     'start')
           ./dbvnet -d start
           RET=0
           echo "Running start dbvnet resource with return code $RET"
     ;;

     'stop')
           NUM=`ps -ef | grep dbvnet | egrep -v 'grep|action-script|resource' | wc -l`
           if [ $NUM = 0 ]; then
             ## do a cleanup of pid
             ./dbvnet -d stop
             RET=0
           else
             ## now stop the dbvnet
             ./dbvnet -d stop
             NUM=`ps -ef | grep dbvnet | grep -v grep | wc -l`
             if [ $NUM = 0 ]; then
               RET=0
             else
               RET=1
             fi
           fi
           echo "Running stop dbvnet resource with return code $RET"
     ;;

     'check')
           NUM=`ps -ef | grep dbvnet | egrep -v 'grep|action-script|resource' | wc -l`
           if [ $NUM = 0 ]; then
             ## return code 1 for check means OFFLINE
             RET=1
           else
             ## return code 0 for check means ONLINE
             RET=0
           fi
           echo "Running check dbvnet resource with return code $RET"
     ;;

     'clean')
           for c1 in `ps -ef|grep dbvnet |egrep -v 'grep|action-script|resource'| awk '{print $2}'` ;
           do
             echo "...force kill dbvnet pid $c1"
             kill -9 $c1
           done
           ## do some cleanup 
           ./dbvnet -d stop
           RET=0
           echo "Running clean dbvnet resource with return code $RET"
     ;;
esac

if [ $RET -eq 0 ]; then
  exit 0
else
  exit 1
fi

5.2. Dbvagent Action Script


The script below is a sample action script that will be used to manage dbvagent.
This script is created in the dbvnet folder /acfs/dbvisit/dbvagent

#!/bin/bash
#
# Dbvagent Action Script


#  Function to change database environments
###########################################

## set following to ensure oraenv is picked up from /usr/local/bin
export PATH=/usr/local/bin:$PATH

set_env ()
{
  export ORAENV_ASK=NO
  export ORACLE_SID=$1
  . oraenv >> /dev/null
  export ORAENV_ASK=YES
}

#################
## Main Section
#################

# This is logged to CRSD agent log file
echo "`date` Action script '$_CRS_ACTION_SCRIPT' for resource [$_CRS_NAME] called for action $1"

# set environment
set_env DEV
cd /acfs/dbvisit/dbvagent


case "$1" in
     'start')
           ./dbvagent -d start
           RET=0
           echo "Running start dbvagent resource with return code $RET"
     ;;

     'stop')
           NUM=`ps -ef | grep dbvagent | egrep -v 'grep|action-script|resource' | wc -l`
           if [ $NUM = 0 ]; then
             ## do a cleanup of pid
             ./dbvagent -d stop
             RET=0
           else
             ## now stop the agent
             ./dbvagent -d stop
             NUM=`ps -ef | grep dbvagent | grep -v grep | wc -l`
             if [ $NUM = 0 ]; then
               RET=0
             else
               RET=1
             fi
           fi
           echo "Running stop dbvagent resource with return code $RET"
     ;;

     'check')
           NUM=`ps -ef | grep dbvagent | egrep -v 'grep|action-script|resource' | wc -l`
           if [ $NUM = 0 ]; then
             ## return code 1 for check means OFFLINE
             RET=1
           else
             ## return code 0 for check means ONLINE
             RET=0
           fi
           echo "Running check dbvagent resource with return code $RET"
     ;;

     'clean')
           for c1 in `ps -ef|grep dbvagent |egrep -v 'grep|action-script|resource'| awk '{print $2}'` ;
           do
             echo "...force kill dbvagent pid $c1"
             kill -9 $c1
           done
           ## do some cleanup of pids
           ./dbvagent -d stop
           RET=0
           echo "Running clean dbvagent resource with return code $RET"
     ;;
esac

if [ $RET -eq 0 ]; then
  exit 0
else
  exit 1
fi


5.3.  Add the Cluster Resources

On the Primary cluster node 1 (kiwi81) as the root user run the following commands to add the two resources:

IMPORTANT: The lines below should be on one line, but are shown on seperate lines to make it easier to read

crsctl add resource dbvnet -type cluster_resource 
   -attr "ACTION_SCRIPT=/acfs/dbvisit/dbvnet/action-script.scr, RESTART_ATTEMPTS=3, START_TIMEOUT=60, STOP_TIMEOUT=60, CHECK_INTERVAL=10, 
          START_DEPENDENCIES='hard(kiwi812-vip) pullup(kiwi812-vip)'
         ,STOP_DEPENDENCIES='hard(kiwi812-vip)' 
          ACL='owner:oracle:rwx,pgrp:oinstall:rwx,other::r--' 
          PLACEMENT='favored' 
          HOSTING_MEMBERS='kiwi81'"




crsctl add resource dbvagent -type cluster_resource 
   -attr "ACTION_SCRIPT=/acfs/dbvisit/dbvagent/action-script.scr, RESTART_ATTEMPTS=3, START_TIMEOUT=60, STOP_TIMEOUT=60, CHECK_INTERVAL=10, 
          START_DEPENDENCIES='hard(kiwi812-vip) pullup(kiwi812-vip)'
         ,STOP_DEPENDENCIES='hard(kiwi812-vip)' 
          ACL='owner:oracle:rwx,pgrp:oinstall:rwx,other::r--' 
          PLACEMENT='favored' 
          HOSTING_MEMBERS='kiwi81'"



On the Standby cluster node 1 (kiwi91) as the root user run the following commands to add the two resources:

IMPORTANT: The lines below should be on one line, but are shown on seperate lines to make it easier to read

crsctl add resource dbvnet -type cluster_resource 
   -attr "ACTION_SCRIPT=/acfs/dbvisit/dbvnet/action-script.scr, RESTART_ATTEMPTS=3, START_TIMEOUT=60, STOP_TIMEOUT=60, CHECK_INTERVAL=10, 
          START_DEPENDENCIES='hard(kiwi912-vip) pullup(kiwi912-vip)'
         ,STOP_DEPENDENCIES='hard(kiwi912-vip)' 
          ACL='owner:oracle:rwx,pgrp:oinstall:rwx,other::r--' 
          PLACEMENT='favored' 
          HOSTING_MEMBERS='kiwi91'"


crsctl add resource dbvagent -type cluster_resource 
   -attr "ACTION_SCRIPT=/acfs/dbvisit/dbvagent/action-script.scr, RESTART_ATTEMPTS=3, START_TIMEOUT=60, STOP_TIMEOUT=60, CHECK_INTERVAL=10, 
          START_DEPENDENCIES='hard(kiwi912-vip) pullup(kiwi912-vip)'
         ,STOP_DEPENDENCIES='hard(kiwi912-vip)' 
          ACL='owner:oracle:rwx,pgrp:oinstall:rwx,other::r--' 
          PLACEMENT='favored' 
          HOSTING_MEMBERS='kiwi91'"

5.4.  Start the Dbvnet and Dbvagent Cluster Resources

The following commands can be used to check the status of the cluster resources as well as to start and stop them.

Remember that these two resources are dependant on the Virtual IP address that was added. 

If the Virtual IP address is moved (relocated) to the other node, the Dbvnet and Dbvagent resources will be stopped and moved to the other node and started.

IMPORTANT

After the dbvagent resource is started, check USER variable in its environment, for example:

xargs --null --max-args=1 < /proc//environ | grep USER

If the result is:

USER=root

Then you will need to add one extra line to change this variable to the dbvagent action script:

...
case "$1" in
     'start')
			export USER=oracle
           ./dbvagent -d start
...

Restart dbvagent resource afterwards

  • Status Check
root@kiwi91[/root]: crsctl status resource dbvnet
NAME=dbvnet
TYPE=cluster_resource
TARGET=ONLINE
STATE=ONLINE on kiwi91

root@kiwi91[/root]: crsctl status resource dbvagent
NAME=dbvagent
TYPE=cluster_resource
TARGET=ONLINE
STATE=ONLINE on kiwi91

root@kiwi91[/root]: crsctl status resource kiwi912-vip
NAME=kiwi912-vip
TYPE=app.appvip_net1.type
TARGET=ONLINE
STATE=ONLINE on kiwi91

or

root@kiwi91[/root]: crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
dbvagent       clus...esource ONLINE    ONLINE    kiwi91
dbvnet         clus...esource ONLINE    ONLINE    kiwi91
kiwi912-vip    app....t1.type ONLINE    ONLINE    kiwi91
...
...
...


  • Start Resource
root@kiwi91[/root]: crsctl start resource kiwi912-vip
CRS-2672: Attempting to start 'kiwi912-vip' on 'kiwi91'
CRS-2676: Start of 'kiwi912-vip' on 'kiwi91' succeeded
root@kiwi91[/root]: crsctl start resource dbvnet
CRS-2672: Attempting to start 'dbvnet' on 'kiwi91'
CRS-2676: Start of 'dbvnet' on 'kiwi91' succeeded
root@kiwi91[/root]: crsctl start resource dbvagent
CRS-2672: Attempting to start 'dbvagent' on 'kiwi91'
CRS-2676: Start of 'dbvagent' on 'kiwi91' succeeded
root@kiwi91[/root]:


  • Stop Resource
root@kiwi91[/root]: crsctl stop resource dbvnet
CRS-2673: Attempting to stop 'dbvnet' on 'kiwi91'
CRS-2677: Stop of 'dbvnet' on 'kiwi91' succeeded
CRS-2679: Attempting to clean 'dbvnet' on 'kiwi91'
CRS-2681: Clean of 'dbvnet' on 'kiwi91' succeeded
root@kiwi91[/root]: crsctl stop resource dbvagent
CRS-2673: Attempting to stop 'dbvagent' on 'kiwi91'
CRS-2677: Stop of 'dbvagent' on 'kiwi91' succeeded
CRS-2679: Attempting to clean 'dbvagent' on 'kiwi91'
CRS-2681: Clean of 'dbvagent' on 'kiwi91' succeeded
root@kiwi91[/root]: crsctl stop resource kiwi912-vip
CRS-2673: Attempting to stop 'kiwi912-vip' on 'kiwi91'
CRS-2677: Stop of 'kiwi912-vip' on 'kiwi91' succeeded


  • Relocate Virtual IP 
root@kiwi91[/root]: crsctl relocate resource kiwi912-vip -f

CRS-2673: Attempting to stop 'dbvagent' on 'kiwi91'
CRS-2673: Attempting to stop 'dbvnet' on 'kiwi91'
CRS-2677: Stop of 'dbvnet' on 'kiwi91' succeeded
CRS-2679: Attempting to clean 'dbvnet' on 'kiwi91'
CRS-2677: Stop of 'dbvagent' on 'kiwi91' succeeded
CRS-2679: Attempting to clean 'dbvagent' on 'kiwi91'
CRS-2681: Clean of 'dbvnet' on 'kiwi91' succeeded
CRS-2681: Clean of 'dbvagent' on 'kiwi91' succeeded
CRS-2673: Attempting to stop 'kiwi912-vip' on 'kiwi91'
CRS-2677: Stop of 'kiwi912-vip' on 'kiwi91' succeeded
CRS-2672: Attempting to start 'kiwi912-vip' on 'kiwi92'
CRS-2676: Start of 'kiwi912-vip' on 'kiwi92' succeeded
CRS-2672: Attempting to start 'dbvagent' on 'kiwi92'
CRS-2676: Start of 'dbvagent' on 'kiwi92' succeeded
CRS-2672: Attempting to start 'dbvnet' on 'kiwi92'
CRS-2676: Start of 'dbvnet' on 'kiwi92' succeeded


6.  Example 2: Create the Dbvisit Standby DDC File

There are two methods to create the Dbvisit Standby DDC file.

In this example we will show it via the Central Console.

The Central Console is installed onto its own system and have network access to both the Primary and the Standby RAC clusters.

6.1.  Add the two new hosts 

The two hosts to be added is the Dbvagent connections, which is to the Virtual IP addresses.



6.2.  Start the DDC creation process

Navigate to the Configurations screen and start the creation of the new DDC

The New Configuration will now start as seen below:

  1. Select the source as the primary Virtual IP - kiwi812-vip, then accept the license agreement
  2. Select the source Instance Name - this is obtained from the /etc/oratab file.  We need to make sure you have both the Database and the Instance on the specified system in the /etc/oratab file.  Select the instance name, in this case it will be DEV1
  3. Specify the ARCSOURCE location.  This location should ideally be located on the shared storage location.  Remember when a Graceful Switchover is performed the roles are reversed between the ARCSOURCE and the ARCHDEST values in the DDC file
  4. Specify to use DBVNET by default (recommended)
  5. You will now be presented with the primary RAC database details, review and confirm the database and ASM instances match the servers they are running on.  Dbvisit Standby will detect these values based on the connection that was made to the primary instance that was selected in step 2 above.
  6. As we are going to create a standby RAC database, we will adjust this setting to YES.  See the next screenshot below


From the above image we can see:

  1. Specify the standby database will be a RAC enabled environment
  2. Select the standby Virtual IP hostname - kiwi912-vip
  3. You are then presented with the RAC Thread details for node 1 and 2 on the standby server, fill in the required detail
  4. Specify the ARCHDEST location - this should be on shared storage and is the location where Dbvisit Standby will transfer archive logs into on the standby server.
  5. Review and update the Dbvisit Base location on the standby server if different
  6. Review the Oracle Database Home on the standby server
  7. Review and update the DB Unique Name (db_unique_name) of the standby if required - default value recommended 
  8. Specify the Dbvisit Standby Configuration (DDC) name


The last step is to click on Submit.

Dbvisit Standby will now validate the parameters specified and create a new DDC file as well as a repository (stored in the DBVISIT_BASE/standby/conf directory)




7.  Example 2:  Create the Standby Database

The standby database can either be created via the command line interface (dbvctl -d --csd) or via the Central Console.

In this example we will show the use of the Central Console to create the standby database

  • Navigate to the "Create Standby Database" Menu
  • Select the DEV DDC file from the dropdown list.
  • Then specify the process option as "NEW DATABASE"


The server parameter file (spfile) section does contain a lot of information.  Make sure you review the locations of the datafiles, redo logs and spfile.

In this example the primary and standby systems match exactly from a storage point of view (same disk groups etc) so we do not have to change any parameters.

From the above we can see that the temporary location /user/tmp was used for the local and remote temp backup locations.  

Make sure the locations you specify has sufficient space to hold a full compressed database backup.

In this example the "Create Standby Database & Template" option is selected.

The new task will be created as shown below:


8.  Example 2: Send Logs from Primary to Standby

  1. Navigate to the Database Actions Screen
  2. Click on the option to "Send Logs"
  3. Review the Task details


9.  Example 2: Apply Archivelog to Standby

  • Navigate to the Database Actions Screen
  • Click on the option to "Apply Logs"
  • Review the Task details


Have more questions? Submit a request

Comments