Monday 29 July 2013

Soft Recovery and Hard Recovery in Exchange Server

Recovering a database simply involves restoring database files ad transaction logs from the tape to the disk, and then lettings ESE recover all the data from those files and bring the stores back online. This is hard recovery. We use eseutil /cc to initiate the hard recovery.

During the recovery, the database must be offline. But the information store services must be running.

Soft recovery is an automatic process where Exchange can recover data after an unexpected shutdown such as a computer crash or forced power down.

Dirty transactions in memory just before the crash need to be recovered. The recovery process will happen automatically when the database is remounted. Simply restart Exchange. This is what happens when the store is brought back online:

1.    Database is mounted and ESE sees that its state is set to not consistent
1.    ESE enters soft recovery mode
2.    ESE looks at the checkpoint and starts with the transaction file indicated by the checkpoint. (If the checkpoint is not available, then ESE simply starts with the oldest log file, which will take longer to complete).
3.    ESE reads each transaction from the log files right up to the end. For each transaction ESE will read pages from the database file, compare the dbTime value with the page in the log file, and if the transaction in the log file is newer it will execute the transaction.
4.    When ESE finishes replaying the transactions, it will perform a clean dismount of the database. This causes all transactions in memory to be flushed to the database file, and sets the file state to consistent.
5.    ESE then remounts the database. Because the state is consistent ESE enters normal mode and regular operations can continue.
6.    

We use eseutil /r to initiate the soft recovery.


Eseutil /cc
Performs a hard recovery after a database restore.
Eseutil /d
Performs an offline compaction of a database.
Eseutil /g
Verifies the integrity of a database.
Eseutil /k
Verifies the checksums of a database.
Eseutil /m
Generates formatted output of various database file types. e.g. /mh
Eseutil /p
Repairs a corrupted or damaged database.
Eseutil /r
Performs soft recovery to bring a single database into a consistent or clean shutdown state.
Eseutil /y
Copies a database, streaming file, or log file.

1 comment:

  1. Exchange Server Recovery tool that effectively repairs inaccessible or corrupted EDB files and recovers the entire mailbox items along with email attachments, tasks, contacts, notes, calendar, deleted items etc. It can easily export corrupt or damaged EDB into new Outlook PST file. See more at: https://softcart.wordpress.com/exchange-mailbox-recovery/

    ReplyDelete