Removing databases with active mailboxes
When removing a mailbox database from a server in Exchange 2007 you are often presented with this message:
[PS] C:\>Remove-MailboxDatabase "Mailbox Database"
Remove-MailboxDatabase : This mailbox database contains one or more mailboxes.
To get a list of all mailboxes in this database, run the command Get-Mailbox -D
atabase <Database ID>. To disable a mailbox so that you can delete the mailbox
database, run the command Disable-Mailbox <Mailbox ID>
At line:1 char:23
+ Remove-MailboxDatabase <<<< "Mailbox Database"
The Exchange server prevents you from removing the mailbox database due to the existing mailboxes. However in my lab I've reproduced scenarios where this warning does not occur. This applies to Exchange servers in multi-domain Forests. Example Organization:
Exchange 2007 host is ex2007.mycompany.com, in the mycompany.com domain (as the root domain for the Forest)
The mycompany.com domain has some mailbox users on a database "Mailbox Database 1" on ex2007.mycompany.com
The branch.mycompany.com domain has some mailbox users on a database "Mailbox Database 2" on ex2007.mycompany.com
Logged in as an administrator in mycompany.com, the Exchange server prevents removal of "Mailbox Database 1" because of active mailboxes. However it does not prevent removal of "Mailbox Database 2", despite active mailbox users. Similarly, when uninstalling Exchange it will allow the uninstall to continue even if there are active mailboxes for users in branch.mycompany.com. The Exchange setup log seems to check for this but not detect them:
[2/15/2010 4:10:05 PM] [1] Administrator Active Directory session settings are: View Entire Forest: 'True', Configuration Domain Controller: 'ex2007.mycompany.com', Preferred Global Catalog: 'ex2007.mycompany.com', Preferred Domain Controllers: '{ ex2007.mycompany.com }'
[2/15/2010 4:10:05 PM] [1] Searching objects "EX2007\Third Storage Group\Mailbox Database 2" of type "MailboxDatabase" under the root "$null".
[2/15/2010 4:10:05 PM] [1] Previous operation run on domain controller 'ex2007.mycompany.com'.
[2/15/2010 4:10:05 PM] [1] Verifying that there is no associated mailbox user on the mailbox database "EX2007\Third Storage Group\Mailbox Database 2".
[2/15/2010 4:10:05 PM] [1] Establishing the Admin RPC connection with Server "ex2007.mycompany.com".
[2/15/2010 4:10:05 PM] [1] Checking the status of database "EX2007\Third Storage Group\Mailbox Database 2".
Basically it appears that any checks that the server performs before allowing a mailbox database to be removed are not performed with a Forest-wide scope. I'm wondering if this is the intended behaviour, or if the Exchange server should in fact be checking Forest-wide before permitting removal of a database?
February 17th, 2010 9:24am
So, the child domain branch.mycompany.com has user objects associated with the mailboxes on the "Mailbox Database 2" of the exchange 2007 server in the root domain mycompany.com. Yet, the removal of the database doesn’t trigger the warning window?James Luo TechNet Subscriber Support (http://technet.microsoft.com/en-us/subscriptions/ms788697.aspx) If you have any feedback on our support, please contact tngfb@microsoft.com
Free Windows Admin Tool Kit Click here and download it now
February 18th, 2010 8:53am