Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

1.  Introduction

In this section, we will cover how to deploy Dbvisit Standby on an Oracle Standard Edition High Availability (SEHA) cluster. SEHA is a feature replacing RAC which is no longer available on Standard Edition starting with 19c version.

SEHA feature is available only on version 19.7 and onwards. Note that shared ACFS volume is required for Dbvisit installation. ACFS on Windows is deprecated for 19c and de-supported for all further releases by Oracle. In other words the only supported Oracle version from Dbvisit for SEHA configuration is 19c.

In this section, the concepts will be explained using an example. We will demonstrate how to configure Dbvisit on SEHA cluster with sample test environment which consists of following servers:

Primary SEHA Cluster, nodes w19ora19seha3, w19ora19seha4, allocated VIP dbvisit-vip34, shared ACFS volume C:\dbvisit (shared between w19ora19seha3 and w19ora19seha4)

Standby SEHA Cluster, nodes w22ora19seha1, w22ora19seha2, allocated VIP dbvisit-vip12, shared ACFS volume C:\dbvisit (shared between w22ora19seha1 and w22ora19seha2)

Volume C:\dbvisit is not shared between both clusters, it's shared between two nodes on local cluster only (Volume is not shared between primary and standby).

1.1  Different types of Oracle SEHA configurations

Dbvisit Standby MP handles Oracle SEHA deployment similar to Oracle RAC Cluster with few differences. There are two types of possible SEHA cluster configurations:

A. One or more Oracle database instances running on one of the SEHA cluster nodes while the other node hosts are not running any database instances.

Such deployment is supported by Dbvisit Standby MP 11.1 and onwards. In this type of deployment Dbvisit uses cluster resources and shared storage to be able to failover to the other SEHA node.

B. Two or more Oracle database instances running on both SEHA cluster nodes.

This includes configurations where for example Oracle database instance A and B run on SEHA node 1 and database instance C runs on node 2. Such deployment is currently NOT supported by Dbvisit Standby. Dbvisit Standby can be active only on one of the SEHA cluster nodes, not on both.

1.2  Oracle RAC

For deployment to Oracle RAC clusters, follow the same steps as mentioned below. There is only cosmetic difference when creating DDC configuration in the GUI at the end of the process.

Make sure that you’re running supported RAC version as per:

https://dbvisit.atlassian.net/wiki/spaces/DSMP/pages/3238264943/System+Requirements#3.1.--Supported-Oracle-Database-Editions

From 19c onwards, RAC is Enterprise Edition (EE) option only and is not certified with Dbvisit Standby, please contact Dbvisit Support if you wish to deploy Dbvisit to such RAC environment.

1.3  Prerequisites

To deploy Dbvisit Standby on SEHA cluster following prerequisites are needed:

  • New dedicated IP address and hostname for new cluster VIP address. This VIP address will be different from existing cluster VIP addresses. Our suggestion is to use hostname such as dbvisit-vip1 for example.

  • Shared storage between both primary cluster nodes with minimum 15GB free space. Such shared storage can be only provided by ACFS (no support for other methods)

In this guide, we will use shared ACFS storage C:\dbvisit created on primary and standby clusters

C:\Users\Administrator>acfsutil info storage
Diskgroup      Consumer      Space     Size With Mirroring  Usable Free  %Free   Path
ACFS                         19.65              19.65           0.54        2%
                DBVISIT      19.00              19.00          18.22       95%   C:\dbvisit
CRS                           4.99               4.99           4.64       92%
DATA                         39.29              39.29          39.18       99%
FRA                          19.65              19.65          17.88       91%
----
unit of measurement: GB
  • Make sure the Oracle Grid Infrastructure is deployed as per Oracle documentation. The group membership for oracle and grid users needs to be correct. Dbvisit supports cluster role separation (oracle and grid user) as well as simple configuration (oracle user only)

  • Verify that the primary oracle database is SEHA enabled:

C:\Users\Administrator>srvctl config database -d TEST01
Database unique name: TEST01
Database name:
Oracle home: C:\app\oracle\product\19.0.0.0\dbhome_1
Oracle user: dbvisit\oracle
...
Configured nodes: w19ora19seha3,w19ora19seha4
  • In srvctl config output "Configured nodes" needs to contain TWO nodes. If you see only one node, database does not have SEHA feature enabled

  • On both SEHA nodes check that the Windows Registry key HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\KEY_OraDB*Home* has a string value for ORACLE_SID.

