How the Recovery Database Links Back to the Original Database
Topic Last Modified: 2005-05-23
Two Active Directory attributes link a database copy in a recovery storage group with its original database:
msExchMailboxGUID Set on the user object that owns the mailbox.
msExchOrigMDB Set on each database object in the recovery storage group.
The value of the msExchMailboxGUID attribute of a user account in Active Directory matches the GUID of the mailbox in Exchange. As shown in the following figure, after you restore a database to a recovery storage group, each mailbox in the recovery storage group database still carries the same GUID as the corresponding mailbox in the original database. The Mailbox Merge Wizard (ExMerge) uses the GUID to match each mailbox in the recovery storage group database with a user in Active Directory. Once this match is made, ExMerge can move data from the mailbox in the recovery storage group database to the correct mailbox in the original database.
The mailbox GUID is the most fundamental attribute of a mailbox. The value of this attribute is set in the database as the mailbox is created, and the value remains the same for the lifetime of the mailbox. It is a unique value that distinguishes a mailbox from all others. Deleted or purged mailboxes cannot easily be recovered in the recovery storage group because deleting a mailbox strips all mailbox attributes from the Active Directory user object that previously owned the mailbox. If you delete the mailbox and then, before it had been purged, reconnect it to a different user, the same msExchMailboxGUID value will appear as an attribute of the new user. In fact, if you switch only the msExchMailboxGUID values between two user accounts with mailboxes in the same database, you will swap mailboxes between them (additional attributes differentiate user accounts with mailboxes in different databases).
If the msExchMailboxGUID value is altered by a single character, the next time the affected user logs on, Exchange creates a completely new mailbox based on the new GUID. In Exchange System Manager, you would see this user as now having two mailboxes. (After a while, the Mailbox Cleanup Agent runs automatically, and the user's original mailbox will afterward display as disconnected and therefore be a candidate for purging.) Suppose the msExchMailboxGUID was then changed back to its original value. The next time the user logged on, the original mailbox would once again be available, and the new mailbox would become disconnected.
When you delete a mailbox, Exchange actually preserves the mailbox for 30 days in case you want to recover data from it later. Exchange removes only the attributes linking the Active Directory account to the mailbox. Before the mailbox is purged from the database, you can use the Mailbox Recovery Center to reconnect the mailbox to the previous Active Directory account or to a different Active Directory account.
When you purge a mailbox that has been deleted (or when a mailbox is purged automatically 30 days after it was deleted), the mailbox (and its GUID) is removed from the database. At this stage, you cannot use the Mailbox Recovery Center to reconnect the mailbox. However, if the database was backed up between the time the mailbox was deleted and the time it was purged, you can retrieve the mailbox from the backup. For more information about this process, see Recovering Deleted Items or Purged Mailboxes Using a Recovery Storage Group in Exchange Server 2003.
To recover data from a mailbox in the recovery storage group, the mailbox must reside in the original database from which the database backup you are restoring was generated.
Each database in the recovery storage group has an msExchOrigMDB attribute, which links the database to a database in an ordinary storage group. As shown in the following figure, the msExchOrigMDB attribute holds the distinguished name of the original database from which the database in the recovery storage group was generated.
The distinguished name of an object in Active Directory describes the path to its location in the directory. Every Active Directory object carries a distinguishedName attribute that lists the object's distinguished name in a format suitable for copying and pasting into the msExchOrigMDB attribute. Exchange database objects are located in the Services branch of the Configuration container in every Active Directory forest in which Exchange has been installed.
The distinguished name of a typical Exchange database is of this form:
CN=<database name>,CN=<storage group name>,CN=InformationStore,CN=<exchange server name>,CN=Servers,CN=<administrative group name>,CN=Administrative Groups,CN=<Exchange Organization Name>,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=<root active directory domain>,DC=<top level domain, such as com or org>
CN=MailboxDatabase1,CN=Second Storage Group,CN=InformationStore,CN=Exchange1,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=TailspinToys,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=tailspin,DC=com
If you move the mailbox to a different database, ExMerge can identify the mailbox because its GUID is still present in Active Directory, but ExMerge is unable to extract data from it or merge data into it.
In such a case, you have two options:
Move the mailbox back to the original database before using ExMerge.
In Active Directory, change the msExchOrigMDB attribute on the recovery storage group database object to point to the database in which the mailbox now resides.
If you use this option, all mailboxes that were not moved to a new database become inaccessible to ExMerge—unless, of course, you change the msExchOrigMDB attribute back to its initial value.
You cannot change the msExchOrigMDB attribute by using Exchange System Manager or the standard Active Directory administrative programs. You can use tools such as ADSI Edit, LDIFDE, or LDP to view and change raw Active Directory attributes. For detailed instructions, see How to Change the msExchOrigMDB Attribute Using ADSI Edit.