Home

Removing Extra MDB

%3CLINGO-SUB%20id%3D%22lingo-sub-508978%22%20slang%3D%22en-US%22%3ERemoving%20Extra%20MDB%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-508978%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Cool%20People%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20a%20hybrid%20setup%20and%20since%20we%20are%20moving%20most%20of%20our%20mailboxes%20to%20EO.%26nbsp%3B%20We%20decided%20to%20consolidate%20our%20mailboxes%20to%20a%20single%20MDB.%20I%20have%20moved%20our%20remaining%20on-prem%20mailbox%20to%20a%20single%20MDB%20and%26nbsp%3B%20the%20remaining%204%20MDB's%20has%20no%20more%20mailbox%20to%20them.%20What%20would%20be%20the%20safest%20way%20to%20remove%20the%20extra%204%20databases%3F%20Does%20unmounting%20them%20from%20ECP%20and%20deleting%20them%20from%20there%20does%20the%20trick%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAppreciate%20your%20response.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-508978%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E2013%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Server%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EHybrid%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-524758%22%20slang%3D%22en-US%22%3ERe%3A%20Removing%20Extra%20MDB%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-524758%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F307714%22%20target%3D%22_blank%22%3E%40kuystorj%3C%2FA%3E%26nbsp%3Byou%20can%20use%20Remove-MailboxDatabase%2C%20no%20need%20to%20dismount.%3C%2FP%3E%0A%3CP%3EMake%20sure%20you%20have%20moved%20the%20arbitration%20mailboxes%20as%20well.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-525813%22%20slang%3D%22en-US%22%3ERe%3A%20Removing%20Extra%20MDB%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-525813%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F307714%22%20target%3D%22_blank%22%3E%40kuystorj%3C%2FA%3E%26nbsp%3Bif%20you%20have%20multiple%20mailbox%20database%20copies%2C%20you'll%20remove%20all%20the%20copies%20first%2C%20then%20you%20can%20remove%20the%20databases.%20When%20you%20say%20you%20want%20to%20remove%20them%20in%20the%20'safest%20way%20possible'%2C%20what%20are%20some%20of%20your%20concerns%20about%20removing%20them%3F%20once%20boxes%20are%20moved%20off%2C%20the%20only%20remaining%20data%20should%20be%20disconnected%20or%20soft-deleted%20mailboxes%20(%20get-mailboxstatistics%20-database%20%22myMDB05%20%7C%20%3F%7B%24_.disconnectreason%7D%20).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlso%20like%20the%20previous%20user%20mentioned%2C%20you%20will%20need%20to%20move%20off%20any%20arbitration%20mailboxes%20if%20there%20are%20any%20on%20them%2C%20but%20Exchange%20will%20tell%20you%20if%20there%20are%20any%20arbitration%20mailboxes%20on%20it%20when%20you%20go%20to%20delete%20the%20DBs%20(get-mailbox%20-arbitration%20%7C%20select%20alias%2C%20database)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-530460%22%20slang%3D%22en-US%22%3ERe%3A%20Removing%20Extra%20MDB%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-530460%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20kuystorj%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFirst%20of%20all%20run%20this%20to%20get%20a%20list%20of%20all%20arbitrary%20mailboxes%3A-%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ESet-ADServerSettings%20-ViewEntireForest%20%24true%3CBR%20%2F%3EGet-Mailbox%20-Arbitration%20%7C%20FL%20name%2Cdatabase%2Cdisplayname%2Cservername%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20see%20any%20mailbox%20on%20the%20databases%20that%20you%20wish%20to%20remove%2C%20move%20those%20mailboxes%20to%20the%20database%20were%20you%20are%20consolidating%20all%20the%20mailboxes%2C%20using%20below%3A-%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EGet-Mailbox%20%E2%80%93Database%20%E2%80%9CSource-DB-NAME%E2%80%9D%20%E2%80%93arbitration%20%7C%20New-MoveRequest%20%E2%80%93TargetDatabase%20%E2%80%9CDestination-DB-NAME%E2%80%9D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20check%20the%20status%20of%20the%20migration%20use%20below%3A-%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EGet-MoveRequest%20%7C%20Get-MoveRequestStatistics%20%7C%20select%20DisplayName%2C%20StatusDetail%2C%20*Size%2C%20*Percent*%20%7C%20ft%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20to%20remove%20the%20database%20run%20below%3A-%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ERemove-MailboxDatabase%20-Identity%20MailboxDatabaseName%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20warning%20might%20appear%20saying%20that%20you%20would%20have%20to%20delete%20the%20edb%20manually.%20Once%20done%20feel%20free%20to%20delete%20the%20edb%20and%20log%20files%20folder.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDeepak%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-536597%22%20slang%3D%22en-US%22%3ERe%3A%20Removing%20Extra%20MDB%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-536597%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F307714%22%20target%3D%22_blank%22%3E%40kuystorj%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGet-Mailbox%20-Database%20%22MDB%20name%22%3C%2FP%3E%3CP%3EGet-Mailbox%20-Database%20%22MDB%20name%22%20-PublicFolder%3C%2FP%3E%3CP%3EGet-Mailbox%20-Database%20%22MDB%20name%22%20-Arbitration%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMake%20sure%20no%20result%20is%20found%20other%20move%20it%20to%20mailbox%20db%20that%20will%20be%20alive.%20Then%20remove%20the%20database%20either%20from%20ecp%20or%20shell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EAkshay%3C%2FP%3E%3CP%3EExchange%20Admin%20-%20%3CA%20href%3D%22https%3A%2F%2Fwww.o365cloudexperts.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EO365CloudExperts%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
kuystorj
New Contributor