Unless otherwise stated all commands in following chapters were executed as “Administrator” user

2.  Dbvisit Software Setup on Primary Cluster

2.1  Creating Dbvisit Dedicated VIP Address

Before starting with Dbvisit Installation we need to create dedicated VIP address mentioned in the "1.3 Prerequisites". In our example the pre-allocated VIP for our SEHA cluster is "172.16.17.253" and we decided to assign DNS name "dbvisit-vip34". To create new VIP address you need to execute:

C:\Users\Administrator>appvipcfg create -network=1 -ip=192.168.18.253 -vipname=dbvisit-vip34 -user=dbvisit\oracle
Using configuration parameter file: C:\app\grid\product\19.0.0.0\gridhome_1\crs\install\crsconfig_params
The log of current session can be found at:
  C:\app\orabase\crsdata\w19ora19seha3\scripts\appvipcfg.log

At this point you should ensure dbvisit-vip34 is correctly resolved by your DNS or create entry in C:\Windows\System32\Drivers\etc\hosts

Verify VIP is correctly created:

C:\Users\Administrator>crsctl status resource dbvisit-vip34
NAME=dbvisit-vip34
TYPE=app.appviptypex2.type
TARGET=OFFLINE
STATE=OFFLINE

C:\Users\Administrator>crsctl start resource dbvisit-vip34
CRS-2672: Attempting to start 'dbvisit-vip34' on 'w19ora19seha3'
CRS-2676: Start of 'dbvisit-vip34' on 'w19ora19seha3' succeeded

2.2  Installing Dbvagentmanager on Primary Cluster

Before starting installation make sure to provision shared ACFS volume to your SEHA cluster. The size needs to be at least 15GB. In this example our shared volume is created as C:\dbvisit

In this section we will highlight only the most important and SEHA related aspects of Dbvisit Installation. For complete guide please refer to:

Installing Standby Multiplatform

We’ll be aiming for Dbvisit configuration as follows:

Nodes

Associated VIP (active only on one SEHA node)

Installed Dbvisit component

w19ora19seha3, w19ora19seha4

dbvisit-vip34

Dbvagentmanager

w22ora19seha1, w22ora19seha2

dbvisit-vip12

Dbvagentmanager, Dbvcontrol

We will first start on primary SEHA cluster. We need first to create directory which will contain Dbvisit installation DBVISIT_BASE:

C:\Users\Administrator>mkdir C:\dbvisit\app

Continue by starting the dbvagentmanager installer and specifying this directory as DBVISIT_BASE (installation file agent-v11.6.0.msi was downloadded to C:\dbvisit\sw):

C:\Users\Administrator>msiexec /i C:\dbvisit\sw\agent-v11.6.0.msi
image-20240111-122750.png

go for next to set passphrase:

image-20240123-122914.png

Choose any passphrase (but remember it) on next page and make sure to install in C:\dbvisit\app:

image-20240123-121412.png

Once installation is completed, edit the dbvagentmanager configruation file and set FileTransferListenAddress to DBVISIT-VIP34.DBVISIT.CZ and save the file

C:\Users\Administrator>notepad C:\dbvisit\app\conf\dbvagentmanager.ini
image-20240111-123452.png

Restart dbvagentmanager service:

C:\Users\Administrator>net stop dbvagentmanager && net start dbvagentmanager
The Dbvisit StandbyMP Agent service is stopping.
The Dbvisit StandbyMP Agent service was stopped successfully.

The Dbvisit StandbyMP Agent service is starting.
The Dbvisit StandbyMP Agent service was started successfully.

set it to manual start mode:

C:\Users\Administrator>sc config dbvagentmanager start=demand
[SC] ChangeServiceConfig SUCCESS

Set the permissions to full control on service dbvagentmanager for “Service Logon User” and “Interactively logged-on user”:

sc sdset dbvagentmanager "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;IU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)"
[SC] SetServiceObjectSecurity SUCCESS

2.3  Creating Cluster Action script for dbvagentmanager

To enable SEHA failover for dbvagentmanager we recommend to integrate them into Oracle Grid by using action script. Here is single action script for dbvagentmanager and for dbvcontrol:

Dbvcontrol will not be installed on primary cluster, but same action script will be used for dbvagentmanager and dbvcontrol on standby cluster.

Upload the script to directory C:\dbvisit\app\bin

