Removing Orphaned Objects from the Exchange Directory
Why do objects you think you've deleted from a site remain in the directory of remote sites? Find out about orphaned objects and what you can do about them.
July 31, 1999
I recently read on an Exchange newsgroup about a company that had to move its president's mailbox to another Exchange site in the organization. The administrator had saved the president's mail in a personal store (.pst file) and deleted the mailbox from the old site. Although the administrator assumed that the deletion would replicate to the new site overnight, the next morning he found that the name was gone from the original site but remained in the remote site. In spite of trying every technique he could think of, he couldn't remove the name from the remote site. The mailbox had become an orphaned object. Here's what causes orphaned objects and what you can do to remove them.
Deleting Exchange Objects
When you delete objects from the Exchange Directory, Exchange doesn't simply remove the object from the directory; it hides the object from view and sets an Is-Deleted attribute to True. In addition, Exchange adds a tombstone attribute to the object. The tombstone consists of a timestamp and the date you deleted the object; it has a default lifetime of 30 days. Every 12 hours, Exchange executes a garbage collection thread, which removes objects whose Is-Deleted attribute is set to True and whose tombstone lifetime has expired. (You can use the Microsoft Exchange Administrator program to change the defaults for the tombstone lifetime and the garbage collection schedule.)
Why Objects Are OrphanedThe deletion process is simple when you have only one Exchange site; the problems start when you add more sites. When you delete an object in an organization with more than one site, Exchange must replicate the object's deletion attributes to the other sites. The local site informs the remote site of the deletion. When the sites receive the replicated attributes of the object, Exchange ordinarily hides the object from the directory of both sites. For various reasons (e.g., WAN problems, a server down for maintenance), sometimes the remote sites don't receive the replicated attributes. Usually, Exchange catches its mistake on the next replication cycle. However, if the server is down for an extended time and the object's tombstone expires, Exchange no longer considers the object an object and, therefore, doesn't replicate it. Now, the remote site thinks this object is still an active member of the directory, whereas the local site has completely removed the object from the directory. In this situation, the object becomes an orphaned object. Occasionally, Exchange unexplainably orphans an object even when its tombstone's lifetime is 30 days and you expect the object to replicate within an hour.
Removing an Orphaned Object
So, how do you get rid of the object? As you've seen, you can't simply delete the object from the remote site because the remote site doesn't have a writeable copy of the object. Here are two methods I've used to remove orphaned objects. The first method is the easiest and has little effect on other sites. The second method can affect all the sites in your environment, so use it only as a last resort.
Method 1. Use the following steps to recreate and then delete the orphaned object (in this case, a mailbox).
1. With the Exchange Administrator program in raw mode, connect to the remote site that contains the orphaned object. Highlight the orphaned object, and select File, Raw properties to see a listing of all the object attributes, as Screen 1 shows. Note the Directory Name, Obj-Dist-Name, and Object-Version attributes. You use these attributes to recreate the original object.
2. Connect to the local site that housed the original mailbox. Recreate the mailbox by selecting File, New Mailbox in Exchange Administrator. Use the information from Directory Name and Obj-Dist-Name, and create the new mailbox in the recipient container that contained the orphaned object. After creating the new mailbox, view the object's Raw properties and make sure the Directory Name and the Obj-Dist-Name match what you noted from the orphaned object.
3. Modify some attributes of the new mailbox (e.g., add an address or phone number) until its Object-Version Edit value, which you see in Screen 2, is greater than the Object-Version value for the orphaned object, which you see in Screen 3.
4. Either force replication between the two sites or wait for the object to replicate. You can verify that the new object has replicated by looking at the Object-Version of the orphaned object. When the Object-Version has increased to the new value, you know this site has the new replica.
5. Finally, go back to the site containing the new mailbox and delete the new mailbox. This deletion will replicate to the other site, removing the orphaned object.
Method 2. Delete the directory replication connector. Deleting the directory replication connector removes all objects that the other site owns, which includes the orphaned object. Because this operation can affect your entire Exchange organization, use this technique only in organizations with a few small Exchange sites or in nonproduction environments. In large Exchange organizations, the process of replicating the information about the deleted site and then reinstalling the directory replication connector might take many days.
Orphans No More
Orphaned objects can be frustrating. However, by knowing why objects become orphaned and how to remove them, you'll be better prepared to deal with them when they occur.
About the Author
You May Also Like