Please let others know how useful this tip is via the rating scale at the end of it. Do you have a useful Exchange or Outlook tip, timesaver or workaround to share? Submit it to our tip contest and you could win
VIEW MEMBER FEEDACK TO THIS TIP
The %SystemRoot%\TEMP folder is one of several "dumping grounds" for temporary files in Windows, most often used by server applications like Exchange Server. Every now and then, Microsoft Exchange may create temporary files with the name pattern LB*.TMP in that folder.
These temporary files are used to deal with data movement into and out of the Exchange information store under two conditions:
- When the store .STM file is highly fragmented
- When very large files are being copied into or out of the store
Normally, these files are automatically deleted when the information in them is committed to the store. But Exchange routinely keeps a few of them open for each database. If the database is shut down, dismounted, or the information store service is stopped, then those files should also vanish.
However, if there's an abnormal Exchange shutdown -- if the information store crashes, there's a power failure, or the database is dismounted incorrectly -- the temporary files will remain.
If you try to start Exchange and get a warning that one of the LB*.TMP files could not be locked for exclusive access, you may need to delete the files before you can continue.
You must stop the information store service before deleting the files, and then restart the information store. Trying to delete the temp files before stopping the information store will not work.
The temp files (like any kind of temp files generated by an application) can accumulate over time and use up quite a bit of disk space, without an administrator ever knowing about it. So it's also not a bad idea to do this after an offline defragmentation of the database, or after Exchange Server has been brought down for patches or other administrative action.
The path for the system's temporary directory is defined by the TMP environment variable. If TMP is not mapped to a valid path, the information store will not start up correctly and will log a variety of errors (usually Event ID 470, "Database is partially attached").
If the TMP variable is deleted or mapped to a non-existent path, such as an unattached network-storage device, then the temporary files for each Exchange store will not be created and the stores will not mount.
To double-check that the path is correct:
- Go to Control Panel -> System -> Advanced -> Environment Variables.
- Make sure both TMP and TEMP in System Variables are set to a valid path that has full rights under the SYSTEM account. This path does not have to be in the \Windows directory, but that's the most common place for it.
If the path is present but the database still will not mount with the symptoms described above, the problem may be its representation in the registry. Look in:
See if there are value entries for TMP and TEMP. If there are, delete them, and then delete and recreate their corresponding entries in the System Variables section described above.
About the author: Serdar Yegulalp is editor of the Windows Power Users Newsletter.
MEMBER FEEDBACK TO THIS TIP
This is an excellent article. But, what size message would be considered a "very large file"?
I'd be wary of anything over 1 MB, since that usually means an attachment is present. The main problem is actually not size, per se, but collision issues. When there are already files present in the TEMP directory, some programs will run into problems where they can't complete an action and fail. That's the main danger. Keeping the TEMP directory cleaned out helps.
Serdar Yegulalp, tip author
Do you have comments on this tip? Let us know.
Related information from SearchExchange.com:
This was first published in October 2005