cd C:\Temp
cp dbvcrs.bat C:\dbvisit\app\bin

Do NOT change the script name nor script location. If you do, you will have to make on your own adjustments in the script and in the cluster commands.

You need to check that the script is working properly. For checking run on 1st SEHA node:

cd C:\dbvisit\app\bin
C:\dbvisit\app\bin>dbvcrs.bat stop dbvagentmanager
C:\dbvisit\app\bin>dbvcrs.bat check dbvagentmanager
C:\dbvisit\app\bin>dbvcrs.bat start dbvagentmanager
C:\dbvisit\app\bin>dbvcrs.bat check dbvagentmanager
C:\dbvisit\app\bin>dbvcrs.bat clean dbvagentmanager

C:\dbvisit\app\bin>dbvcrs start dbvagentmanager
Starting service dbvagentmanager
The Dbvisit StandbyMP Agent service is starting.
The Dbvisit StandbyMP Agent service was started successfully.

Checking service dbvagentmanager

SERVICE_NAME: dbvagentmanager
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

You need to receive correct output for each command (service is stopped, started etc ..)

2.4  Creating dbvagentmanager service on 2nd SEHA node

On 2nd SEHA node, we need to manually create the Windows service, set it’s startup mode to manual and change password (use an actual password):

C:\Users\Administrator>C:\dbvisit\app\bin\dbvagentmanager service install --user "dbvisit\oracle"
C:\Users\Administrator>sc config dbvagentmanager start=demand
[SC] ChangeServiceConfig SUCCESS
C:\Users\Administrator>sc.exe config dbvagentmanager password= "mysecret"
[SC] ChangeServiceConfig SUCCESS

Set the permissions to full control on service dbvagentmanager for “Service Logon User” and “Interactively logged-on user”:

sc sdset dbvagentmanager "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;IU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)"
[SC] SetServiceObjectSecurity SUCCESS

Do NOT start the service on 2nd node

2.5  Creating dbvagentmanager Cluster Resource

Make sure dbvagentmanager service is stopped on both SEHA nodes. Now we can finally create dbvagentmanager action script and test VIP + dbvagentmanager relocation:

crsctl add resource dbvagentmanager -type generic_application -attr "START_PROGRAM='/dbvisit/app/bin/dbvcrs.bat start dbvagentmanager',STOP_PROGRAM='/dbvisit/app/bin/dbvcrs.bat stop dbvagentmanager',CHECK_PROGRAMS='/dbvisit/app/bin/dbvcrs.bat check dbvagentmanager',CLEAN_PROGRAM='/dbvisit/app/bin/dbvcrs.bat clean dbvagentmanager',CHECK_INTERVAL=10,START_DEPENDENCIES='hard(dbvisit-vip34) pullup(dbvisit-vip34) attraction(dbvisit-vip34)',STOP_DEPENDENCIES='hard(dbvisit-vip34)',PLACEMENT='favored',HOSTING_MEMBERS='w19ora19seha3 w19ora19seha4',ACL='owner:dbvisit\oracle:rwx,pgrp::r-x,other::r--'"

try to startup dbvagentmanager via crsctl and check the service status afterwards (must be RUNNING):

C:\dbvisit\app\bin>crsctl start res dbvagentmanager
CRS-2672: Attempting to start 'dbvagentmanager' on 'w19ora19seha3'
CRS-2676: Start of 'dbvagentmanager' on 'w19ora19seha4' succeeded

C:\dbvisit\app\bin>sc query dbvagentmanager

SERVICE_NAME: dbvagentmanager
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

Test relocation of the VIP address back and forth:

C:\dbvisit\app\bin>crsctl relocate resource dbvisit-vip34 -f
CRS-2673: Attempting to stop 'dbvagentmanager' on 'w19ora19seha3'
CRS-2677: Stop of 'dbvagentmanager' on 'w19ora19seha3' succeeded
CRS-2673: Attempting to stop 'dbvisit-vip34' on 'w19ora19seha3'
CRS-2677: Stop of 'dbvisit-vip34' on 'w19ora19seha3' succeeded
CRS-2672: Attempting to start 'dbvisit-vip34' on 'w19ora19seha4'
CRS-2676: Start of 'dbvisit-vip34' on 'w19ora19seha4' succeeded
CRS-2672: Attempting to start 'dbvagentmanager' on 'w19ora19seha4'
CRS-2676: Start of 'dbvagentmanager' on 'w19ora19seha4' succeeded

