When the disaster strikes and the primary database is no longer available, the standby database must be activated and brought online for the users to connect and the application to point to the Activated DR database. The instructions are similar to Oracle Activation
The steps to activate the standby database are:
A. Change the network configuration (or DNS) so that users will connect to the standby database (or server) instead of the primary database (or server).
B. Activate and bring the standby database online for normal operation as per the instructions below.
As soon as the standby database is activated, it becomes the new primary database and can be used by your application. As with Oracle, Failover is irreversible operation.
1. Standby Database Activation
Standby database activation can be performed from dbvcontrol GUI and from CLI. Activation performs actions only on standby server, primary server availability is not relevant to Activation procedure.
1.1 Activating from Dbvcontrol GUI
Standby database can be activated by selecting Activate Standby in the right ACTIONS pane:
Following page is straightforward, you have and option to select user scripts for execution after failover (1) (more details on User Scripts ) and initiate activation (2):
Once the activation task is started, you will be able to see it in the taskbar and view its details:
Configuration will be afterwards put into “IN FAILOVER STATE” and the server roles will be reversed:
1.2 Activating with dbvagentmanager CLI
If dbvcontrol isn’t accessible for any reason, it’s also possible to activate standby database directly on standby server using dbvcli.
dbvagentmanager service must be started and running on standby server
To activate standby database via dbvcli, execute following commands on standby server:
cd "C:\Program Files\Dbvisit\standbymp\bin" dbvcli.exe activate -d AdventureWorks2019
Where the parameter for “-d” switch is the configuration name (which is same as database name) you want to activate.
Example output:
2. Recovering from Standby Database Activation
Recovering from SQL Server Standby Database Failover has following high level steps:
Delete the old primary database
Modify the configuration in dbvcontrol
Create Standby database
Perform Graceful Switchover
The starting point is that our configuration is in failover state and we have our old primary server back:
We will need to delete our old primary database. For this purpose, we can use SQL Server Management Studio, for example:
Note and doublecheck that you’re connected to your old primary server. Once the database is deleted, the dashboard will sho following information:
We will now be able to change the configuration by clicking on “Recover From Failover” in the ACTIONS pane:
Afterwards, our configuration in the dashboard will be ready for create standby database process:
Run create standby database process as per: Create SQL Server Standby Database
Once standby database is created, the log shipping will now be hapenning in the opposite direction as before the failover:
The very last step is to initiate graceful switchover as per: SQL Server Switchover
After Switchover completes, the configuration is in the same state as it was before activation:
Comments