You may find that you need to periodically purge an Exchange mail store of all its messages. For instance, if an...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
Exchange server has been set up to do performance testing or evaluation of third-party Exchange software, it would be useful to have a methodology to purge all mail in the server in one swoop. In another scenario, you may train people on how to work Exchange server, and the server will need to be emptied periodically.
Four relatively simple ways to do this come to mind:
- Back up the databases in a blank state and then restore them over the existing mailboxes. In Exchange 2003 this sort of operation is relatively easy, thanks to the presence of the Recovery Storage Group (RSG). The RSG holds restored backups for copying to the appropriate group, so a backup can be restored out of the RSG as needed.
- Delete and recreate the mailboxes using the Active Directory Users and Computers (ADUC). This has the disadvantage of being overkill -- unless you want to delete the mailboxes wholesale and then recreate them. If you have all the mailboxes in question in a single organizational unit, this can be done relatively quickly. This process could also be automated with a script for further speed.
- Use an application like Active Folders Content Manager to automatically delete messages as needed. This is one way to purge selectively, and can be useful if you find you need to do other selective deletions that aren't really easily constrained through organizational units (OUs) or other standard Exchange mechanisms.
- The simplest and most direct way: Unmount the database, delete the .EDB and .STM files, and remount the database. When Exchange senses the needed files are missing, it will recreate them. While this is probably the easiest method, it is also the most global and unforgiving.
Serdar Yegulalp is the editor of the Windows 2000 Power Users Newsletter
monthly tip contest