EXMerge is your friend

Published Jul 01 2004 10:58 AM 13.6K Views

One of the best utilities ever created for Exchange is EXMerge. You can get the latest version of this tool here, where it is listed as the Mailbox Merge Wizard:
 
http://www.microsoft.com/exchange/downloads/2003.asp
 
What EXMerge does may sound simple and may not seem to be all that generally useful: It can copy (or move) messages, rules and forms from an Exchange mailbox into an Outlook .PST file. And it can copy messages from an Outlook .PST file back to an Exchange mailbox.  (If you're new to Exchange and Outlook, a .PST file is a message store you can create in Outlook regardless of whether you use Exchange. You can deliver mail to it from an Internet mail account, or create multiple ones to archive and organize messages. In current versions of Outlook, you can create a .PST file from File, New, Outlook Data File.)
 
As EXMerge has evolved over the years, it has developed very sophisticated filtering capabilities. You can filter the messages EXMerge operates on by selecting or excluding folders, or by date and time ranges. You can tell it to look for a message in all Exchange mailboxes with a certain subject line or attachment name. When it finds such a message, it can copy it, move or delete it. This can be useful in a variety of situations, including cleaning up email virus messages before naive users act on them.
 
EXMerge can operate on a single mailbox, selected mailboxes or all mailboxes in an Exchange store. It can also process a batch of .PST files, matching them up correctly with Exchange mailboxes when importing data from .PST files to an Exchange server.
 
EXMerge is smart about duplicating messages: If you export all the contents of a mailbox twice to the same .PST file, you won't end up with two copies of each message. When going from .PST file to Exchange server mailbox, EXMerge is just as smart about not importing duplicates. One side effect of this excellent duplicate detection is that you can use EXMerge as a "brick backup" solution. A brick backup is a backup of a single mailbox instead of an entire database. Some third party backup solutions provide brick backup capabilities. If your backup solution doesn't, then you can use EXMerge instead. Because it is smart about duplicates, it will only export new messages to an existing .PST file each time you run it, thus providing "incremental" backup capability.
 
EXMerge is also very scriptable, which makes it easy to use it for backup or automated archiving. To learn how to script EXMerge, consult the thorough documentation that accompanies the utility. It's not just a readme file, but a comprehensive user's manual. EXMerge supports a very sophisticated .INI file that you can use to configure almost all settings, thus allowing you to execute EXMerge for a variety of different uses with a simple command line that points to a particular .INI file. You can even pick settings in the user interface, and have them saved to automatically generate an appropriate .INI file.
 
EXMerge uses a wizard-style graphical interface. You probably won't need the documentation to figure out how to use it, with one exception: You need to understand the difference between a "one step" and a "two step" merge. To understand that, you should know something about EXMerge's history.
 
EXMerge was initially developed to assist with disaster recovery of Exchange databases. Its initial purpose was to merge messages between two Exchange databases. It was originally developed in Microsoft PSS by Kali Buhariwalla, who maintained and improved it year after year. Recently, EXMerge was "adopted" by the Exchange product group, and Kali has become a Principal Consultant for Microsoft.
 
Why should you want to merge data between databases? Suppose an Exchange database has been damaged and can't be mounted without being repaired first. Repair can take hours. In the meantime, you want to restore mail service to users. So you bring up a blank database for them, and take the damaged database to another server for repair. Exchange databases are portable between servers (subject to a few rules), and after repair you can mount the repaired database on the other server. But your problem now is that you have two databases, and users can only connect to one at a time. Users have new messages in the new database and old messages in the old database. To finish the job, you have to get all messages back into a single database.
 
EXMerge comes to the rescue by extracting messages from database A to a PST file and then importing them to database B. The .PST file is used merely as an intermediary staging area. This is what happens when an administrator selects a "one step" merge. In the "two step" merge, the administrator chooses either to extract data from Exchange mailboxes (Step 1) or to import data from .PST files (Step 2). The steps are separated so that you can preserve the .PST files in case you want them for more than just a staging area (perhaps for a brick backup). Also, what if your test server and your production server are on disconnected networks and you can't reach both the source and destination servers simultaneously? Then you can do Step 1, transport the PST files to the destination server, and then do Step 2 when ready.
 
Until SP1 of Exchange 2003, the only way to extract mailbox data from a Recovery Storage Group was to use the Exchange 2003 version of EXMerge. In SP1, some of EXMerge's functionality has been integrated into the Exchange System Manager (ESM), and you can now select and right click to merge whole mailboxes between databases--this lets you do a basic "one step" merge, and this is the task you'll most often want to do during a disaster recovery. However, the ESM merge feature lacks filtering and other EXMerge features that administrators have found so useful for purposes other than disaster recovery.
 
Even if you can't think of a current use for EXMerge, you should download it and familiarize yourself with the way it works. EXMerge should be in every Exchange administrator's toolkit.

- Mike Lee

16 Comments
%3CLINGO-SUB%20id%3D%22lingo-sub-610222%22%20slang%3D%22en-US%22%3EEXMerge%20is%20your%20friend%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-610222%22%20slang%3D%22en-US%22%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22Verdana%22%20size%3D%222%22%3EOne%20of%20the%20best%20utilities%20ever%20created%20for%20Exchange%20is%20EXMerge.%20You%20can%20get%20the%20latest%20version%20of%20this%20tool%20here%2C%20where%20it%20is%20listed%20as%20the%20Mailbox%20Merge%20Wizard%3A%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3E%3C%2FFONT%3E%3CA%20href%3D%22http%3A%2F%2Fwww.microsoft.com%2Fexchange%2Fdownloads%2F2003.asp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CFONT%20face%3D%22Verdana%22%20size%3D%222%22%3Ehttp%3A%2F%2Fwww.microsoft.com%2Fexchange%2Fdownloads%2F2003.asp%3C%2FFONT%3E%3C%2FA%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22Verdana%22%20size%3D%222%22%3E%26nbsp%3B%3CBR%20%2F%3EWhat%20EXMerge%20does%20may%20sound%20simple%20and%20may%20not%20seem%20to%20be%20all%20that%20generally%20useful%3A%20It%20can%20copy%20(or%20move)%20messages%2C%20rules%20and%20forms%20from%20an%20Exchange%20mailbox%20into%20an%20Outlook%20.PST%20file.%20And%20it%20can%20copy%20messages%20from%20an%20Outlook%20.PST%20file%20back%20to%20an%20Exchange%20mailbox.%26nbsp%3B%20(If%20you're%20new%20to%20Exchange%20and%20Outlook%2C%20a%20.PST%20file%20is%20a%20message%20store%20you%20can%20create%20in%20Outlook%20regardless%20of%20whether%20you%20use%20Exchange.%20You%20can%20deliver%20mail%20to%20it%20from%20an%20Internet%20mail%20account%2C%20or%20create%20multiple%20ones%20to%20archive%20and%20organize%20messages.%20In%20current%20versions%20of%20Outlook%2C%20you%20can%20create%20a%20.PST%20file%20from%20File%2C%20New%2C%20Outlook%20Data%20File.)%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EAs%20EXMerge%20has%20evolved%20over%20the%20years%2C%20it%20has%20developed%20very%20sophisticated%20filtering%20capabilities.%20You%20can%20filter%20the%20messages%20EXMerge%20operates%20on%20by%20selecting%20or%20excluding%20folders%2C%20or%20by%20date%20and%20time%20ranges.%20You%20can%20tell%20it%20to%20look%20for%20a%20message%20in%20all%20Exchange%20mailboxes%20with%20a%20certain%20subject%20line%20or%20attachment%20name.%20When%20it%20finds%20such%20a%20message%2C%20it%20can%20copy%20it%2C%20move%20or%20delete%20it.%20This%20can%20be%20useful%20in%20a%20variety%20of%20situations%2C%20including%20cleaning%20up%20email%20virus%20messages%20before%20naive%20users%20act%20on%20them.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EEXMerge%20can%20operate%20on%20a%20single%20mailbox%2C%20selected%20mailboxes%20or%20all%20mailboxes%20in%20an%20Exchange%20store.%20It%20can%20also%20process%20a%20batch%20of%20.PST%20files%2C%20matching%20them%20up%20correctly%20with%20Exchange%20mailboxes%20when%20importing%20data%20from%20.PST%20files%20to%20an%20Exchange%20server.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EEXMerge%20is%20smart%20about%20duplicating%20messages%3A%20If%20you%20export%20all%20the%20contents%20of%20a%20mailbox%20twice%20to%20the%20same%20.PST%20file%2C%20you%20won't%20end%20up%20with%20two%20copies%20of%20each%20message.%20When%20going%20from%20.PST%20file%20to%20Exchange%20server%20mailbox%2C%20EXMerge%20is%20just%20as%20smart%20about%20not%20importing%20duplicates.%20One%20side%20effect%20of%20this%20excellent%20duplicate%20detection%20is%20that%20you%20can%20use%20EXMerge%20as%20a%20%22brick%20backup%22%20solution.%20A%20brick%20backup%20is%20a%20backup%20of%20a%20single%20mailbox%20instead%20of%20an%20entire%20database.%20Some%20third%20party%20backup%20solutions%20provide%20brick%20backup%20capabilities.%20If%20your%20backup%20solution%20doesn't%2C%20then%20you%20can%20use%20EXMerge%20instead.%20Because%20it%20is%20smart%20about%20duplicates%2C%20it%20will%20only%20export%20new%20messages%20to%20an%20existing%20.PST%20file%20each%20time%20you%20run%20it%2C%20thus%20providing%20%22incremental%22%20backup%20capability.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EEXMerge%20is%20also%20very%20scriptable%2C%20which%20makes%20it%20easy%20to%20use%20it%20for%20backup%20or%20automated%20archiving.%20To%20learn%20how%20to%20script%20EXMerge%2C%20consult%20the%20thorough%20documentation%20that%20accompanies%20the%20utility.%20It's%20not%20just%20a%20readme%20file%2C%20but%20a%20comprehensive%20user's%20manual.%20EXMerge%20supports%20a%20very%20sophisticated%20.INI%20file%20that%20you%20can%20use%20to%20configure%20almost%20all%20settings%2C%20thus%20allowing%20you%20to%20execute%20EXMerge%20for%20a%20variety%20of%20different%20uses%20with%20a%20simple%20command%20line%20that%20points%20to%20a%20particular%20.INI%20file.%20You%20can%20even%20pick%20settings%20in%20the%20user%20interface%2C%20and%20have%20them%20saved%20to%20automatically%20generate%20an%20appropriate%20.INI%20file.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EEXMerge%20uses%20a%20wizard-style%20graphical%20interface.%20You%20probably%20won't%20need%20the%20documentation%20to%20figure%20out%20how%20to%20use%20it%2C%20with%20one%20exception%3A%20You%20need%20to%20understand%20the%20difference%20between%20a%20%22one%20step%22%20and%20a%20%22two%20step%22%20merge.%20To%20understand%20that%2C%20you%20should%20know%20something%20about%20EXMerge's%20history.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EEXMerge%20was%20initially%20developed%20to%20assist%20with%20disaster%20recovery%20of%20Exchange%20databases.%20Its%20initial%20purpose%20was%20to%20merge%20messages%20between%20two%20Exchange%20databases.%20It%20was%20originally%20developed%20in%20Microsoft%20PSS%20by%20Kali%20Buhariwalla%2C%20who%20maintained%20and%20improved%20it%20year%20after%20year.%20Recently%2C%20EXMerge%20was%20%22adopted%22%20by%20the%20Exchange%20product%20group%2C%20and%20Kali%20has%20become%20a%20Principal%20Consultant%20for%20Microsoft.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EWhy%20should%20you%20want%20to%20merge%20data%20between%20databases%3F%20Suppose%20an%20Exchange%20database%20has%20been%20damaged%20and%20can't%20be%20mounted%20without%20being%20repaired%20first.%20Repair%20can%20take%20hours.%20In%20the%20meantime%2C%20you%20want%20to%20restore%20mail%20service%20to%20users.%20So%20you%20bring%20up%20a%20blank%20database%20for%20them%2C%20and%20take%20the%20damaged%20database%20to%20another%20server%20for%20repair.%20Exchange%20databases%20are%20portable%20between%20servers%20(subject%20to%20a%20few%20rules)%2C%20and%20after%20repair%20you%20can%20mount%20the%20repaired%20database%20on%20the%20other%20server.%20But%20your%20problem%20now%20is%20that%20you%20have%20two%20databases%2C%20and%20users%20can%20only%20connect%20to%20one%20at%20a%20time.%20Users%20have%20new%20messages%20in%20the%20new%20database%20and%20old%20messages%20in%20the%20old%20database.%20To%20finish%20the%20job%2C%20you%20have%20to%20get%20all%20messages%20back%20into%20a%20single%20database.%20%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EEXMerge%20comes%20to%20the%20rescue%20by%20extracting%20messages%20from%20database%20A%20to%20a%20PST%20file%20and%20then%20importing%20them%20to%20database%20B.%20The%20.PST%20file%20is%20used%20merely%20as%20an%20intermediary%20staging%20area.%20This%20is%20what%20happens%20when%20an%20administrator%20selects%20a%20%22one%20step%22%20merge.%20In%20the%20%22two%20step%22%20merge%2C%20the%20administrator%20chooses%20either%20to%20extract%20data%20from%20Exchange%20mailboxes%20(Step%201)%20or%20to%20import%20data%20from%20.PST%20files%20(Step%202).%20The%20steps%20are%20separated%20so%20that%20you%20can%20preserve%20the%20.PST%20files%20in%20case%20you%20want%20them%20for%20more%20than%20just%20a%20staging%20area%20(perhaps%20for%20a%20brick%20backup).%20Also%2C%20what%20if%20your%20test%20server%20and%20your%20production%20server%20are%20on%20disconnected%20networks%20and%20you%20can't%20reach%20both%20the%20source%20and%20destination%20servers%20simultaneously%3F%20Then%20you%20can%20do%20Step%201%2C%20transport%20the%20PST%20files%20to%20the%20destination%20server%2C%20and%20then%20do%20Step%202%20when%20ready.%20%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EUntil%20SP1%20of%20Exchange%202003%2C%20the%20only%20way%20to%20extract%20mailbox%20data%20from%20a%20Recovery%20Storage%20Group%20was%20to%20use%20the%20Exchange%202003%20version%20of%20EXMerge.%20In%20SP1%2C%20some%20of%20EXMerge's%20functionality%20has%20been%20integrated%20into%20the%20Exchange%20System%20Manager%20(ESM)%2C%20and%20you%20can%20now%20select%20and%20right%20click%20to%20merge%20whole%20mailboxes%20between%20databases--this%20lets%20you%20do%20a%20basic%20%22one%20step%22%20merge%2C%20and%20this%20is%20the%20task%20you'll%20most%20often%20want%20to%20do%20during%20a%20disaster%20recovery.%20However%2C%20the%20ESM%20merge%20feature%20lacks%20filtering%20and%20other%20EXMerge%20features%20that%20administrators%20have%20found%20so%20useful%20for%20purposes%20other%20than%20disaster%20recovery.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EEven%20if%20you%20can't%20think%20of%20a%20current%20use%20for%20EXMerge%2C%20you%20should%20download%20it%20and%20familiarize%20yourself%20with%20the%20way%20it%20works.%20EXMerge%20should%20be%20in%20every%20Exchange%20administrator's%20toolkit.%3CBR%20%2F%3E%3C%2FFONT%3E%3CFONT%20face%3D%22Verdana%22%20size%3D%222%22%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22Verdana%22%20size%3D%222%22%3E-%20%3CA%20href%3D%22http%3A%2F%2Fblogs.msdn.com%2Fexchange%2Farticles%2F70081.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMike%20Lee%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-610222%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ETroubleshooting%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Version history
Last update:
‎Jul 01 2019 02:58 PM
Updated by: