How to install FREE Let's Encrypt certificate in Exchange Server? After configuring the internal and…
Change DAG database activation preference
You like to change the DAG database activation preference on the Exchange Server. In this article, you will learn how to change the database activation preference. We will be using PowerShell.
Table of contents
Get current DAG database activation preference
Get the database activation preference of all the databases on the Exchange Server. Run Exchange Management Shell and run the following command.
[PS] C:\>Get-MailboxDatabase | Format-Table Server, DatabaseCopies, ActivationPreference
Server DatabaseCopies ActivationPreference
------ -------------- --------------------
EX01 {DB3\EX02, DB3\EX01} {[EX02, 1], [EX01, 2]}
EX02 {DB1\EX01, DB1\EX02} {[EX01, 1], [EX02, 2]}
EX01 {DB6\EX02, DB6\EX01} {[EX02, 1], [EX01, 2]}
EX01 {DB9\EX02, DB9\EX01} {[EX02, 1], [EX01, 2]}
EX01 {DB5\EX02, DB5\EX01} {[EX02, 1], [EX01, 2]}
EX01 {DB4\EX02, DB4\EX01} {[EX02, 1], [EX01, 2]}
You can run the command against a particular database. It will give you the activation preference of that particular database. For example, database DB1.
[PS] C:\>Get-MailboxDatabase "DB1" | Format-Table Server, DatabaseCopies, ActivationPreference
Server DatabaseCopies ActivationPreference
------ -------------- --------------------
EX02 {DB1\EX01, DB1\EX02} {[EX01, 1], [EX02, 2]}
Now that we know the current activation preference of the database DB1. We can proceed further to change its preference.
Which order of database activation preference
We would like to change the activation preference of the database DB1. Database DB1 activation preference is currently set as follows:
- Exchange Server EX01 as preference 1
- Exchange Server EX02 as preference 2
The change of the database activation preference should be set as follows:
- Exchange Server EX01 as preference 2
- Exchange Server EX02 as preference 1
Change database activation preference
Run Exchange Management Shell as administrator. Run the following command to change Exchange Server EX02 to activation preference 1.
[PS] C:\>Set-MailboxDatabaseCopy -Identity "DB1\EX02" -ActivationPreference 1
After running the command, we need to do a check. In this check, we can tell if the activation preference changed.
Confirm database activation preference change
Make sure that the configuration applied.
[PS] C:\>Get-MailboxDatabase "DB1" | Format-Table Server, DatabaseCopies, ActivationPreference
Server DatabaseCopies ActivationPreference
------ -------------- --------------------
EX01 {DB1\EX02, DB1\EX01} {[EX02, 1], [EX01, 2]}
The database DB1 activation preference is successful changed.
Read more: Create DAG Exchange Server step by step »
Thoughts
It’s great that we can change the DAG database activation preference using PowerShell. If you enjoyed this article, you may also like DAG activation preference behavior change in Exchange 2016 CU2. Don’t forget to follow us and share this article.
This Post Has 0 Comments