C:\dbvisit\app\bin>crsctl relocate resource dbvisit-vip34 -f
CRS-2673: Attempting to stop 'dbvagentmanager' on 'w19ora19seha4'
CRS-2677: Stop of 'dbvagentmanager' on 'w19ora19seha4' succeeded
CRS-2673: Attempting to stop 'dbvisit-vip34' on 'w19ora19seha4'
CRS-2677: Stop of 'dbvisit-vip34' on 'w19ora19seha4' succeeded
CRS-2672: Attempting to start 'dbvisit-vip34' on 'w19ora19seha3'
CRS-2676: Start of 'dbvisit-vip34' on 'w19ora19seha3' succeeded
CRS-2672: Attempting to start 'dbvagentmanager' on 'w19ora19seha3'
CRS-2676: Start of 'dbvagentmanager' on 'w19ora19seha3' succeeded

After each relocation of VIP address, check that dbvagentmanager service is running on that respective node and that it’s stopped on the other node. 

This step concludes the installation and setup of Dbvisit on primary SEHA cluster

3.  Dbvisit Software Setup on Standby Cluster

3.1  Creating Dbvisit Dedicated VIP Address

Same as on primary SEHA cluster, Before starting with Dbvisit Installation we need to create dedicated VIP address mentioned in the "1.3 Prerequisites". Our pre-allocated VIP for our standby SEHA cluster is "172.16.17.254" and we decided to assign DNS name "dbvisit-vip12". To create new VIP address you need to execute:

C:\Users\Administrator>appvipcfg create -network=1 -ip=192.168.18.254 -vipname=dbvisit-vip12 -user=dbvisit\oracle
Using configuration parameter file: C:\app\grid\product\19.3.0.0\gridhome_1\crs\install\crsconfig_params
The log of current session can be found at:
  C:\app\orabase\crsdata\w22ora19seha1\scripts\appvipcfg.log

At this point you should ensure dbvisit-vip12 is correctly resolved by your DNS or create entry in C:\Windows\System32\Drivers\etc\hosts

Verify VIP is correctly created:

C:\Users\Administrator>crsctl status resource dbvisit-vip12
NAME=dbvisit-vip12
TYPE=app.appviptypex2.type
TARGET=OFFLINE
STATE=OFFLINE

C:\Users\Administrator>crsctl start resource dbvisit-vip12
CRS-2672: Attempting to start 'dbvisit-vip12' on 'w22ora19seha1'
CRS-2676: Start of 'dbvisit-vip12' on 'w22ora19seha1' succeeded

3.2  Installing Dbvagentmanager on Standby Cluster

Installation of Dbvisit software on standby cluster is completely the same as on primary - the only difference is that we’ll install dbvcontrol component in addition to dbvamanager. We need first to create directory which will contain Dbvisit installation DBVISIT_BASE:

C:\Users\Administrator>mkdir C:\dbvisit\app

Continue by starting the dbvagentmanager installer and specifying this directory as DBVISIT_BASE (installation file agent-v11.6.0.msi was downloadded to C:\dbvisit\sw):

C:\Users\Administrator>msiexec /i C:\dbvisit\sw\agent-v11.6.0.msi
image-20240124-120509.png

go for next to set passphrase:

image-20240123-122914.png

Use same passphrase as on primary cluster, then on next page make sure to install in C:\dbvisit\app:

image-20240123-122211.png

Once installation is completed, edit the dbvagentmanager configruation file and set FileTransferListenAddress to DBVISIT-VIP12.DBVISIT.CZ and save the file

C:\Users\Administrator>notepad C:\dbvisit\app\conf\dbvagentmanager.ini
image-20240124-115636.png

Restart dbvagentmanager service:

C:\Users\Administrator>net stop dbvagentmanager && net start dbvagentmanager
The Dbvisit StandbyMP Agent service is stopping.
The Dbvisit StandbyMP Agent service was stopped successfully.

The Dbvisit StandbyMP Agent service is starting.
The Dbvisit StandbyMP Agent service was started successfully.

set it to manual start mode:

C:\Users\Administrator>sc config dbvagentmanager start=demand
[SC] ChangeServiceConfig SUCCESS

Set the permissions to full control on service dbvagentmanager for “Service Logon User” and “Interactively logged-on user”:

sc sdset dbvagentmanager "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;IU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)"
[SC] SetServiceObjectSecurity SUCCESS

