Help and Support
 

powered byLive Search

How to use the Inbox Repair Tools to recover e-mail messages in Outlook 2002, Outlook 2003 and Outlook 2007

Article ID:287497
Last Review:December 10, 2007
Revision:3.0
This article was previously published under Q287497
For a Microsoft Outlook 2000 version of this article, see 197316 (http://support.microsoft.com/kb/197316/).
For a Microsoft Outlook 2000 (IMO) version of this article, see 197315 (http://support.microsoft.com/kb/197315/).
For a Microsoft Outlook 98 version of this article, see 181325 (http://support.microsoft.com/kb/181325/).
On This Page

SUMMARY

This article describes how to use the Inbox Repair Tool to recover folders and items from a corrupted Personal Folders (.pst) file. This article also describes how the tool validates and corrects errors.

Back to the top

MORE INFORMATION

NOTE: The examples listed below refer to using the Inbox Repair Tool on a .pst file. The same procedures apply to an offline folder (.ost) file. To locate the offline folder (.ost) file, click to select Offline Folders (*.ost) in Select File to Scan.

The Inbox Repair Tool (Scanpst.exe) is a tool designed to help repair problems associated with Personal Folder (.pst) files. The Scanost.exe tool is used to repair offline folder (.ost) files.

The Inbox Repair Tool installs automatically during setup. These programs are typically located in one of the following folders:
disk drive :\Program Files\Common Files\System\Mapi\1033\
disk drive :\Program Files\Common Files\System\MSMAPI\1033
For a 64-bit operating system, the programs are typically installed in one of the following folders:
disk drive:\Program Files(x86)\Common Files\System\Mapi\1033\
disk drive:\Program Files(x86)\Common Files\System\MSMAPI\1033

Back to the top

Run the Inbox Repair Tool

1.Click Start and point to Find, or Search, depending upon your operating system.
2.In the Search for files or folders named box, type scanpst.exe.
3.Double click the Scanpst.exe file to open the program.
4.Type the path and file name of the pst file, or click Browse to locate the file using the windows file system.
5.Click Start.

Back to the top

What the Inbox Repair Tool Does

When you run the Inbox Repair Tool on a Personal Folders (.pst) file, it does the following:
The Inbox Repair Tool analyses the Personal Folders (.pst) file directory structure and item headers to try and recover all folders and items.
If the Inbox Repair Tool recovers the Personal Folders (.pst) file, it means that the repair tool found problems, and repaired what it could.
The Inbox Repair Tool tries to turn any file into a Personal Folders (.pst) file. (For example, if you rename an executable file to "Something.pst," (without quotation marks) the tool changes the file to a mountable .pst file).
The Inbox Repair Tool makes a backup copy of any Personal Folders (.pst) file before trying to repair the file. For example, "Something.pst” will be saved as "Something.bak" in the same directory as "Something.pst". If you have to recover "Something.bak," change the extension to .pst, and the file is again a Personal Folders file. Any problems that existed before you ran the Inbox Repair Tool will still exist in the file.

Back to the top

How the Inbox Repair Tool validates and corrects errors

ScanPST mostly validates and corrects errors in the internal data structures of a .pst file. The .pst file is a database file. Therefore, structures, such as BTrees and reference counts, are checked and repaired as necessary. These low-level objects have no knowledge of the upper-level structures, such as messages, calendar items, and so on, that are built upon them. If ScanPST determines a specific block of the structure or table is unreadable or corrupted, ScanPST removes it. If that block was part of a specific item in Outlook, the item will be removed when it is validated. User may not expect this behavior. However, the removal of the item is appropriate given the circumstances. Also, this specific type of situation is probably very rare, and it will always be entered in the ScanPST log file.

At a higher level, the more visible changes that users will see involve folders and messages.

Folders

At some point, ScanPST will examine every folder in the PST. When ScanPST finds a folder, it performs the following operations:
1. ScanPST makes sure that there are the correct tables associated with the folder.
2.ScanPST checks every row in each table and makes sure that the message or the subfolder exists in the system.
3. If ScanPST cannot find the message or the subfolder, ScanPST removes the row from the table.
4. If ScanPST does find the message or the subfolder, ScanPST validates the message or the folder.
5.If that validation fails, the message of folder is considered corrupted, and it is removed from the table and deleted from the database.
6.If the validation succeeds, ScanPST does another check to make sure that the now recovered message values are consistent with the values in the table. Corrupted folders are re-created from scratch if it is necessary. These folders contain no user data.

Messages

Most users will be concerned by message operations, because a corrupted item is likely to cause something to be deleted from the .pst file. ScanPST performs the following operations on messages:
1. ScanPST does some basic validation of attachment tables and recipient tables. This operation resembles how a folder works with the messages in it.
2.As soon as the recipient table is validated to guarantee correctly formatted recipients, ScanPST makes any changes that are required to synchronize these valid recipient table contents to the recipient properties on the message. ScanPST also guarantees that the message's parent folder refers to a valid folder. The following message properties are checked to make sure that they follow valid data formats:
PR_MESSAGE_CLASS
ScanPST checks to see that this property exists. If the property does not exist, it is set to IPM.Note.
PR_MESSAGE_FLAGS
Each flag is validated separately.
PR_SUBMIT_FLAGS
This validation resembles the operation for message flags.
PR_CLIENT_SUBMIT_TIME
If the submit flags indicate that the message is marked as submitted, this property must exist. If not, the time is set to now.
PR_SEARCH_KEY
This property must exist. If the property is not present, a random GUID is generated for it.
PR_CREATION_TIME
This property must exist. If the property is not present, the time is set to now.
PR_LAST_MODIFICATION_TIME
This property must exist. If the property is not present, the time is set to now.
PR_MESSAGE_SIZE
Sizes are recalculated and compared to stored values. If sizes differ by some delta, the calculated value is written.
No validation is explicitly done on body-related properties or on subject-related properties, except the implicit low-level validation that this article discusses earlier. The recipient display properties are modified to be consistent with the recovered recipient table. Once this operation is completed, other algorithms are run to collect all of the orphaned messages and to put them in an orphans folder.

Back to the top

Recovered Personal Folders File

After you run the Inbox Repair Tool, start Outlook by using the profile that contains the Personal Folders (.pst) file that you tried to repair. On the View menu, click Folder List to turn on the Folder List view. In your Folder List, you should see the following recovered folders:
   Recovered Personal Folders

      Calendar
      Contacts
      Deleted Items
      Inbox
      Journal
      Notes
      Outbox
      Sent Items
      Tasks
				
These recovered folders are usually empty, because this is a rebuilt .pst file. You should also see a folder called "Lost And Found" (without quotation marks). This folder contains folders and items that the Inbox Repair Tool recovered. Items that are missing from the Lost and Found folder are beyond repair.

Back to the top

How to Recover Repaired Items

You should move as many of the items from the Lost And Found folder to a new Personal Folders (.pst) file in your profile. First, create a new Personal Folders (.pst) file entry in your profile and drag any recovered items from the Lost And Found folder to the appropriate location in your new Personal Folders (.pst) file.

How to Create a New Personal Folder (.pst) File in Your Profile

1.Start Outlook with the profile that contains your recovered Personal Folder (.pst) files.
2.On the File menu, click Data File Management.
3.Click Add to open the New Outlook Data File dialog box.
4.In the Types of storage box, click to select Personal Folders File (.pst), and then click OK.
5.In the Create or Open Outlook Data File dialog box, click a directory and a file name for your new Personal Folders (.pst) file, and then click Open.
6.Click OK.
You should have a new Personal Folders (.pst) file in your profile. Drag the recovered items from the Lost And Found folder to your new Personal Folders (.pst) file. When you have finished moving all items, you may remove the Recovered Personal Folders (.pst) file, including the Lost And Found folder, from your profile.

Back to the top

How to Recover Items from the Backup Personal Folders (.pst) File

NOTE: If you cannot open your original Personal Folders (.pst) file before you run Inbox Repair Tool, it is possible that the following procedures may not work. If you are able to open the original Personal Folders (.pst) file, then it is possible that the following procedures may allow you to recover additional items from your damaged Personal Folders (.pst) file.

When you run Inbox Repair Tool, the option to create a backup of the original Personal Folders (.pst) file is selected. This option creates a file on your hard disk called <file name>.bak, and is a copy of the original <file name>.pst file with a different extension. The .bak file resides in the directory of your original Personal Folders (.pst) file.

You may be able to recover items from the .bak file that Inbox Repair Tool could not. Make a copy of the .bak file, giving the file a new name with a .pst extension, for example "Newname.pst" (without quotation marks).

Open Outlook using the profile that contains the your new Personal Folders (.pst) file from step 4 in the "Recovering Repaired Items" section of this article, and try to import the "Newname.pst" folder by using the Import And Export Wizard. To do this:
1.On the File menu, click Import And Export.
2.Click Import from another program or file, and then click Next.
3.Click to select Personal Folder File (.pst), and then click Next.
4.Under File To Import, type your Newname.pst file. Under Options, click Do not import duplicates, and click Next.
5.Under Select the folder to import from, click to select the Personal Folders (.pst) file, and click to select Include subfolders, click to select Import folders into the same folder in, click your new Personal Folders (.pst) file from step 4 in the "Recovering Repaired Items" section of this article, and then click Finish.
NOTE: Remember that the backup file was the original corrupted file, and you may find that you cannot recover anything other than what was recovered in the Lost And Found folder. If you are unable to import the Newname.pst file into Outlook, then you have lost all the information that is not in the Lost And Found folder.

If a file has approached the 2 GB size limit and the Inbox Repair Tool is not working, you can try the PST/OST cropping tool. You can use this procedure if you are using Outlook 2002 or if you using an ANSI .pst file with Outlook 2003.

For more information about the PST/OST cropping tool, click the following article number to view the article in the Microsoft Knowledge Base:
296088 (http://support.microsoft.com/kb/296088/) Oversized PST and OST Crop tool

For more information about binary trees (btrees), visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/library/Aa289150(VS.71).aspx (http://msdn2.microsoft.com/en-us/library/Aa289150(VS.71).aspx)

Back to the top


APPLIES TO
Microsoft Office Outlook 2007
Microsoft Office Outlook 2003
Microsoft Outlook 2002 Standard Edition

Back to the top

Keywords: 
kbhowto kbrepair KB287497

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by Email, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.