Move Transport Database in Exchange 2013

When designing an Exchange 2013 environment I always recommend using an additional disk to store the Transport Database and accompanying transaction log files to a separate disk. When things with SMTP get out-of-control and the Queue database grows too much your boot- and system disk do not fill up.

The Exchange Transport Configuration is stored in a CONFIG file called EdgeTransport.exe.config which is stored in the C:\Program Files\Microsoft\Exchange Server\V15\Bin directory.

When you open this file with Notepad and scroll down you’ll find something like:

<add key=”QueueDatabasePath” value=”C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue” />

<add key=”QueueDatabaseLoggingPath” value=”C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue” />

<add key=”IPFilterDatabasePath” value=”C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\IpFilter” />

<add key=”IPFilterDatabaseLoggingPath” value=”C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\IpFilter” />

<add key=”TemporaryStoragePath” value=”C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Temp” />

This is shown in the following Figure:

image

These are the location where you will find the Transport Queue database and the IpFilter database files and their corresponding transaction log files.

You can changes these directories to for example D:\TransportRoles\data\… and after you restart the Transport service the new location is used. The problem is that the ‘old’ Queue database is not moved. When the Transport service is restarted a new Queue database is created in the new location. If you have any (SMTP) mail in the old queue this gets lost.

Microsoft has created a scripts called Move-TransportDatabase.ps1 (located in the $ExScripts directory) which changes the location, moves the Queue Database and restarts the Transport service automatically. The Move-TransportDatabase.ps1 script takes the following parameters:

  • queueDatabasePath
  • queueDatabaseLoggingPath
  • iPFilterDatabasePath
  • iPFilterDatabaseLoggingPath
  • temporaryStoragePath

Resulting in a command like this:

.\Move-TransportDatabase.ps1 -queueDatabasePath ‘D:\TransportRoles\data\Queue’ -queueDatabaseLoggingPath ‘D:\TransportRoles\data\Queue’ -iPFilterDatabasePath ‘D:\TransportRoles\data\IpFilter’ -iPFilterDatabaseLoggingPath ‘D:\TransportRoles\data\IpFilter’ -temporaryStoragePath ‘D:\TransportRoles\data\Temp’

Note: take care about the ‘ character in the different values!

.\Move-TransportDatabase.ps1 -queueDatabasePath 'D:\TransportRoles\data\Queue' -queueDatabaseLoggingPath 'D:\TransportRoles\data\Queue' -iPFilterDatabasePath 'D:\TransportRoles\data\IpFilter' -iPFilterDatabaseLoggingPath 'D:\TransportRoles\data\IpFilter' -temporaryStoragePath 'D:\TransportRoles\data\Temp'

When you run this command you’ll see some requirement information, creation of the new directories, moving the databases and restarting the Transport service as shown in the following Figure:

image

When you use the Move-TransportDatabase.ps1 script no mail gets lost and the original database is stored on the new location.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s