Dela via


How to Move the TEMP and TMP Directories

 

The Microsoft Exchange Information Store service uses the TEMP and TMP folders as temporary storage during various operations, such as message conversion and mailbox move operations. The TEMP and TMP environment variables are used to designate which folders in the file system (e.g., which path) should be used by applications that require a temporary workspace. TEMP is typically used by applications, such as Microsoft Exchange and TMP is typically used by development tools, such as Microsoft Visual C++. The path for each variable is usually relative to the security context of the application or tool.

On a non-clustered Exchange server, the Exchange store uses the SYSTEM (e.g., Local System) which uses a default environment variable setting of %Systemroot%\Temp for both TEMP and TMP. Exchange Virtual Servers running in a Windows Server cluster use the environment variable settings for the Cluster Service account, which runs under the context of a specific user security principle. For user accounts, the default environment variable for TEMP and TMP is set to %Userprofile%\Temp.

This topic explains how to move the TEMP and TMP directories in clustered and non-clustered environments.

Before You Begin

Before you perform the procedures in this topic, consider the following recommendations:

  • For optimal performance, it is recommended that you do not use the disk containing the operating system for the TEMP and TMP folders used by Exchange. In addition, you should ensure that these environment variables are set to paths on a fast disk or disk subsystem, such as a RAID 0+1 spindle set.

  • It is recommended that you do not use the disk containing the operating system for the TEMP and TMP folders used by Exchange or Exchange Virtual Servers.

Procedure

To move the TEMP/TMP folders in a non-clustered environment

  1. Log on to the Exchange server computer with an account that has administrative rights.

  2. Right-click My Computer and select Properties.

  3. Select the Advanced tab.

  4. Click the Environment Variables button.

  5. In the System variables area, select TEMP and click the Edit button.

  6. In the Variable value field, enter the new path for the TEMP environment variable and click OK.

  7. In the System variables area, select TMP and click the Edit button.

  8. In the Variable value field, enter the new path for the TMP environment variable and click OK.

  9. Click OK to close the Environment Variables dialog box and OK once more to close the System Properties dialog box.

  10. Reboot the server to apply the change.

To move the TEMP/TMP folders in a clustered environment

  1. Log on to a node in the cluster as the Cluster service account.

  2. Right-click My Computer and select Properties.

  3. Select Advanced.

  4. Click Environment Variables.

  5. In the User variables for <account name> area, select TEMP and click Edit.

  6. In the Variable value field, enter the new path for the TEMP environment variable and click OK.

  7. In the User variables for <account name> area, select TMP and click Edit.

  8. In the Variable value field, enter the new path for the TMP environment variable and click OK.

  9. Click OK to close the Environment Variables dialog box and OK once more to close the System Properties dialog box.

  10. Restart the node to apply the change.

  11. Repeat steps 1 through 10 for each node in the cluster.