Quantcast
Channel: Practical 365
Viewing all articles
Browse latest Browse all 515

Get-MailboxDatabaseCopyStatus Displays Incorrect Activation Preference Value

$
0
0

Current builds of Exchange Server 2013 (which is up to CU6 at this time) have a bug in the Get-MailboxDatabaseCopy cmdlet that may cause an incorrect value to be returned for the activation preference of a database copy.

The bug is harmless to the operation of the database availability group (it will still use the correct activation preference values), but if you’re relying on Get-MailboxDatabaseCopy to return those values in a script, or just during general admin, then you may be misled by the bug.

Here’s an example. In this case I’ve used Set-MailboxDatabaseCopy to set each copy of the database DB02 to an activation preference of 4.

[PS] C:\>Set-MailboxDatabaseCopy DB02\MELEX1 -ActivationPreference 4
[PS] C:\>Set-MailboxDatabaseCopy DB02\MELEX2 -ActivationPreference 4
[PS] C:\>Set-MailboxDatabaseCopy DB02\SYDEX1 -ActivationPreference 4
[PS] C:\>Set-MailboxDatabaseCopy DB02\SYDEX2 -ActivationPreference 4

There are no warnings or other indications that it isn’t working, and Get-MailboxDatabaseCopyStatus shows me a result like this.

[PS] C:\>Get-MailboxDatabaseCopyStatus DB02 | select name,status,activationpreference | ft -auto
Name         Status ActivationPreference
----         ------ --------------------
DB02\MELEX1 Healthy                    4
DB02\MELEX2 Healthy                    4
DB02\SYDEX2 Mounted                    4
DB02\SYDEX1 Healthy                    4

Activation preference values are unique for each copy of a database, you can’t have an AP of 4 for every copy. And in this case I don’t, it is just the bug in the cmdlet.

If I use Get-MailboxDatabase to query the AP instead I see the correct values.

[PS] C:\>Get-MailboxDatabase DB02 | Select -expandproperty:ActivationPreference
Key    Value
---    -----
SYDEX2     1
MELEX1     2
MELEX2     3
SYDEX1     4

And if I use the RedistributeActiveDatabases.ps1 script to rebalance the DAG it uses the correct AP values in doing so (truncated output here just to demonstrate the point).

-----------------------
Starting Database Moves
-----------------------
Considering move of 'DB02' from 'SYDEX2' (AP = 3) to 'MELEX1' (AP = 1)...
Database 'DB02' successfully moved from 'SYDEX2' to 'melex1'.
ServerName ActiveDbs PassiveDbs
---------- --------- ----------
MELEX1             2          2
MELEX2             1          3
SYDEX1             1          3
SYDEX2             0          4 `n
----------------
Summary of Moves
----------------
Successfully moved      : 1
Moved to less preferred : 0
Failed to move          : 0
Not moved               : 3
DbName                    : DB02
ActiveOnPreferenceAtStart : 3
ActiveServerAtStart       : SYDEX2
ActiveOnPreferenceAtEnd   : 1
ActiveServerAtEnd         : melex1
IsOnMostPreferredCopy     : True
MoveStatus                : MoveSucceeded

We can expect a fix for this bug in a future update, most likely Cumulative Update 8 at the earliest. It isn’t a serious issue, as long as you’re aware of it and use the Get-MailboxDatabase cmdlet to verify your AP values are correct.

Thanks to Abram Jackson from the Microsoft Exchange PG for confirming this bug and providing the workaround.


This article Get-MailboxDatabaseCopyStatus Displays Incorrect Activation Preference Value is © 2014 ExchangeServerPro.com

Get more Exchange Server tips at ExchangeServerPro.com

     

Viewing all articles
Browse latest Browse all 515

Trending Articles