3.3  Installing Dbvcontrol on Standby Cluster

You can skip this chapter if you will deploy controlcenter elsewhere.

Start dbvcontrol installation:

C:\Users\Administrator>msiexec /i C:\dbvisit\sw\control-center-v11.6.0.msi

There’s nothing to change throughout the whole installer except the passphrase - use the same passphrase as before:

image-20240123-122914.png

And make sure to install in C:\dbvisit\app:

image-20240123-123156.png

Once installation is completed, edit the dbvagentmanager configruation file and set FileTransferListenAddress to DBVISIT-VIP12.DBVISIT.CZ and save the file

C:\Users\Administrator>notepad C:\dbvisit\app\conf\dbvcontrol.ini
image-20240124-115723.png

Set all three properties to DBVISIT-VIP12.DBVISIT.CZ

Restart dbvcontrol service:

C:\dbvisit\app\bin>sc config dbvcontrol obj="dbvisit\oracle"
[SC] ChangeServiceConfig SUCCESS

C:\Users\Administrator>sc.exe config dbvcontrol password= "mysecret"
[SC] ChangeServiceConfig SUCCESS

C:\Users\Administrator>net stop dbvcontrol && net start dbvcontrol
The Dbvisit StandbyMP Control Center service is stopping.
The Dbvisit StandbyMP Control Center service was stopped successfully.
The Dbvisit StandbyMP Control Center service is starting.
The Dbvisit StandbyMP Control Center service was started successfully.

set it to manual start mode:

C:\Users\Administrator>sc config dbvcontrol start=demand
[SC] ChangeServiceConfig SUCCESS

Set the permissions to full control on service dbvcontrol for “Service Logon User” and “Interactively logged-on user”:

sc sdset dbvcontrol "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;IU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)"

3.4  Creating Cluster Action Script for dbvagentmanager and dbvcontrol

We will use the exactly the same action script as on primary cluster. Download from sectio 2.3  Creating Cluster Action script for dbvagentmanager and copy it into C:\dbvisit\app\bin on standby cluster.

cd C:\Temp
cp dbvcrs.bat C:\dbvisit\app\bin

Do NOT change the script name nor script location. If you do, you will have to make on your own adjustments in the script and in the cluster commands.

Action script will be the same regardless whether you installed dbvcontrol or not

You need to check that the script is working properly. For checking run on 1st SEHA node:

cd C:\dbvisit\app\bin
C:\dbvisit\app\bin>dbvcrs.bat stop dbvagentmanager
C:\dbvisit\app\bin>dbvcrs.bat check dbvagentmanager
C:\dbvisit\app\bin>dbvcrs.bat start dbvagentmanager
C:\dbvisit\app\bin>dbvcrs.bat check dbvagentmanager
C:\dbvisit\app\bin>dbvcrs.bat clean dbvagentmanager

C:\dbvisit\app\bin>dbvcrs start dbvagentmanager
Starting service dbvagentmanager
The Dbvisit StandbyMP Agent service is starting.
The Dbvisit StandbyMP Agent service was started successfully.

Checking service dbvagentmanager

SERVICE_NAME: dbvagentmanager
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

You need to receive correct output for each command (service is stopped, started etc ..) - do the same for dbvcontrol

3.5  Creating dbvagentmanager and dbvcontrol service on 2nd SEHA node

On 2nd SEHA node, we need to manually create the Windows service, set it’s startup mode to manual and change password (use an actual password):

C:\Users\Administrator>C:\dbvisit\app\bin\dbvagentmanager service install --user "dbvisit\oracle"
C:\Users\Administrator>sc config dbvagentmanager start=demand
[SC] ChangeServiceConfig SUCCESS
C:\Users\Administrator>sc.exe config dbvagentmanager password= "mysecret"
[SC] ChangeServiceConfig SUCCESS

Set the permissions to full control on service dbvagentmanager for “Service Logon User” and “Interactively logged-on user”:

sc sdset dbvagentmanager "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;IU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)"
[SC] SetServiceObjectSecurity SUCCESS

If you installed dbvcontrol as well, continue to perform same steps for dbvcontrol:

C:\Users\Administrator>C:\dbvisit\app\bin\dbvcontrol service install --user "dbvisit\oracle"
C:\Users\Administrator>sc config dbvcontrol start=demand
[SC] ChangeServiceConfig SUCCESS
C:\Users\Administrator>sc.exe config dbvcontrol password= "mysecret"
[SC] ChangeServiceConfig SUCCESS

