In preparation of a migration from Exchange 2007 to Exchange 2013 (interorg, so new Active Directory and new Exchange deployment) I had to clean up the Exchange 2007 environment. There was one user that had a 4.5GB Mailbox with over 50,000 items in.
Moving this Mailbox from one Mailbox database to another Mailbox database (in the same Exchange 2007 environment) took a long time and after 8 hours I had to stop the move because it was running into office hours. Unfortunately this broke the Mailbox at some point and the user was confronted with the error message “Login failed because the Mailbox you tried to access is being moved”.
Note. Another mailbox in the same Mailbox database was a little over 5GB in size but had ‘only’ 15,000 items in it. Moving this Mailbox to another Mailbox database took 35 minutes.
I did start this particular Mailbox move myself and I did cancel it the next morning, but other than that I had no clue. A Microsoft Escalation Engineer (participating in the MVP Community) advised to have a closer look at the migration log files that can be found in the C:\Program Files\Microsoft\Exchange Server\Logging\MigrationLogs directory. In this directory you can find both .log files as well as .xml files as shown in the following figure:
In the log file you can find a lot of useful information regarding the mailbox move, for example:
[5/27/2014 6:13:18 PM]  [kathy.contoso.com] The operation has started.
[5/27/2014 6:13:18 PM]  [kathy.contoso.com] Approving object.
[5/27/2014 6:13:18 PM]  [kathy.contoso.com] Opening source mailbox.
[5/27/2014 6:13:18 PM]  [kathy.contoso.com] Trying to open mailbox:
szServerLegacyDN: /o=HMC45/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=AMS-MBX3
szUserLegacyDN: /o=HMC45/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=kathy.contoso.com
[5/27/2014 6:13:18 PM]  [kathy.contoso.com] Open mailbox succeeded.
[5/27/2014 6:13:18 PM]  [kathy.contoso.com] Trying to lock mailbox:
[5/27/2014 6:13:28 PM]  [kathy.contoso.com] Mailbox was locked successfully.
[5/27/2014 6:13:28 PM]  [kathy.contoso.com] Preparing mailbox to be moved.
Later in this log file I found the following entry
[5/27/2014 6:13:32 PM]  [ERROR] Error was found for Kathy Prince (Kathy.contoso.com) because: Error occurred in the step: Preparing mailbox to be moved. Failed to copy basic mailbox information with error: A duplicate mailbox was found due to problems during a Move Mailbox procedure. The duplicate mailbox has been deleted. Try again later., error code: -1056749241
This user’s Mailbox was still in the Mailbox container under Recipient Configuration (in the Mailbox database MBX14) but could also be found in the Disconnected Mailbox container under Recipient Configuration, for example:
If I disabled this Mailbox the identical Mailboxes were listed in Disconnected Mailbox, one in Mailbox database MBX12 and one in Mailbox database MBX14.
One procedure could be (but didn’t work in my case):
· Disable Mailbox.
· Run Clean-MailboxDatabase MBX12.
· Run Clean-MailboxDatabase MBX14.
· Re-attach Mailbox.
You can find information on the Interwebs that this solved the issue in some cases but I was unlucky.
Next step was to permanently delete the disconnected Mailboxes from the Mailbox database. To achieve this set the Keep deleted items and Keep deleted mailboxes both to “0” as shown in the following figure:
You can wait for the Online Maintenance interval to run, or set the Custom Interval to always run as shown in the following figure:
Restart the System Attendant on the Mailbox server and dismount and mount the Mailbox database (not sure if that last step is mandatory, but it did work though) and Online Maintenance is started quickly. You can see this in the eventlog, check for Event ID 700 and Event ID 703.
A couple of hours later I check the Disconnected Mailboxes and the user’s Mailbox was not listed anymore. At this point the user was able to login again, but the Mailbox still have to be moved to another Mailbox database.
Important note: don’t forget to set the Delete Items Retention and Deleted Mailbox Rentention to their original values!