Recovering Exchange 2003

IMPORTANT: Before you repair or restore a database, always ALWAYS make a backup copy of the current database files that you are going to work with. (There must be 110% of the size of the edb in free space to work with the db as well. Don’t forget to specify the temp location with /t in most cases)

More important stuff: After you repair a database, you must check the repair count in the database header. If the count is greater than zero, you must perform an off-line defragmentation by using Eseutil, and then you must repair the database at the information store level with the Isinteg utility. If you do not do so, users may encounter issues, such as an inability to open messages or attachments, or references in their mailboxes to items that no longer exist.

Here we go:

Verify that the state of the database is in a ‘clean shutdown’
ESEUTIL /MH database.edb

You want a clean shutdown so you can mount it, else you can’t do anything. (If its dirty, 8/10 times, then you have to…)

Fix database with Exchange tools (eseutil etc)
ESEUTIL /r (Adding the log files to the DB)
ESEUTIL /d (Defrag the DB)

You must run Isinteg while the database is in place on a fully configured Exchange server because Isinteg operates at the information store level and uses the Information Store service to access the database.

If Exchange is crashing on mount (also known to hang forever on ‘Applying computer settings’):
Boot into safe mode.
Check and export all Event Logs (Exchange is usually good at telling you whats gone wrong).
Disable all AV and MS Exchange services. Restart.
Remove all log files from DB folder.
Start the information store service.
Try to mount the DB (You will probably get an error “DB is not consistent” and it won’t let you).
Cut logs back into folder.
Run ISINTEG -S [server_name] -FIX -TEST ALLTESTS (don’t forget the verbose tag, will take about 20 mins)

Note: If doing anything crashes Exchange and the server, you can use ‘last known good config’ instead of having to go through safe mode again to disable all services.

More notes: If you don’t have enough time to just fix the mail server and need mail just working:
Perform an Exchange Dial Tone Restore.
Cut out the main DB files from the Exchange folder. (Never delete these, be sure to note what state they are in time etc. It helps as you may have a few in different states (clean, dirty etc.))
Load up System Manager
Click mailbox store and mount
It will ask ‘this will create an empty DB, are you sure?’ click yes, and ok.
Now the dial tone DB is up and running.
Users can connect to their mail boxes (Using Outlook 2003, Launch in offline mode for old emails. Click connect for new ones. I would suggest Outlook 2003 for emails in offline PST and use webmail for the live inbox (Note, Outlook 2000 and below cannot do this and will do bad things))
Most users will have to restart their Outlook (twice).
Now that the users can connect to the Exchange server again send out an email message informing them what’s going.

If all else fails then run
ESEUTIL /p
(You can copy the DB files to your fastest server to work on this, but is it worth having to copy back and fourth on a large DB? Works at 8GB an hour)

Verify that the state of the database is in a ‘clean shutdown’
ESEUTIL /MH [database_file_name]

You will probably have to follow up with
ESEUTIL /d

Then ISINTEG -S [server_name] -FIX -TEST ALLTESTS Until the repair count is 0.

To check the repair count, examine the screen output that is generated when you run the following command: ESEUTIL /MH [database_file_name]

Once its ‘clean’ then mount to the Recovery Storage Group (create it if you haven’t already) and dismount to ensure everything is OK.

If a Dial Tone Recovery was required
Set a time to put back the old DB as the main store
Stop postfix and smtp
Dismount both the RSG and main store
Play logs into both DBs using ESEUTIL /r
Swap around locations for DBs and remount (Mount the RSG first).
Merge mail from RSG into main mailboxes (right click user’s mailbox, Exchange tasks, merge mailbox)
Done. Perform a backup.

0 Responses to “Recovering Exchange 2003”


  1. No Comments

Leave a Reply