Exchange 2010 Moving Mail Queue

In early 2009 I wrote an post entitled “Exchange 2007 SP1 Moving Mail Queue/Transport Dumpster”. This post is still one of the most frequently viewed posts on my blog so I thought it was time to post an update for Exchange 2010.

In Exchange 2010, the location of the queue database and queue database transaction logs are controlled by the QueueDatabasePath and QueueDatabaseLoggingPath parameters in the EdgeTransport.exe.config application configuration file. This file is located in the C:\Program Files\Microsoft\Exchange Server\V14\Bin directory. To change the location of the queue database and queue database transaction logs, simple open this file in Notepad and locate the following values under

Change these paths to match your requirements and save the file.

excas19

Restart the Microsoft Exchange Transport service for these changes to take effect. Once restarted, you should notice that new Mail.que and Trn.chk files are created at the new QueueDatabasePath location and new Trn.log, Trntmp.log, Trnres00001.jrs, Trnres00002.jrs, and Temp.edb files at the new QueueDatabaseLoggingPath location.

There are a few things to note about this process. Firstly, If the target directory doesn't exist, it will be automatically created if the parent directory has the following permissions:

  • Network Service: Full Control
  • System: Full Control
  • Administrators: Full Control

The existing queue database and log files are not moved. New files are created at the new location and existing database files are left at the old location. These old files are no longer used.

If you would like to change the location of the queue database but reuse the existing queue database files, you must move or copy the database files when the Microsoft Exchange Transport service is stopped.