Home > Microsoft Exchange Tips > Exchange Server Administration Tips > Defragment Microsoft Outlook .PST files for better performance
Exchange Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

EXCHANGE SERVER ADMINISTRATION TIPS

Defragment Microsoft Outlook .PST files for better performance


Serdar Yegulalp
02.28.2007
Rating: -5.00- (out of 5)


Exchange Server tips, tutorials and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


As much as companies try not to use .PST files with Microsoft Outlook, sometimes they're simply unavoidable. If you have .PST files, I recommend using Sysinternal's Contig utility for general system optimization and to keep Microsoft Outlook .PST files running faster.

VIEW MEMBER FEEDACK TO THIS EXCHANGE TIP
Mark Russinovich, the genius behind Sysinternals (now a Microsoft entity), created the Contig tool as a way to allow people to quickly defragment single files with as little overhead as possible. It's a command-line tool that uses the Windows defragmentation APIs; it takes a fragmented file and moves all of its clusters together into a single contiguous file.

Since the program doesn't use any undocumented variations on the APIs, it's perfectly safe. You can't lose data when using the program even if you pull the plug on the computer or suffer a crash.

Microsoft Outlook .PST files can grow quite large, so Microsoft Outlook performance can suffer if they're fragmented. As an example, my current 277 MB .PST file was defragged before I signed on this morning. After only half a day's use, it was already in 10 fragments.

The Contig tool can be used to defragment just the .PST file, so you don't have to defragment your whole system just to speed up the performance of that one .PST file. The way I've typically done this is with a batch file that runs Contig against all the files in my mail directory:

contig "%userprofile%\My Documents\My Email"

Note: The exact location of the mail directory will vary.

Because Contig works with the Windows defrag APIs, you can run it while Microsoft Outlook is also running and not suffer any ill effects.

The time it takes to defragment the Microsoft Outlook .PST file will vary depending on the speed of your system and the hard drive. During that time, the .PST file might be intermittently unavailable, or at least perform a little more slowly than normal. On my system, the 277 MB .PST file was defragmented in a matter of seconds.
More on .PST files and Exchange defragmentation:
A primer on Exchange .PST files

Repair damaged .PST files with OutlookFIX

Migrating older .PST files to Microsoft Outlook 2003

Recover lost .PST passwords

Exchange Server defragmentation tips and resources

Microsoft Outlook and Exchange Server administration tools

About the author: Serdar Yegulalp is editor of Windows Insight, a newsletter devoted to hints, tips, tricks, news and goodies for all flavors of Windows users.

MEMBER FEEDBACK TO THIS TIP

Can I add switches to the contig bat file, such as –v, to see the results?

For example: contig –v %profile%/etc
—David B.

******************************************

You can indeed do that, but if you're not around to see the process running you probably won't be able to tell what happened (since the console output won't be logged anywhere).

You can accomplish this by redirecting the output to a log file:

contig -v %profile%/etc > c:\logfiles\contig_log.txt

This is a very simple example, but with this you can see the results of the most recent Contig run no matter when it happened.
—Serdar Yegulalp, tip author

******************************************

If the user does not have Admin privileges, I get "Access Denied" when I try and run this against their .PST file. As soon as I make the user an Admin it works fine. I'm unclear as to why Admin privileges would be required considering the user has full privileges to the directory location within their profile. Any ideas?
—Brian A.

******************************************

The user might have full control over the files, but he might not have been granted the ability to perform the kind of file-system manipulation that the tool in question requires. It's basically the same restriction that prevents a user from running the DEFRAG command-line tool.

One way you can get around this is by creating a scheduled task which runs with Admin permissions; the Admin password is provided by an administrator and stored in an encrypted form, so the user doesn't need to know the password.

(This is also a way to run defrag without admin permissions -- just create a scheduled task for it that runs as admin during an off peak period when the PC is known to be on, so the user doesn't actually need to do anything.)
—Serdar Yegulalp, tip author

******************************************

Does the Contig utility work with Windows XP Tablet PC Edition (and Microsoft Outlook 2000)?
—K.P.

******************************************

Yes, I believe Contig works on all NT-based 32-bit versions of Windows, including XP Tablet Edition.
—Serdar Yegulalp, tip author

Do you have comments on this tip? Let us know.

Please let others know how useful this tip was via the rating scale below. Do you have a useful Exchange Server or Microsoft Outlook tip, timesaver or workaround to share? Submit it to SearchExchange.com. If we publish it, we'll send you a nifty thank-you gift.


Rate this Tip
To rate tips, you must be a member of SearchExchange.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
.PST Files
Migrating .PST files to an Exchange Server information store
Create a group policy to prevent .PST file storage in Exchange 2007
Why are .PST files a security threat to Exchange Server mailboxes?
Microsoft Outlook .PST file FAQs
Control Microsoft Outlook .PST file size and usage via the registry
Best practices for using Outlook .PST files on portable USB drives
Tools that support Boolean searches of Exchange mailbox data and .PSTs
Automatically save Microsoft Outlook email attachments to disk
Migrating .PST files to new Exchange 2003 mail stores
Microsoft Outlook 2003 and OWA email archiving options

Microsoft Exchange Server Defragmentation
How to calculate white space in an Exchange streaming (.STM) file
Is an Exchange 2003 offline defrag needed prior to moving databases?
Defragment Exchange information store database files
Should you use NTFS compression on Exchange Server files?
Exchange Server Standard Maintenance Checklist
Optimize Exchange Server 2003 database maintenance
Running ESEUTIL to compact an information store without installing Exchange Server
Top 10 Exchange tips of 2005
Virtual memory fragmentation in Exchange
Using an external hard drive to defragment Exchange

Microsoft Outlook
Migrating .PST files to an Exchange Server information store
Troubleshoot Outlook 2007 error 0X8004010F on Exchange Server 2007
How to export Global Address List data to Microsoft Office Access
Revised Outlook out-of-office (OOF) messages don't update in OWA
Create a group policy to prevent .PST file storage in Exchange 2007
Microsoft Exchange Server and Outlook email archiving FAQs
Tool deploys customized Microsoft Outlook 2007 configurations
Slipstreaming Microsoft Office 2007 deployments
Does Exchange cached mode work with all versions of Microsoft Outlook?
How to access SharePoint sites through Microsoft Outlook
Microsoft Outlook Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
bacn  (SearchExchange.com)
email bankruptcy  (SearchExchange.com)
offline folder file  (SearchExchange.com)
OST file  (SearchExchange.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2004 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts