How to Activate the Database Copy on another Exchange Server?
With Microsoft’s Exchange Server, you get a feature called the Database Availability Group (DAG) that allows high availability for your Exchange Server. It provides database-level recovery in case of server or network failure and any faults that may arise.
In such setups, you would have an active copy of database on one server and a passive copy on another server and a constant replication between the two copies.
In case of maintenance or any issue, you can run a process called a database switchover. This involves dismounting the current active database from the main server and mounting the database on the secondary server and set it as active. This process will activate the mailbox database and all users will automatically and seamlessly work on the second server. In case of a server failure, this is done automatically.
Things to know before performing a switchover
- - The estimated time for this to finish is one minute, depending on the size of the databases and performance of the servers.
- - Have access to the Exchange Admin Center (EAC) or the **Exchange Management Shell (EMS) **with the right permissions set. You need to be in the Organization Management and Database Availability Groups to perform the switchover, and in the Database Copies to have the right permissions on the databases.
For manual switchover, you can use the interface (EAC) or PowerShell.
To perform switchover using the Exchange Admin Center (EAC), follow the below process.
After logging in the system with the right credentials, click on Servers and then click on Databases.
In the list, you will have all the databases in your Exchange Server environment. Click on the database you want to activate the copy of. In the Details pane, where you will find the Database Copies, click on Activate. Then click Yes to Active the copy.
To use the PowerShell, you need to open the Exchange Management Shell (EMS) with the right user and run the Move-ActiveMailboxDatabase command.
Move-ActiveMailboxDatabase <database name> -ActivateOnServer <destination server> -MountDialOverride:None
The above command will set the passive copy as an active one. Since we added the Manual Dial Override parament with none, the Exchange server will auto mount the database as it finds it fit. If we set the parameter to Good Availability, the database auto mount dial setting will be done using the good availability method.
Move-ActiveMailboxDatabase <database name> -ActivateOnServer <destination server> -MountDialOverride:GoodAvailability
If the MountDialOverride is not specified (see the example below), it will mount the database auto mount dial setting as Lossless.
Move-ActiveMailboxDatabase <database name> -ActivateOnServer <destination server>
With the Exchange Admin Center (EAC), the limitation is that you can activate one database at a time. But in PowerShell, you can set the command for all databases to be active on the passive server.
Move-ActiveMailboxDatabase -Server <destination server>
To verify if the move is successful and the databases are mounted, you can use the below command.
Get-MailboxDatabaseCopyStatus <DatabaseCopyName> | Format-List
In case a disaster strikes and you are unable to activate the database copy on another Exchange Server, you end up with an inaccessible database. In such a case, the option is to use the ESEUtil to perform soft recovery on the database. If this doesn’t work, you can run hard recovery. However, the problem with hard recovery is that you will end up with data loss as it purges anything which is deemed corrupted. This doesn’t mean that after running ESEUtil your database would mount.
You would say that there is no problem in that as you can restore from the latest backup. Yes, that would be a solution, but you would still lose the data which is added between the last backup and when the issue occurred.