Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Topic Last Modified: 2012-07-23

A queue is a temporary holding location for messages that are waiting to enter the next stage of processing. Each queue represents a logical set of messages that a transport server processes in a specific order.

Microsoft Exchange Server 2010 uses an Extensible Storage Engine (ESE) database for queue message storage. Formerly known as JET, ESE is a method that defines a low-level API to the underlying database structures in Exchange. All the different queues are stored in a single ESE database. Queues exist only on servers that have the Hub Transport server role or the Edge Transport server role installed.

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 that's located in the C:\Program Files\Microsoft\Exchange Server\V14\Bin directory. The following list describes some important items to consider when you change the location of the queue database:

Looking for other management tasks related to managing transport queues? Check out Managing Transport Queues.

Change the location of the queue database

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Hub Transport server" and "Edge Transport server" entries in the Transport Permissions topic.

Use Notepad to create a queue database at a new location

  1. Open the following file by using Notepad: C:\Program Files\Microsoft\Exchange Server\V14\Bin\EdgeTransport.exe.config.

  2. Modify the following line in the <appSettings> section.

    Copy Code
    <add key="QueueDatabasePath" value="<LocalPath>" />
    
    This example creates a queue database at the location C:\Queue\QueueDB.

    Copy Code
    <add key="QueueDatabasePath" value="C:\Queue\QueueDB" />
    
  3. Save and close the EdgeTransport.exe.config file.

  4. Restart the Microsoft Exchange Transport service.

  5. Verify that the new Mail.que and Trn.chk files are created at the new location.

  6. Remove the unused Mail.que and Trn.chk files from the original location.

Use Notepad to reuse an existing queue database at a new location

  1. Create the directory where you want to keep the queue database. Make sure that the correct permissions are applied to the directory.

  2. Open the following file by using Notepad: C:\Program Files\Microsoft\Exchange Server\V14\Bin\EdgeTransport.exe.config.

  3. Modify the following line in the <appSettings> section.

    Copy Code
    <add key="QueueDatabasePath" value="<LocalPath>" />
    
    This example changes the location to C:\Queue\QueueDB.

    Copy Code
    <add key="QueueDatabasePath" value="C:\Queue\QueueDB" />
    
  4. Save and close the EdgeTransport.exe.config file.

  5. Stop the Microsoft Exchange Transport service.

  6. Copy the files Mail.que and Trn.chk from the original location to the new location.

  7. Start the Microsoft Exchange Transport service.

  8. Remove the unused Mail.que and Trn.chk files from the original location.

Change the location of the queue database transaction logs

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Hub Transport server" and "Edge Transport server" entries in the Transport Permissions topic.

Use Notepad to create queue database transaction logs at a new location

  1. Open the following file by using Notepad: C:\Program Files\Microsoft\Exchange Server\V14\Bin\EdgeTransport.exe.config.

  2. Modify the following line in the <appSettings> section.

    Copy Code
    <add key="QueueDatabaseLoggingPath" value="<LocalPath>" />
    
    This example creates a queue database at the location C:\Queue\QueueLogs.

    Copy Code
    <add key="QueueDatabaseLoggingPath" value="C:\Queue\QueueLogs" />
    
  3. Save and close the EdgeTransport.exe.config file.

  4. Restart the Microsoft Exchange Transport service.

  5. Verify that the new Trn.log, Trntmp.log, Trnres00001.jrs, Trnres00002.jrs, and Temp.edb files are created at the new location.

  6. Remove the unused Trn.log, Trntmp.log, Trnnnnnn.log, Trnres00001.jrs, Trnres00002.jrs, and Temp.edb files from the original location.

Use Notepad to reuse existing queue database transaction logs at a new location

Under ordinary circumstances, you shouldn't have to reuse existing transaction logs at a new location. An ordinary shutdown of the Microsoft Exchange Transport service commits all uncommitted transaction log entries to the queue database. Circular logging is used. Therefore transaction logs that contain previously committed database changes aren't preserved. Only disaster recovery scenarios where the Microsoft Exchange Transport service wasn't shut down correctly or a hard disk drive failure would require that you restore and relocate an existing queue database and its existing transaction logs.

  1. Create the directory where you want to keep the queue database transaction logs. Make sure that the correct permissions are applied to the directory.

  2. Open the following file by using Notepad: C:\Program Files\Microsoft\Exchange Server\V14\Bin\EdgeTransport.exe.config.

  3. Modify the following line in the <appSettings> section:

    Copy Code
    <add key="QueueDatabaseLoggingPath" value="<LocalPath>" />
    
    This example changes the location to C:\Queue\QueueLogs.

    Copy Code
    <add key="QueueDatabaseLoggingPath" value="C:\Queue\QueueLogs" />
    
  4. Save and close the EdgeTransport.exe.config file.

  5. Stop the Microsoft Exchange Transport service.

  6. Copy the existing Trn.log, Trntmp.log, Trnnnnnn.log, Trnres00001.jrs, Trnres00002.jrs, and Temp.edb files to the new location.

  7. Start the Microsoft Exchange Transport service.

  8. Remove the unused Trn.log, Trntmp.log, Trnnnnnn.log, Trnres00001.jrs, Trnres00002.jrs, and Temp.edb files from the original location.