• Exchange 2010: HomeMTA and msExchHomeServerName are not updated on mailboxes.

    In Exchange 2003 and Exchange 2007 when clients would attempt to connect to a mailbox it would be based on the server where that mailbox was homed.   Specifically these attributes would contain information about the server where a particular mailbox was homed:

     

    • HomeMTA
    • msExchHomeServerName

     

    In Exchange 2010 a mailbox object is no longer associated with a server but rather is associated with a database.  A database has copies which are associated with a particular server.  When a client or application attempts to access the mailbox, the active manager process is responsible for locating the server that hosts the active copy of the database and referring mailbox requests to that server.  Although not utilized, the Exchange 2010 mailbox provisioning process still stamps HomeMTA and msExchHomeServerName.  In this case the attributes are stamped based on the server where the database copy was active at the time the mailbox was provisioned. 

     

    Management commandlets like get-mailbox will return the server name stamped in msExchHomeServer.  In many cases this is a valid server within the environment.  In some instances, the server mentioned has been decommissioned and is no longer available.  Although this server name is displayed this is not an issue.   There should be no reason that administrators need to update these values as they are not utilized in Exchange 2010.

     

    ===================================================

     

    [PS] C:\Windows\system32>Get-Mailbox Tim

    Name                      Alias                ServerName       ProhibitSendQuota
    ----                      -----                ----------       -----------------
    Timothy J. McMichael      Tim                  dag-4            unlimited

    homeMTA: CN=Microsoft MTA,CN=DAG-4,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC=com;

    msExchHomeServerName: /o=Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=DAG-4;

     

    ===================================================

    ===================================================

    10/2/2011

    Updated second paragraph where I referenced homeMDB instead of homeMTA.

    ===================================================

  • Exchange 2013 Cumulative Update 2 – Where are my databases?

    In Exchange Server 2013 Cumulative Update 2 (CU2) we introduced support for a maximum of 100 mounted mailbox databases per server (active or passive) when an Enterprise Edition license is applied.  This was an increase from Exchange Server 2013 RTM and Exchange Server 2013 Cumulative Update 1 (CU1).

     

    It has been recently discovered that when updating to CU2 from Exchange Server 2013 RTM or Exchange Server 2013 CU1, the database limit is not increased to 100. This results in the inability to mount more than 50 databases on a server running the Enterprise Edition of Exchange Server 2013. When installing Exchange Server 2013 CU2 directly, the database limit is applied correctly.

     

    The Core Problem

     

    In this example, I deployed a new install of Exchange Server 2013 CU1 on Windows Server 2012 (although, the operating system doesn’t matter here). After the Setup completed, I performing an LDP dump of the information store object, and noted a database limit of 5.

     

    Expanding base 'CN=InformationStore,CN=TEST-MBX-0,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=EXCHANGE,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=exchange,DC=msft'...
    Getting 1 entries:
    Dn: CN=InformationStore,CN=TEST-MBX-0,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=EXCHANGE,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=exchange,DC=msft
    adminDisplayName: InformationStore;
    cn: InformationStore;
    distinguishedName: CN=InformationStore,CN=TEST-MBX-0,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=EXCHANGE,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=exchange,DC=msft;
    dSCorePropagationData: 0x0 = (  );
    instanceType: 0x4 = ( WRITE );
    msExchESEParamCircularLog: 0;
    msExchESEParamCommitDefault: 0;
    msExchESEParamDbExtensionSize: 256;
    msExchESEParamEnableIndexChecking: TRUE;
    msExchESEParamEnableOnlineDefrag: TRUE;
    msExchESEParamLogFileSize: 5120;
    msExchESEParamPageFragment: 8;
    msExchESEParamPageTempDBMin: 0;
    msExchESEParamZeroDatabaseDuringBackup: 0;
    msExchMaxRestoreStorageGroups: 1;
    msExchMaxStorageGroups: 5;
    msExchMaxStoresPerGroup: 5;
    msExchMaxStoresTotal: 5;

    name: InformationStore;
    objectCategory: CN=ms-Exch-Information-Store,CN=Schema,CN=Configuration,DC=exchange,DC=msft;
    objectClass (3): top; container; msExchInformationStore;
    objectGUID: 52c2fc98-b8b4-4d33-b35b-ca00cb3fcfff;
    showInAdvancedViewOnly: TRUE;
    uSNChanged: 24300;
    uSNCreated: 24300;
    whenChanged: 10/27/2013 3:58:35 PM Pacific Daylight Time;
    whenCreated: 10/27/2013 3:58:35 PM Pacific Daylight Time;

    -----------

     

    This is normal and expected because all unlicensed installations (e.g., Trial) are treated as Standard Edition, and Standard Edition can have a maximum of 5 mounted databases.

     

    Next, I entered an Enterprise Edition license key. This updated the value msExchMaxStoresTotal to a value of 50, which is the expected value for the Enterprise Edition of Exchange Server 2013 RTM and Exchange Server 2013 CU1.

     

    Expanding base 'CN=InformationStore,CN=TEST-MBX-0,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=EXCHANGE,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=exchange,DC=msft'...
    Getting 1 entries:
    Dn: CN=InformationStore,CN=TEST-MBX-0,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=EXCHANGE,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=exchange,DC=msft
    adminDisplayName: InformationStore;
    cn: InformationStore;
    distinguishedName: CN=InformationStore,CN=TEST-MBX-0,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=EXCHANGE,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=exchange,DC=msft;
    dSCorePropagationData: 0x0 = (  );
    instanceType: 0x4 = ( WRITE );
    msExchESEParamCircularLog: 0;
    msExchESEParamCommitDefault: 0;
    msExchESEParamDbExtensionSize: 256;
    msExchESEParamEnableIndexChecking: TRUE;
    msExchESEParamEnableOnlineDefrag: TRUE;
    msExchESEParamLogFileSize: 5120;
    msExchESEParamPageFragment: 8;
    msExchESEParamPageTempDBMin: 0;
    msExchESEParamZeroDatabaseDuringBackup: 0;
    msExchMaxRestoreStorageGroups: 1;
    msExchMaxStorageGroups: 100;
    msExchMaxStoresPerGroup: 5;
    msExchMaxStoresTotal: 50;
    msExchMinAdminVersion: -2147453113;
    msExchVersion: 4535486012416;
    name: InformationStore;
    objectCategory: CN=ms-Exch-Information-Store,CN=Schema,CN=Configuration,DC=exchange,DC=msft;
    objectClass (3): top; container; msExchInformationStore;
    objectGUID: 52c2fc98-b8b4-4d33-b35b-ca00cb3fcfff;
    showInAdvancedViewOnly: TRUE;
    uSNChanged: 27284;
    uSNCreated: 24300;
    whenChanged: 10/28/2013 4:44:30 AM Pacific Daylight Time;
    whenCreated: 10/27/2013 3:58:35 PM Pacific Daylight Time;

    -----------

     

    Next, I upgraded the server to Exchange Server 2013 CU2. Once Setup completed, I reviewed the value of msExchMaxStoresTotal, and found that it did not get updated as expected.

     

    Expanding base 'CN=InformationStore,CN=TEST-MBX-0,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=EXCHANGE,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=exchange,DC=msft'...
    Getting 1 entries:
    Dn: CN=InformationStore,CN=TEST-MBX-0,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=EXCHANGE,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=exchange,DC=msft
    adminDisplayName: InformationStore;
    cn: InformationStore;
    distinguishedName: CN=InformationStore,CN=TEST-MBX-0,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=EXCHANGE,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=exchange,DC=msft;
    dSCorePropagationData: 0x0 = (  );
    instanceType: 0x4 = ( WRITE );
    msExchESEParamCircularLog: 0;
    msExchESEParamCommitDefault: 0;
    msExchESEParamDbExtensionSize: 256;
    msExchESEParamEnableIndexChecking: TRUE;
    msExchESEParamEnableOnlineDefrag: TRUE;
    msExchESEParamLogFileSize: 5120;
    msExchESEParamPageFragment: 8;
    msExchESEParamPageTempDBMin: 0;
    msExchESEParamZeroDatabaseDuringBackup: 0;
    msExchMaxRestoreStorageGroups: 1;
    msExchMaxStorageGroups: 100;
    msExchMaxStoresPerGroup: 5;
    msExchMaxStoresTotal: 50;
    msExchMinAdminVersion: -2147453113;
    msExchVersion: 4535486012416;
    name: InformationStore;
    objectCategory: CN=ms-Exch-Information-Store,CN=Schema,CN=Configuration,DC=exchange,DC=msft;
    objectClass (3): top; container; msExchInformationStore;
    objectGUID: 52c2fc98-b8b4-4d33-b35b-ca00cb3fcfff;
    showInAdvancedViewOnly: TRUE;
    uSNChanged: 27284;
    uSNCreated: 24300;
    whenChanged: 10/28/2013 4:44:30 AM Pacific Daylight Time;
    whenCreated: 10/27/2013 3:58:35 PM Pacific Daylight Time;

    -----------

     

    In this state, when the administrator tries to mount more than 50 databases (any combination of active or passive) on this server, they will receive an error message:

     

    [PS] C:\>Mount-Database DB51
    Couldn't mount the database that you specified. Specified database: DB51; Error code: An Active Manager operation failed. Error: The database action failed. Error: Operation failed with message: MapiExceptionTooManyMountedDatabases: Unable to mount database. (hr=0x8004060e, ec=-2147219954)

    Diagnostic context:
        Lid: 65256
        Lid: 10722   StoreEc: 0x8004060E
        Lid: 1494    ---- Remote Context Beg ----
        Lid: 37952   dwParam: 0x144489A
        Lid: 39576   StoreEc: 0x977
        Lid: 35200   dwParam: 0x39F8
        Lid: 58864   StoreEc: 0x8004060E
        Lid: 43248   StoreEc: 0x8004060E
        Lid: 48432   StoreEc: 0x8004060E
        Lid: 54336   dwParam: 0x14448C8
        Lid: 1750    ---- Remote Context End ----
        Lid: 1047    StoreEc: 0x8004060E [Database: DB51, Server: TEST-MBX-0.exchange.msft].
        + CategoryInfo          : InvalidOperation: (DB51:ADObjectId) [Mount-Database], InvalidOperationException
        + FullyQualifiedErrorId : [Server=TEST-MBX-0,RequestId=797928f4-fe83-4e1f-8545-e01a72aaf79d,TimeStamp=10/28/2013 7
       :53:32 PM] 5FE3BF1B,Microsoft.Exchange.Management.SystemConfigurationTasks.MountDatabase
        + PSComputerName        : test-mbx-0.exchange.msft

     

    In addition, three events will be logged to the Application event log:

     

    Log Name:      Application
    Source:        MSExchangeIS
    Date:          10/28/2013 1:00:27 PM
    Event ID:      40003
    Task Category: High Availability
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      Test-MBX-0.exchange.msft
    Description:
    Exceeded the max number of 50 databases on this server.

    Log Name:      Application
    Source:        MSExchangeRepl
    Date:          10/28/2013 1:00:27 PM
    Event ID:      3154
    Task Category: Service
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      Test-MBX-0.exchange.msft
    Description:
    Active Manager failed to mount database DB51 on server Test-MBX-0.exchange.msft. Error: An Active Manager operation failed. Error: The database action failed. Error: Operation failed with message: MapiExceptionTooManyMountedDatabases: Unable to mount database. (hr=0x8004060e, ec=-2147219954)
    Diagnostic context:
        Lid: 65256 
        Lid: 10722   StoreEc: 0x8004060E
        Lid: 1494    ---- Remote Context Beg ----
        Lid: 37952   dwParam: 0x14A9D25
        Lid: 39576   StoreEc: 0x977    
        Lid: 58864   StoreEc: 0x8004060E
        Lid: 43248   StoreEc: 0x8004060E
        Lid: 48432   StoreEc: 0x8004060E
        Lid: 54336   dwParam: 0x14A9D54
        Lid: 1750    ---- Remote Context End ----
        Lid: 1047    StoreEc: 0x8004060E

    Log Name:      Application
    Source:        ExchangeStoreDB
    Date:          10/28/2013 1:00:27 PM
    Event ID:      226
    Task Category: Database recovery
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      Test-MBX-0.exchange.msft
    Description:
    At '10/28/2013 1:00:27 PM' the copy of database 'DB51' on this server didn't mount because the number of mailbox database copies on this server exceeds the supported limit. The error returned by failover was "There is only one copy of this mailbox database (DB51). Automatic recovery is not available.".

     

    Similar errors and events will occur when attempting to activate a passive database copy on a server with 50 mounted databases or when adding a passive database copy to a server that already has 50 database copies assigned.

     

    How to Correct this Condition

     

    Fortunately, fixing this problem is pretty easy. You simply re-enter your Enterprise Edition product key on the server, and restart the Microsoft Exchange Information Store service.

     

    Moving Forward

     

    For the immediate future, we expect this problem to exist when upgrading from Exchange Server 2013 CU1 to any future CU. However, once the server is re-licensed on CU2 or newer, the condition will remain resolved.

  • Exchange 2010: Remove-databaseavailabilitygroupserver–configurationOnly does not evict the member from the cluster.

    Administrators may encounter conditions where DAG members cannot be gracefully removed from a database availability group.  For example, a member server may have encountered an unrecoverable failure or the server may need to be removed from the DAG in order to perform a server recovery.

     

    In order to account for these and similar conditions the remove-databaseavailabilitygroupserver –configurationOnly command exists.  This command, when utilized, simply removes the member from the Database Availability Groups Active Directory object.

     

    Here is an example…

     

    Using get-databaseavailabilitygroup –status | fl name,servers,operationalservers the membership of the DAG can be verified.  In this example the only operational server is MBX-1 since that is the only server currently running in the DAG.

     

    [PS] C:\>Get-DatabaseAvailabilityGroup DAG -status | fl name,Servers,OperationalServers


    Name               : DAG
    Servers            : {MBX-1, MBX-2}
    OperationalServers : {MBX-1}

     

    Using the remove-databaseavailabilitygroupserver –configurationOnly command a DAG member can be removed.

     

    [PS] C:\>Remove-DatabaseAvailabilityGroupServer -Identity DAG -MailboxServer MBX-2 -ConfigurationOnly

    Confirm
    Are you sure you want to perform this action?
    Removing Mailbox server "MBX-2" from database availability group "DAG".
    [Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): a

     

    The results of the command can be verified using get-databaseavailabilitygroup –status | fl name,servers,operationalservers:

     

    [PS] C:\>Get-DatabaseAvailabilityGroup DAG -status | fl name,Servers,OperationalServers


    Name : DAG
    Servers : {MBX-1}
    OperationalServers : {MBX-1}

     

    When a server is removed from the DAG in this manner it is not evicted from the corresponding cluster.  You can verify cluster membership using the built in cluster commands.  Here is an example from this test:

     

    ( Windows 2008 / Windows 2008 R2 )

     

    [PS] C:\>cluster.exe node
    Listing status for all available nodes:

    Node           Node ID Status
    -------------- ------- ---------------------
    MBX-1                1 Up
    MBX-2                2 Down

    ( Windows 2008 R2 )

    [PS] C:\>Import-Module FailoverClusters

    [PS] C:\>Get-ClusterNode

    Name                                State
    ----                                -----
    mbx-1                                  Up
    mbx-2                                Down

     

    In general this issue surfaces when administrators complete a server rebuild operation and note that the rebuilt node cannot be added back to the cluster because it already exists in the cluster.  Here is an example:

     

    [PS] C:\>Add-DatabaseAvailabilityGroupServer –identity DAG –mailboxServer MBX-2


    WARNING: The operation wasn't successful because an error was encountered. You may find more details in log file
    "C:\ExchangeSetupLogs\DagTasks\dagtask_2012-06-24_14-51-47.841_add-databaseavailabiltygroupserver.log".
    A server-side database availability group administrative operation failed. Error: The operation failed. CreateCluster errors may result from incorrectly configured static addresses. Error: An error occurred while attempting a cluster operation. Error: Node mbx-2 is already joined to a cluster. [Server: MBX-1.domain.com]
        + CategoryInfo          : InvalidArgument: (:) [Add-DatabaseAvailabilityGroupServer], DagTaskOperationFailedException
        + FullyQualifiedErrorId : D05F37CD,Microsoft.Exchange.Management.SystemConfigurationTasks.AddDatabaseAvailabilityGroupServer

     

     

    When using the remove-databaseavailabilitygroupserver –configurationOnly administrators must remove the node from the cluster.  This can be accomplished through two methods:

     

    ( Windows 2008 / Windows 2008 R2 )

     

    Administrators may utilize Failover Cluster Manager.  After connecting to the cluster servicing the Database Availability Group the nodes hive can be expanded.  The administrator can right click on the node that was removed –> select more actions –> evict

     

    image

     

    ( Windows 2008 R2 )


    [PS] C:\>Import-Module FailoverClusters

    [PS] C:\>Remove-ClusterNode MBX-2

    Remove-ClusterNode
    Are you sure you want to evict node mbx-2?
    [Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): y
    Remove-ClusterNode : The cluster node 'MBX-2' was evicted from the cluster, but was not fully cleaned up.  Please see the Failover Clustering application event log on node MBX-2 for more information.
        The RPC server is unavailable
    At line:1 char:19
    + Remove-ClusterNode <<<<  MBX-2
        + CategoryInfo          : NotSpecified: (:) [Remove-ClusterNode], ClusterCmdletException
        + FullyQualifiedErrorId : Remove-ClusterNode,Microsoft.FailoverClusters.PowerShell.RemoveClusterNodeCommand

     

    (Note:  The RPC error is expected as the command attempts to cleanup the local cluster configuration on the node but the node is not accessible)

     

    After cleaning up the cluster configuration the administrator can run set-databaseavailabilitygroup –identity <DAGNAME> to ensure the appropriate cluster configuration is utilized.

  • Exchange 2010 – File Share Witness oddities…

    In Exchange 2010 when a Database Availability Group (DAG) it utilized, and there is an even number of DAG members, the underlying cluster is implemented utilizing the quorum type Node and File Share Majority.  The settings utilized for the File Share Witness are defined on the DAG when the logical DAG object is created and are either set by the administrator or automatically defined.

    To verify the quorum type you can use either cluster.exe or cluster powershell extensions (Preferred)

    Cluster.exe <cluster> /quorum  (Windows 2008 & Windows 2008 R2)

    Cluster.exe cluster.domain.com /quorum

    Witness Resource Name Path                                          Type

    --------------------- --------------------------------------------- --------

    File Share Witness (\\HT-1.DOMAIN.COM\DAG.DOMAIN.COM)               Majority

    Get-Cluster <cluster> | Get-ClusterQuorum | FL (Windows 2008 R2 Only)

    Cluster        : DAG
    QuorumResource : File Share Witness (
    \\HT-1.DOMAIN.COM\DAG.DOMAIN.COM)
    QuorumType     : NodeAndFileShareMajority

    In Failover Cluster Manager, the resources can be viewed by looking at the Cluster Core Resources.

    image

    It may become necessary to change the server hosting the file share witness.  In Exchange 2010 this is not done utilizing Failover Cluster Manager, but rather utilizing the set-databaseavailabilitygroup commandlet.  It is after the witness server is successfully updated that the oddity occurs.  Here’s an example:

    Currently the DAG utilizes the witness server HT-1.  Using the set-databaseavailabilitygroup command the witness server is changed to HT-2.  (set-databaseavailabilitygroupserver –witnessServer HT-2)  The command returns without error.  When running the previous cluster commands the following output is noted:

    Cluster.exe cluster.domain.com /quorum (Windows 2008 and Windows 2008 R2)

    Witness Resource Name Path                                          Type

    --------------------- --------------------------------------------- --------

    File Share Witness (\\HT-1.DOMAIN.COM\DAG.DOMAIN.COM)               Majority

    Get-Cluster <cluster> | Get-ClusterQuorum | FL (Windows 2008 R2 Only)

    Cluster        : DAG
    QuorumResource : File Share Witness (
    \\HT-1.DOMAIN.COM\DAG.DOMAIN.COM)
    QuorumType     : NodeAndFileShareMajority

    Also in Failover Cluster Manager the following is noted in the cluster core resources group.

    image

    After looking at this output the administrator could be lead to believe that the witness server did not successfully update.  After all both cluster.exe and powershell both show the File Share Witness (\\HT-1.DOMAIN.COM\DAG.DOMAIN.COM).  It is only in Failover Cluster Manager, if the windows is fully expanded, that you can see both (\\HT-1.DOMAIN.COM\DAG.DOMAIN.COM) and (\\HT-2.DOMAIN.COM\DAG.DOMAIN.COM).  This leads administrators to believe that two file share witness servers are currently in use.

    Thankfully both of these perceived conditions are false.  The command was both successful in changing the witness server and only one file share witness is in use.

    Each cluster resource has a display name and a set of public and private properties.  Unfortunately when using set-databaseavailabilitygroup to change the witness server, the File Share Witness resource private property for where the witness is stored is updated but the public property display name, which contains the previous witness server, is not.  Let’s take a look at this further.

    Using cluster.exe or powershell I can review the private properties of the File Share Witness resource.  (Command output truncated to show relevant values only.)

    Cluster.exe <cluster> res <resource> /priv <or> /prop (Windows 2008 & Windows 2008 R2)

    Cluster.exe cluster.domain.com res “File Share Witness (\\HT-1.domain.com\DAG.domain.com)" /prop

    Listing properties for 'File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)':

    T  Resource             Name                           Value

    -- -------------------- ------------------------------ -----------------------

    SR File Share Witness (\\HT-1.domain.COM\DAG.domain.COM) Name                           File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)

    Cluster.exe cluster.domain.com res “File Share Witness (\\HT-1.domain.com\DAG.domain.com)" /priv

    Listing private properties for 'File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)':

    T  Resource             Name                           Value

    -- -------------------- ------------------------------ -----------------------

    S  File Share Witness (\\HT-1.domain.COM\DAG.domain.COM) SharePath                      \\HT-1.domain.com\DAG.domain.com

    Get-ClusterResource –Cluster <cluster> –Name <ResourceName> | fl (Windows 2008 R2 Only – Public Properties)

    Name         : File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)
    State        : Online
    OwnerGroup   : Cluster Group
    ResourceType : File Share Witness

    Get-ClusterResource –Cluster <cluster> –Name <ResourceName> | Get-ClusterParameter fl (Windows 2008 R2 Only – Private Properties)

    Name          : SharePath
    IsReadOnly    : False
    ParameterType : String
    Value         : \\HT-1.domain.com\DAG.domain.com

    At this time a set-databaseavailability group is issued to change the witness server.  After the command completes successfully, the previous commands are run.  (Command output truncated to show relevant values only.)

    Cluster.exe cluster.domain.com res “File Share Witness (\\HT-1.domain.com\DAG.domain.com)" /prop

    Listing properties for 'File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)':

    T  Resource             Name                           Value

    -- -------------------- ------------------------------ -----------------------

    SR File Share Witness (\\HT-1.domain.COM\DAG.domain.COM) Name                           File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)

    Cluster.exe cluster.domain.com res “File Share Witness (\\HT-1.domain.com\DAG.domain.com)" /priv

    Listing private properties for 'File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)':

    T  Resource             Name                           Value

    -- -------------------- ------------------------------ -----------------------

    S  File Share Witness (\\HT-1.domain.COM\DAG.domain.COM) SharePath                      \\HT-2.domain.com\DAG.domain.com

    (Note:  The SharePath in the previous output reflects the new witness server as expected)

    Get-ClusterResource –Cluster <cluster> –Name <ResourceName> | fl (Windows 2008 R2 Only – Public Properties)

    Name         : File Share Witness (\\HT-1.domain.COM\DAG.domain.COM)
    State        : Online
    OwnerGroup   : Cluster Group
    ResourceType : File Share Witness

    Get-ClusterResource –Cluster <cluster> –Name <ResourceName> | Get-ClusterParameter fl (Windows 2008 R2 Only – Private Properties)

    Name          : SharePath
    IsReadOnly    : False
    ParameterType : String
    Value         : \\HT-2.domain.com\DAG.domain.com

    (Note:  The SharePath in the previous output reflects the new witness server as expected)

    As you can see the set-databaseavailability group command did complete it’s task successfully by updating the SharePath attribute of the quorum resource to utilize the correct witness server.

  • Exchange 2010 SP1: StartDagServerMaintenance.ps1 fails when a server contains databases with a single copy.

    In Exchange 2010 Service Pack 1 we introduced some new DAG management scripts.  These scripts can be found in the Exchange Server installation directory \ scripts.  (This is usually c:\Program Files\Microsoft\Exchange Server\v14\scripts).

     

    One of the scripts introduced is the StartDagServerMaintenance.ps1 script.  More information on this script can be found at:

     

    http://technet.microsoft.com/en-us/library/ff625233.aspx

    http://technet.microsoft.com/en-us/library/dd298065.aspx

     

    When administrators utilize this script the following actions are being taken:

    1)  All database copies are moved to another server in the DAG based on the selection of the next best copy.

    2)  If the cluster core resources are owned on the node the resources are arbitrated to a different DAG member (thereby moving the Primary Active Manager functionality to another node).

    3)  The DatabaseCopyAutoActivationPolicy property of the mailbox server is set to a value of BLOCKED thereby preventing the DAG member from receiving or activating database copies.

    4)  The individual database copies hosted on the DAG member are activation suspended.

    5)  The node is paused within the cluster service preventing the cluster core resources from arbitrating to the node (and thereby preventing the node from becoming the Primary Active Manager).

     

    When utilizing a DAG it is not necessary to replicate all databases that exist on DAG members.  It is not uncommon to have standalone databases (databases that are on a DAG member but not replicated to another member) present on a member where the StartDagServerMaintenance.ps1 script will be utilized.  Unfortunately when utilizing the script in its current form in this configuration the script fails to complete its tasks and cannot completely put the node into maintenance mode.   (Only databases are successfully moved off the member).

     

    The administrator may note the following when executing the script on a member that contains a single database copy:

     

    [PS] C:\Program Files\Microsoft\Exchange Server\V14\Scripts>.\StartDagServerMaintenance.ps1 -serverName DAG-1


    The following objects are hosted by 'DAG-1', before attempting to move them off: `n(Primary Active Manager=DAG-1) (Mailbox='Discovery Search Mailbox', Reason='Mailbox is hosted on 'DAG-1-DB0', which is not a replicated database. ) (Mailbox='Journal Internal', Reason='Mailbox is hosted on 'DAG-1-DB0', which is not a replicated database. ) (Mailbox='MicrosoftExchange Approval Assistant', Reason='Arbitration Mailbox is hosted on 'DAG-1-DB0', which is not a replicated database.) (Database='DAG-DB0', Reason='Copy is active'))

    Write-Error : The following objects are still hosted by 'DAG-1', even after attempting to move them off: `n(Mailbox='Discovery Search Mailbox', Reason='Mailbox is hosted on 'DAG-1-DB0', which is not a replicated database. ) (Mailbox='Journal Internal', Reason='Mailbox is hosted on 'DAG-1-DB0', which is not a replicated database. ) (Mailbox='Microsoft Exchange Approval Assistant', Reason='Arbitration Mailbox is hosted on 'DAG-1-DB0', which is not a replicated database. ))
    At C:\Program Files\Microsoft\Exchange Server\V14\Scripts\StartDagServerMaintenance.ps1:216 char:16
    +                 write-error <<<<  ($StartDagServerMaintenance_LocalizedStrings.res_0014 -f ( PrintCriticalMailboxResourcesOutput($criticalMailboxResources)),$shortServerName) -erroraction:stop
        + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
        + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Microsoft.PowerShell.Commands.WriteErrorCommand

     

    If an administrator encounters this condition the following process can be utilized to place the DAG member into maintenance mode.  (In our example server DAG-1 in the DAG named “DAG” [pretty creative eh?] is the server we will be placing in maintenance mode)

     

    1)  Execute a get-mailboxdatabasecopystatus * and verify that at least one other non-lagged copy of each replicated database is healthy.

     

    [PS] C:\>Get-MailboxDatabaseCopyStatus *

    Name                                          Status          CopyQueue ReplayQueue LastInspectedLogTime   ContentIndex
                                                                  Length    Length                             State
    ----                                          ------          --------- ----------- --------------------   ------------
    DAG-1-DB0\DAG-1                               Mounted         0         0                                  Healthy
    DAG-DB0\DAG-1                                 Mounted         0         0                                  Healthy
    DAG-DB1\DAG-1                                 Healthy         0         0           7/13/2011 8:22:55 AM   Healthy
    DAG-2-DB0\DAG-2                               Mounted         0         0                                  Healthy
    DAG-DB1\DAG-2                                 Mounted         0         0                                  Healthy
    DAG-DB0\DAG-2                                 Healthy         0         4           7/13/2011 8:48:34 AM   Healthy
    DAG-DB0\DAG-3                                 Healthy         0         147         7/13/2011 8:48:34 AM   Healthy
    DAG-DB1\DAG-3                                 Healthy         0         140         7/13/2011 8:22:55 AM   Healthy
    DAG-DB0\DAG-4                                 Healthy         0         409         7/13/2011 8:48:34 AM   Healthy
    DAG-DB1\DAG-4                                 Healthy         0         307         7/13/2011 8:22:55 AM   Healthy
    MBX-1-DB0\MBX-1                               Mounted         0         0                                  Healthy
    MBX-1-RDB\MBX-1                               Mounted         0         0                                  Healthy

    2)  Execute a move of all active database copies off the server.  This can be done with the command move-activemailboxdatabase –server <MaintenanceServer>  (Note:  No target server is specified which means the next best copy will be automatically selected for activation)

     

    [PS] C:\>Move-ActiveMailboxDatabase -Server DAG-1 -Confirm:$FALSE

    Identity        ActiveServerAtS ActiveServerAtE Status     NumberOfLogsLost   RecoveryPoint MountStatus MountStatus
                    tart            nd                                            Objective     AtMoveStart AtMoveEnd
    --------        --------------- --------------- ------     ----------------   ------------- ----------- -----------
    DAG-1-DB1       dag-1           dag-1           Warning                                     Mounted     Mounted
    DAG-1-DB0       dag-1           dag-1           Warning                                     Mounted     Mounted
    DAG-DB0         dag-1           dag-2           Succeeded  0                  7/13/2011 8:5 Mounted     Mounted
                                                                                  3:24 AM
    WARNING: An Active Manager operation failed. Error: The database action failed. Error: You cannot perform a switchover
    operation on database 'DAG-1-DB1' because the database is not configured for replication.. [Database: DAG-1-DB1,
    Server: DAG-1.domain.com]
    WARNING: An Active Manager operation failed. Error: The database action failed. Error: You cannot perform a switchover
    operation on database 'DAG-1-DB0' because the database is not configured for replication.. [Database: DAG-1-DB0,
    Server: DAG-1.domain.com]

    3)  Move the cluster core resources to another node within the DAG.  This can be accomplished using the command cluster.exe <DAGFQDN> group “Cluster Group” /moveto:<NODE>

     

    [PS] C:\>cluster DAG.domain.com group "Cluster Group" /moveto:DAG-2

    Moving resource group 'Cluster Group'...

    Group                Node            Status
    -------------------- --------------- ------
    Cluster Group        DAG-2           Online

    4) Pause the node within the cluster.  This can be done utilizing the command cluster.exe <DAGFQDN> node <NODENAME> /pause

     

    [PS] C:\>cluster DAG.domain.com node DAG-1 /pause

    Pausing node 'DAG-1'...

    Node           Node ID Status
    -------------- ------- ---------------------
    DAG-1                1 Paused

    5) Set the DatabaseCopyAutoActivationPolicy of the server to BLOCKED.  This can be done using the command set-mailboxserver –identity <DAGMember> –databasecopyautoactivationpolicy:BLOCKED

     

    [PS] C:\>Set-MailboxServer -Identity DAG-1 -DatabaseCopyAutoActivationPolicy:BLOCKED

    6) Suspend all individual copies for activation.  This can be done using the command get-mailboxdatabasecopystatus *\<DAGMember> | suspend-mailboxdatabasecopy –activationOnly:$TRUE

     

    [PS] C:\>Get-MailboxDatabaseCopyStatus *\DAG-1 | Suspend-MailboxDatabaseCopy -ActivationOnly:$TRUE
    Database "DAG-1-DB0\DAG-1" has only one copy. This task is supported only for databases that have more than one copy.
        + CategoryInfo          : InvalidOperation: (DAG-1-DB0:ADObjectId) [Suspend-MailboxDatabaseCopy], InvalidOperation
       Exception
        + FullyQualifiedErrorId : 7325D1AB,Microsoft.Exchange.Management.SystemConfigurationTasks.SuspendDatabaseCopy


    Confirm
    Are you sure you want to perform this action?
    Suspending activation of mailbox database copy "DAG-DB0" on server "DAG-1".
    [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): a

     

    At this time it should be safe for the administrator to perform DAG server maintenance.  When the maintenance is complete the script StopDagServerMaintenance.ps1 can be utilized to take the DAG member out of maintenance mode.