CAUSE
In Exchange 2000 and in Exchange 2003, this problem occurs if you restore a particular store without deleting all the transaction logs first. When you mount a blank store, it records the
createDB transaction in the transaction logs. Then when you restore the same store, it plays through the logs off of the backup in addition to the logs in the transaction log directory.
In this scenario, the restore does bring back all the old data, but as you play through the logs in the production transaction log directory, you eventually hit the
createDB transaction. This causes you to unknowingly mount blank databases again. The
createDB transaction is then completed with the rest of the logs. Therefore, you only have the mail from the time period after you mounted the blank database.
To summarize what occurs:
- Restore runs and is completed. The restored database is on the hard disk.
- Hard recovery starts. Logs are starting to replay in the database.
- The log that has the createDB transaction is also replayed. This creates the new database, as intended.
- Replay of any logs after that log is completed. That gives you only the mail that was received after the blank database was created.
The
createDB transaction is just another transaction for your database engine. It is replayed the same as any other transaction.
Note This
createDB transaction behavior did not occur in Microsoft Exchange 5.5 or in earlier versions of Exchange. It only occurs in Exchange 2000 and in Exchange 2003.
RESOLUTION
Solution if there is only one mailbox store and one public store
This problem is fairly easy to resolve if you are running Exchange 2000 or the Standard edition of Exchange 2003, or if you are running the Enterprise edition of either product that only has one public store and one mailbox store. You would just select the
This database can be overwritten by a restore option so that the database can be overwritten by a restore in Exchange System Manager (ESM). This is the store that we are trying to restore that has been started with blank databases. In the scenario that is described earlier, this would be MBX2.
Restore the store in question. Make sure to click the
Last backup set check box to select it. Then dismount all the stores, delete the transaction logs and the checkpoint file, and then try to mount the stores. The restore will complete, but when you try to mount the store, all the following events are logged in the application event log:
Event 1
Event Type: Error
Event Source: ESE
Event Category: Logging/Recovery
Event
ID: 494
Description:
Information Store (1352) Database recovery failed with error -1216 because it encountered references to a database, 'C:\Program Files\Exchsrvr\mdbdata\mbx2.edb', which is no longer present. The database was not brought to a consistent state before it was removed (or possibly moved or renamed). The database engine will not permit recovery to complete for this instance until the missing database is re-instated. If the database is truly no longer available and no longer required, please contact PSS for further instructions regarding the steps required in order to allow recovery to proceed without this database.
Event 2
Event Type: Error
Event Source: ESE
Event Category: Logging/Recovery
Event ID: 454
Description:
Information Store (1352) Database recovery/restore failed with unexpected error -1216.
Event 3
Event Type: Information
Event Source: ESE
Event Category: General
Event ID: 101
Description:
Information Store (1352) The database engine stopped.
Event 4
Event Type: Error
Event Source: ESE BACKUP
Event Category: Callback
Event ID: 904
Description: Information Store (1352) Callback function call ErrESECBRestoreComplete ended with error 0xFFFFFB40.
Event 5
Event Type: Error
Event Source: ESE BACKUP
Event Category: Recovery
Event ID: 903
Description:
Information Store (1352) Restore from directory c:\temp\First Storage Group ended with error (Error returned from a callback function call (0xFFFFFB40).
At this point, you can run the
eseutil /r eXX /i command and then successfully mount the stores in ESM. "eXX" stands for the base log file name. For example, "e00" is the base log file name in the first storage group. After you run
eseutil /r eXX /i, you should see all your old data, as expected.
Solution if there are multiple mailbox stores or public stores
The solution that is described earlier is valid, given its simpler environment. However, you may be running the Enterprise edition of Exchange 2000 or of Exchange 2003 to take advantage of the capability of having multiple stores in one storage group. If you want to apply the solution that is described earlier, you would have to dismount
all the stores in the storage group just so that you could restore a single store. Again, this would have to be done
only if one of the stores was started with blank database files since the last backup.
Important Typically, you can restore a single database store without having to dismount the other database stores in the storage group. However, in this particular case, you
must dismount all the stores in the storage group before you restore the single store.
In this scenario, we recommend that you select the
This database can be overwritten by a restore option so that the database can be overwritten by a restore in ESM. Then restore the store in question. Make sure to click the
Last backup set check box to select it. Then dismount
all the stores in the storage group, and then delete the transaction logs and the checkpoint file from their respective directories. Then run the
eseutil /r eXX /i command, and then mount
all the stores in ESM. All the stores should mount successfully, and the restored store should now contain all the old data.
Note This issue does not occur in Microsoft Exchange Server 2003 Service Pack 1 (SP1). In Exchange 2003 SP1, if the database .edb and .stm files are already there at the beginning of the recovery process with a different database signature because of an offline or online restore from a backup, the database files will not be deleted. The key to the new behavior is that the
createDB process does not delete the old databases from the restore because they have a different database signature.
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
836993
How to obtain the latest updates and service packs for Exchange Server 2003