Set the permissions to full control on service dbvcontrol for “Service Logon User” and “Interactively logged-on user”:

sc sdset dbvcontrol "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;IU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)"
[SC] SetServiceObjectSecurity SUCCESS

Do NOT start the services on the 2nd node

3.6  Creating dbvagentmanager and dbvcontrol Cluster Resources

Skip the dbvcontrol part is dbvcontrol isn’t installed. Make sure dbvagentmanager service is stopped on both SEHA nodes. Now we can finally create dbvagentmanager action script and test VIP + dbvagentmanager relocation:

crsctl add resource dbvagentmanager -type generic_application -attr "START_PROGRAM='/dbvisit/app/bin/dbvcrs.bat start dbvagentmanager',STOP_PROGRAM='/dbvisit/app/bin/dbvcrs.bat stop dbvagentmanager',CHECK_PROGRAMS='/dbvisit/app/bin/dbvcrs.bat check dbvagentmanager',CLEAN_PROGRAM='/dbvisit/app/bin/dbvcrs.bat clean dbvagentmanager',CHECK_INTERVAL=10,START_DEPENDENCIES='hard(dbvisit-vip12) pullup(dbvisit-vip12) attraction(dbvisit-vip12)',STOP_DEPENDENCIES='hard(dbvisit-vip12)',PLACEMENT='favored',HOSTING_MEMBERS='w22ora19seha1 w22ora19seha2',ACL='owner:dbvisit\oracle:rwx,pgrp::r-x,other::r--'"

try to startup dbvagentmanager via crsctl and verify the service status (must be RUNNING):

C:\dbvisit\app\bin>crsctl start res dbvagentmanager

C:\dbvisit\app\bin>crsctl start res dbvagentmanager
CRS-2672: Attempting to start 'dbvagentmanager' on 'w22ora19seha1'
CRS-2676: Start of 'dbvagentmanager' on 'w22ora19seha1' succeeded

C:\dbvisit\app\bin>sc query dbvagentmanager

SERVICE_NAME: dbvagentmanager
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

Add the dbvcontrol resource:

crsctl add resource dbvcontrol -type generic_application -attr "START_PROGRAM='/dbvisit/app/bin/dbvcrs.bat start dbvcontrol',STOP_PROGRAM='/dbvisit/app/bin/dbvcrs.bat stop dbvcontrol',CHECK_PROGRAMS='/dbvisit/app/bin/dbvcrs.bat check dbvcontrol',CLEAN_PROGRAM='/dbvisit/app/bin/dbvcrs.bat clean dbvcontrol',CHECK_INTERVAL=10,START_DEPENDENCIES='hard(dbvisit-vip12) pullup(dbvisit-vip12) attraction(dbvisit-vip12)',STOP_DEPENDENCIES='hard(dbvisit-vip12)',PLACEMENT='favored',HOSTING_MEMBERS='w22ora19seha1 w22ora19seha2',ACL='owner:dbvisit\oracle:rwx,pgrp::r-x,other::r--'"

try to startup dbvcontrol via crsctl and verify the service status (must be RUNNING):

C:\dbvisit\app\bin>crsctl start res dbvcontrol
CRS-2672: Attempting to start 'dbvcontrol' on 'w22ora19seha1'
CRS-2676: Start of 'dbvcontrol' on 'w22ora19seha1' succeeded

C:\dbvisit\app\bin>sc query dbvcontrol

SERVICE_NAME: dbvcontrol
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

Test relocation of the VIP address back and forth:

C:\dbvisit\app\bin>crsctl relocate resource dbvisit-vip12 -f
CRS-2673: Attempting to stop 'dbvagentmanager' on 'w22ora19seha1'
CRS-2673: Attempting to stop 'dbvcontrol' on 'w22ora19seha1'
CRS-2677: Stop of 'dbvcontrol' on 'w22ora19seha1' succeeded
CRS-2677: Stop of 'dbvagentmanager' on 'w22ora19seha1' succeeded
CRS-2673: Attempting to stop 'dbvisit-vip12' on 'w22ora19seha1'
CRS-2677: Stop of 'dbvisit-vip12' on 'w22ora19seha1' succeeded
CRS-2672: Attempting to start 'dbvisit-vip12' on 'w22ora19seha2'
CRS-2676: Start of 'dbvisit-vip12' on 'w22ora19seha2' succeeded
CRS-2672: Attempting to start 'dbvagentmanager' on 'w22ora19seha2'
CRS-2676: Start of 'dbvagentmanager' on 'w22ora19seha2' succeeded
CRS-2672: Attempting to start 'dbvcontrol' on 'w22ora19seha2'
CRS-2676: Start of 'dbvcontrol' on 'w22ora19seha2' succeeded

