Thursday, September 22, 2016



Hello Friends, On this post i will talk about how you can repair a mailbox database in Exchange 2010/2007. Exchange database can get corrupt because of a power outage or due to some corrupt emails. If the mailbox database is in dirty shutdown then you will not be able to mount the Exchange database, You will have to follow the below steps to mount the database successfully.
Note:- Always take a back up of the mailbox database.edb file and the log files before making any changes to the Exchange database.

First of all we will have to check the status of the mailbox database. Open Exchange management shell and run the below command to check the status of the mailbox database.
eseutil /mh “Location of the database”
Below is the snapshot of the same , However in this scenario the database is in clean shutdown. In case the database is not in clean shutdown then its state will be Dirty Shutdown.



To repair the database run the eseutil /p switch, Remember the /p switch is hard repair hence you might lose some data. It is always recommended to take a back of the database(.edb file ) and the log file before the repair. below is the command to initiate a hard repair on the mailbox database.

eseutil /p “Location of the database”
Sample command:-
Eseutil /p “C:\program files\Microsoft\Exchange server\V14\Mailbox\mailbox database.edb”


Once you initiate the hard repair , You will receive a warning stating that some of the data might be lost , Click ok to to the pop up. Now the repair will start and the repair will take time so be patience about it. Normally the eseutil repairs a mailbox database at a speed of 7 – 8 Gb /hr however the time of the repair is directory proportional to the size of the mailbox database and the level of corruption on the mailbox database. Once the repair completes then again check the status of the mailbox database by running the eseutil \mh command . If the database is in dirty shutdown then move the database log files to a different location. You will be able to get the location of the log files by running the below command.
Get-mailboxdatabase -identity “mailbox database,edb”  | fl *path*
The highlighted part is the location of log file.

Go to the log file location and move(Cut and paste) all the log file from that location to a different location,By default in Exchange  the log files and the mailbox database.edb file resides on the same location so only keep the mailbox database.edb file only and move all the log files to a different location. Now we need to open Exchange management Console, Go to Organization configuration->Mailbox->Database management->Properties of the mailbox database->Maintenance ->Check the option “This database can be restored from a back up”.Go ahead and mount the database and you will be able to mount the mailbox database.







Hello Friends. I have have been thinking from some time to write an article about how you can repair a mailbox in exchange 2010. Please make a not that you can’t repair a mailbox in Exchange 2007 so in this post i am taking in respect to Exchange 2010. Any Exchange administrator might come across to a scenario where few mailboxes in a mailboxes has gone corrupt at that point in time it is not wise to go ahead and repair the whole mailbox database since it will effect the mail flow of all the users whose mailboxes resides on the mailbox database, In such kind of scenario you can try to repair the mailbox. To repair the mailbox of a user , Open the Exchange management shell and run the below command.

New-MailboxRepairRequest -Mailbox Alias -CorruptionType ProvisionedFolder,SearchFolder,AggregateCounts,Folderview

Below is a snapshot of a mailbox repair request



You can see that the repair request generates a Request ID, If you open the event viewer then you will be able to see an event generated for the above event ID.













you can also use different switches to repair the mailbox of a user, Below are some of the examples.
This example detects and repairs all folder views for the mailbox msft
New-MailboxRepairRequest -Mailbox msft -CorruptionType FolderView
This example only detects and reports on ProvisionedFolder and SearchFolder corruption issues to msft’s mailbox. This command doesn’t repair the mailbox since we are using the detectOnly switch.
New-MailboxRepairRequest -Mailbox msft -CorruptionType ProvisionedFolder,SearchFolder -DetectOnly
If there are lot of mailboxes that needs to repaired on a mailbox database then the below powershell command can be used to repair the mailboxes on a mailbox database. The below command will try to repair all the mailboxes in mailbox database.

New-MailboxRepairRequest -Database "mailbox database" -CorruptionType AggregateCounts

Even after repairing the mailbox , If the mailbox has corruption then you can always create a new mailbox database and move the mailbox to the new mailbox database.