Thursday, January 15, 2009

Manually Replay Exchange Transaction Logs

Here is a brief set of instructions for replaying the transaction logs for an Exchange 2003 database that was restored from backup. I am assuming you've already used your backup software to get the database and transaction logs recovered from disk or tape.

Remove .chk file from production transaction logs directory and change the properties on DB so that it won’t auto-mount (if server fails over, you don’t want the restored db to mount until you are done replaying logs)

Restore the DBs with “no loss” option so that logs won’t auto-replay.

Locate restore.env file and the restored logs. They will need to be in same directory, so move restored logs to the restore.env directory if needed.

Change to restore directory and add esutil to the path. (path "D:\Program Files\Exchsrvr\bin"). This makes running commands easier.

Check to ensure where the restore logs end, the production logs begin. (ie, you end at 288.log in restore directory, there should be 289.log in the production log directory.)

Run “esutil /cm” from the restore directory to check that the logs can all be found in their proper places.

Run “esutil /ml E02” from the restore directory to check logs for proper sequencing.

Run “esutil /ml E02” from the production transaction logs directory to check those logs for proper sequencing.

Run “esutil /cc” from the restore directory to replay the logs. It will replay all the restored and production logs.

Mount the DB and change back to auto-mount.

When you have completed restores and mounting, you will need to move the old queue directory files back into the new queue directory.

No comments: