Exchange 2010 SP1: Error when adding or removing a mailbox database copy

If an Exchange 2010 RTM server <or> an Exchange 2010 SP1 Beta has been upgraded to Exchange 2010 SP1 RTM administrators may experience an error when attempting to utilize the remove-mailboxdatabasecopy <or> add-mailboxdatabasecopy commandlets.

When running remove-mailboxdatabasecopy the following error is noted:

Remove-MailboxDatabaseCopy DAG-DB0\DAG-2 –Verbose

WARNING: An unexpected error has occurred and a Watson dump is being generated: Registry key has subkeys and recursive removes are not supported by this method.

Registry key has subkeys and recursive removes are not supported by this method.
+ CategoryInfo : NotSpecified: (:) [Remove-MailboxDatabaseCopy], InvalidOperationException
+ FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.Exchange.Management.SystemConfigurationTasks.
RemoveMailboxDatabaseCopy

Although the error is reported, the remove was successful in updating the database object within the active directory to show the server no longer hosts a copy of the database. You can verify the copy was successfully removed by reviewing the Servers with the get-mailboxdatabase –identity <NAME> | fl name, servers commandlet.

Here is sample output (note DAG-2 is missing):

[PS] D:\>Get-MailboxDatabase DAG-DB0 | fl name,servers

Name : DAG-DB0
Servers : {DAG-1, DAG-3, DAG-4}

If an administrator attempts to add a database copy to a DAG member, the same error may also be returned.

Add-MailboxDatabaseCopy DAG-DB0 -MailboxServer DAG-2

WARNING: An unexpected error has occurred and a Watson dump is being generated: Registry key has subkeys and recursive
removes are not supported by this method.

Registry key has subkeys and recursive removes are not supported by this method.
+ CategoryInfo : NotSpecified: (:) [Add-MailboxDatabaseCopy], InvalidOperationException
+ FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.Exchange.Management.SystemConfigurationTasks.
AddMailboxDatabaseCopy

Unlike the remove-mailboxdatabasecopy this command is not successful in adding the copy <or> updating the Active Directory to show the copy was added.

To work around this issue the administrator should:

1) Identify the GUID of the database that is being added.

2) On the server specified in the add command, using the database GUID identified, remove the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\v14\Replay\State\{DB-GUID}\DumpsterInfo

To identify the mailbox database GUID, use the following command:

[PS] D:\>Get-MailboxDatabase DAG-DB0 | fl name,GUID

Name : DAG-DB0
Guid : 8d3a9778-851c-40a4-91af-65a2c487b4cc

The GUID identified in this case is 8d3a9778-851c-40a4-91af-65a2c487b4cc. With this information we can no export and delete the DUMPSTERINFO key on the server where you are attempting to add the mailbox database copy.

image

Once the registry key is removed the add-mailboxdatabasecopy command will complete successfully and the database copy will be added.