Move transport database and roles 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” />
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:
Resulting in a command like this:
.\Move-TransportDatabase.ps1 -queueDatabasePath 'Q:\TransportRoles\data\Queue'
Note: take care about the ‘ character in the different values!
When you run this command you’ll see some requirement information, creation of the new directories, moving the databases and restarting the Transport service