C:\dbvisit\app\bin>crsctl relocate resource dbvisit-vip12 -f
CRS-2673: Attempting to stop 'dbvagentmanager' on 'w22ora19seha2'
CRS-2673: Attempting to stop 'dbvcontrol' on 'w22ora19seha2'
CRS-2677: Stop of 'dbvagentmanager' on 'w22ora19seha2' succeeded
CRS-2677: Stop of 'dbvcontrol' on 'w22ora19seha2' succeeded
CRS-2673: Attempting to stop 'dbvisit-vip12' on 'w22ora19seha2'
CRS-2677: Stop of 'dbvisit-vip12' on 'w22ora19seha2' succeeded
CRS-2672: Attempting to start 'dbvisit-vip12' on 'w22ora19seha1'
CRS-2676: Start of 'dbvisit-vip12' on 'w22ora19seha1' succeeded
CRS-2672: Attempting to start 'dbvagentmanager' on 'w22ora19seha1'
CRS-2676: Start of 'dbvagentmanager' on 'w22ora19seha1' succeeded
CRS-2672: Attempting to start 'dbvcontrol' on 'w22ora19seha1'
CRS-2676: Start of 'dbvcontrol' on 'w22ora19seha1' succeeded

After each relocation of VIP address, check that dbvagentmanager and dbvcontrol service is running on that respective node and that it’s stopped on the other node. 

This step concludes the installation and setup of Dbvisit on standby SEHA cluster

4.  Creating Dbvisit Database Configuration (DDC) with GUI

In our example we use Dbvcontrol Center on standby SEHA cluster w22ora19seha1 and w22ora19seha2. You can install Dbvcontrol Center there or on any other machine separated from SEHA clusters.

Prerequisites:

  • You need to manually modify privileges for user which runs dbvagentmanager service to Windows registry:

image-20240124-131004.png

In our case, dbvagentmanager is run by domain account dbvisit\oracle so we need to add him to two Registry Keys: “Oracle” (HKEY_LOCAL_MACHINE\SOFTWARE\Oracle) and “KEY_OraDB19Home1” (HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\KEY_OraDB19Home1). The privileges needed are “Full Control”

  • Make sure the key “KEY_OraDB19Home1” contains value “ORACLE_SID”

image-20240124-131413.png

Once done, proceed with standby database creation.

To start, logon to the GUI. Below are the screenshots showing you how you can use them to create the New Oracle database configuration

You will need to do these steps on all primary and standby SEHA nodes (4 in total)

Step 1:  Open Main Screen, navigate to New Configuration click (1)

image-20240124-112224.png

Step 2:  Choose (1) the Primary host dbvisit-vip34 from the discovered host list:

image-20240124-131538.png

Step 3: Select the Source database Instance name (in this example TEST01):

image-20240124-131642.png

Step 4:  Next step is to select the Standby Host, in this example DBVISIT-VIP12

image-20240124-132045.png

Step 5.1:

Once the Primary and Standby hosts are selected you will be presented with the SEHA cluster(s) details. make sure to correctly enter all SEHA cluster details (nodenames and ASM instances).

You need to enter node names EXACTLY as they are stored in Clusterware Registry (OCR). Don’t use IP addresses. For example run as grid “crsctl check cluster -all” to see node names

Make sure the option “Do you want to setup SEHA environment for Your destination Database” is selected if your standby is SEHA as well.

image-20240124-132301.png

If wish to create standby database on ACFS storage, don’t fill in any ASM Instance name on standby, simply leave empty

Step 5.2:

Continue to fill in the required details. Make sure to correctly set ARCHSOURCE (1) and ARCHDEST (2) - they should be ideally same directory and exist on primary & standby.

Archsource and Archdest are Dbvisit archivelog temporary staging directories which must be never set to any database-related directory (like FRA etc ..). This directory also must not contain any subdirectories. On primary server this directory won’t contain any permanent files. On standby it will hold all transferred archivelogs.