Hello Cool People,

 

 

We have a hybrid setup and since we are moving most of our mailboxes to EO.  We decided to consolidate our mailboxes to a single MDB. I have moved our remaining on-prem mailbox to a single MDB and  the remaining 4 MDB's has no more mailbox to them. What would be the safest way to remove the extra 4 databases? Does unmounting them from ECP and deleting them from there does the trick?

 

Appreciate your response.

 

 

Best,

 

4 Replies

@kuystorj you can use Remove-MailboxDatabase, no need to dismount.

Make sure you have moved the arbitration mailboxes as well.

 

@kuystorj if you have multiple mailbox database copies, you'll remove all the copies first, then you can remove the databases. When you say you want to remove them in the 'safest way possible', what are some of your concerns about removing them? once boxes are moved off, the only remaining data should be disconnected or soft-deleted mailboxes ( get-mailboxstatistics -database "myMDB05 | ?{$_.disconnectreason} ).

 

Also like the previous user mentioned, you will need to move off any arbitration mailboxes if there are any on them, but Exchange will tell you if there are any arbitration mailboxes on it when you go to delete the DBs (get-mailbox -arbitration | select alias, database)

Hello kuystorj,

 

First of all run this to get a list of all arbitrary mailboxes:-


Set-ADServerSettings -ViewEntireForest $true
Get-Mailbox -Arbitration | FL name,database,displayname,servername

 

If you see any mailbox on the databases that you wish to remove, move those mailboxes to the database were you are consolidating all the mailboxes, using below:-


Get-Mailbox –Database “Source-DB-NAME” –arbitration | New-MoveRequest –TargetDatabase “Destination-DB-NAME”

 

To check the status of the migration use below:-


Get-MoveRequest | Get-MoveRequestStatistics | select DisplayName, StatusDetail, *Size, *Percent* | ft

 

Now to remove the database run below:-


Remove-MailboxDatabase -Identity MailboxDatabaseName

 

A warning might appear saying that you would have to delete the edb manually. Once done feel free to delete the edb and log files folder.

 

Deepak

@kuystorj 

 

Get-Mailbox -Database "MDB name"

Get-Mailbox -Database "MDB name" -PublicFolder

Get-Mailbox -Database "MDB name" -Arbitration

 

Make sure no result is found other move it to mailbox db that will be alive. Then remove the database either from ecp or shell.

 

Regards,

Akshay

Exchange Admin - O365CloudExperts

Related Conversations
Re-doing favorites
JonathanLeslie in Discussions on
8 Replies