Friday, March 3, 2017

Exchange Database Recovery

How to Recover a Corrupt Exchange Database
  1. Be sure there are no hardware issues and that the File System is intact (run chkdsk /r and repeat until it doesn’t return errors), restore from backup is preferable if possible.
  2. Add the Exchange bin to the “path” statement
    1. Start -> Right click my computer -> properties -> advanced Tab -> environment variables (scroll down if you have to)
    2. In the bottom pane double click “path”
    3. Go to the end of the line enter a semi-colon and enter the path to the exchange bin directory
  3. Verify that there is twice as much free space as the size of the database,
    i.e if the database is 10 gb you need to have at least 20 gb free
  4. Open command prompt
  5. Change to the directory where the database is (usually C:\program files\exchsrv\mdbdata, if you cant find the database search for *.edb)
  6. Type eseutil /mh > (usually priv1.edb)
    1. Look for the shutdown state (may have to scroll up) , if its in clean shutdown then you should be able to mount the database, but chances are if your reading this its in a dirty shutdown and you need to continue on
  7. Type eseutil /k  (usually priv1.edb) look for “Bad Checksums” if you have any, your repair possibility will be slim (just make a note of it)
  8. Type eseutil /ml e00 we are looking for any missing logs (if none missing go on to step 9)
    1. if there are any we have to move all subsequent logs. and the e00 log to another location, rename the last log to e00.log
    2. Example we have logs E00021-E00035 and E00033 is missing, remove E00, E00034 and E00035
  9. Re-name the .chk file to .oldchk
  10. Type eseutil /r E00
    1. Wait for that to complete, if it completes successfully move on to 11 otherwise run “P”
      1. P. eseutil /p this will force the database into a clean shutdown and will rip out any incomplete pages, this should only be done as a last resort
  11. Start information store service, verify that the store is mounted in Exchange System Manager (ESM), if its not mounted right click and mount
    1. Start -> All Programs -> Microsoft Exchange -> System Manager
    2. Expand Administrative Group -> Administrative group -> Servers -> {Server name} -> {Storage Group}
    3. Right Click Mailbox store -> mount
  12. Dismount the store in ESM
  13. Go back to the command window
    1. type isinteg –s -fix –test alltests
    2. When prompted select the store that you repaired
    3. If any fixes are reported re-run until none are reported (just like chkdsk)
  14. Type eseutil /d > (usually priv1.edb)
  15. Remount the database and should now be able to send receive mail
Command DescriptionEseutil is a Jet database repair utility
Switch Action
/D Defragments the database
/R Soft recovery of the database
/G Integrity Check
/K Checksum
/P Hard Repair
/ML Log File dump
/MH Database file dump
/Y Copy
/C Restore

Followers