image-20240124-133709.png

Continue changing the rest of the details if needed. In our example we left everything to suggested values:

  • Standby Oracle SID

  • Oracle Database Home on the Standby server

  • DB Unique Name (db_unique_name) of the standby if required

  • Dbvisit Base location on the Standby server if different

Finalize by setting DDC name, license key and click on “Create Configuration”:

image-20240124-133908.png

6.  Setup Disaster Recovery Database

Once the configuration is created you can create SEHA standby database.

To create standby database, Dbvisit uses RMAN compressed backup by default. On Windows this can mean significant time consumption. If you have enough disk space we recommend to disable the RMAN compression before proceeding as displayed on following picture:

image-20240125-141448.png

On both standby nodes create manually oracle service:

C:\Users\Administrator>oradim -NEW -SID TEST01 -STARTMODE manual
Instance created.

On primary and standby cluster nodes assign full control privileges to user who runs Dbvisit service (in this example dbvisit\oracle) on directory %ORACLE_HOME\database%

Step 1:  Navigate to the DASHBOARD and click on Set up now

image-20240124-134836.png

Step 2: Select Yes, to register your standby database with Clusterware if applicable.

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.

image-20240125-143045.png

never choose drive root (for example E:\) as backup location, because there will be issues.

Step 3: skip these fields and leave blank as we did create services manually previously:

image-20240125-145847.png

Step 4: Review the parameters and make sure the locations of the datafiles, redo logs and spfile exist on the Standby server

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.

image-20240125-150006.png

Choose options (1) and (2) to automatically enable the scheduling and Observer once the Standby database is Created. Optionally ceate template from your choices (3) and finally, click on “Create standby dabase” (4).

image-20240125-150126.png

Step 3: A job will appear in the taskbar, wait until it completes

image-20240201-144437.png

Check the task result and make sure the standby database is correctly configured:

C:\Users\Administrator>srvctl config database -d TEST01
Database unique name: TEST01
Database name:
Oracle home: C:\app\oracle\product\19.3.0.0\dbhome_1
Oracle user: nt authority\system
Spfile: +DATA/TEST01/parameterfile/spfiletest01.ora
Password file: +DATA/TEST01/password/PWDTEST01.ORA
Domain:
Start options: mount
Stop options: abort
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: FRA,DATA
Mount point paths:
Services:
Type: SINGLE
Database instance: TEST01
Configured nodes: w22ora19seha1,w22ora19seha2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed

6. Perform Graceful Switchover

Primary Server: dbvisit-vip12

Standby Server dbvisit-vip23

Please refer the below link for the pre-requisites steps to be performed before switchover.

Oracle: Graceful Switchover

Step 1: Navigate to DASHBOARD, click on the TEST01 (1) configuration and Select Graceful switchover (2), wait for prechecks to complete and select start (3)

image-20240201-153030.png

Step 2: Primary and Standby server roles are swapped

image-20240202-074810.png

Step 3: Switchback:

image-20240202-094131.png

7.  Summary

Standby cluster now hosts SEHA standby database which is also registered within OCR. you can check by executing the command below on primary and standby cluster:

C:\Users\Administrator>srvctl config database -d TEST01
Database unique name: TEST01
Database name:
Oracle home: C:\app\oracle\product\19.0.0.0\dbhome_1
Oracle user: dbvisit\oracle
Spfile: +DATA/TEST01/parameterfile/spfiletest01.ora
Password file: +DATA/TEST01/password/PWDTEST01.ORA
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA,FRA
Mount point paths:
Services:
Type: SINGLE
Database instance: TEST01
Configured nodes: w19ora19seha3,w19ora19seha4
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed

“Configured nodes” attribute needs to contain two cluster nodes otehrwise the database isn’t SEHA enabled. “Start options” and “Stop options” are always different for primary and standby database. “Database role” is always PRIMARY for primary and standby database.

  • You’re able to failover primary or standby SEHA database by running srvctl relocate database -d TEST01 -node <nodename>

  • There’s no dependency between Dbvisit VIP and SEHA database, so if you manually relocate SEHA database, you also have to manually relocate Dbvisit VIP: crsctl relocate resource dbvisit-vip12 -f

  • In case when node where SEHA database and Dbvisit VIP run wil fail, gets rebooted, SEHA database as well as Dbvisit VIP will get failed over to the second node automatically

  • No labels