Moving Exchange Databases and Log Files

It makes a lot of sense to move the database and log files of an Exchange server to separate physical disks; one each for log and data. but how do you go about doing it? Jaap explains.

One of the questions I get on a regular basis is how to move the database file and the log files of an Exchange Server to a different location.

First of all, it is a best practice to change the database and log files location. By default they are configured to use c:\program files\microsoft\exchange server\mailbox\first storage group (in Exchange Server 2007). Change this to a separate physical disk, and if possible two separate physical disks, one for the database file and one for the log files. If one of these two disks fails you have a much better recovery scenario then when the database and the log files are located on one physical disk. Also from a performance point of view it’s better to use two separate physical disks.

In this example I have an Exchange Server 2007 server that has three disks. One is the boot- and system partition, the other disks are for the database files (drive f:\) and the last disk is for the log files (drive g:\). The server is a default server, which means we have one Storage Group for the Mailbox Database and one Storage Group for the Public Folder Database.

On drive F:\ we’ll be placing the first Mailbox Database and the Public Folder database, on drive G:\ we’ll be placing the log files for Storage Groups.

Logon to the Exchange 2007 server and open the Exchange Management Console. In the navigation pane expand the Server Configuration and click the Mailbox option. In the Results Pane you’ll see the Mailbox Server with the First Storage Group and the Second Storage Group.

sample-300x271.png

Right click the Mailbox Database and select “Move Database Path….”. In the Move Database Path wizard use the Browse button to select the new location of the database file, i.e. “F:\SG1\Mailbox Database.edb”. Repeat the same steps for the Public Folder Database and select “F:\SG2\Public Folder Database.edb” as the new location.

Please note that the database will be dismounted during the actual move operation and thus will be unavailable for users.

To move the log files of a Storage Group to a new location right click the Storage Group and select “Move Storage Group Path…”.

In this example I have an Exchange Server 2007 server that has three disks. One is the boot- and system partition, the other disks are for the database files (drive f:\) and the last disk is for the log files (drive g:\). The server is a default server, which means we have one Storage Group for the Mailbox Database and one Storage Group for the Public Folder Database.

On drive F:\ we’ll be placing the first Mailbox Database and the Public Folder database, on drive G:\ we’ll be placing the log files for Storage Groups.

Logon to the Exchange 2007 server and open the Exchange Management Console. In the navigation pane expand the Server Configuration and click the Mailbox option. In the Results Pane you’ll see the Mailbox Server with the First Storage Group and the Second Storage Group.

Use the Browse button for both the Log Files Path as well as the System Files Path to select the proper location, i.e. G:\SG1. Repeat the same steps for the Second Storage Group, and configure this to use G:\SG2.

As with moving the Database files the Databases will be dismounted when moving the log files to a new location.

It is also possible to use the Exchange Management Shell to move the Database files and the Log Files to another location. To move the Database Files from the default location to F:\SG1 use to following command:

To move the log files for the First Storage Group from their default location to G:\SG1 use the following command:

Repeat these step for the second Storage Group and the Public Folder Database but configure these to use F:\SG2 and G:\SG2. Please note that the database will be dismounted during the actual move operation and thus will be unavailable for users

How you log in to Simple Talk has changed

We now use Redgate ID (RGID). If you already have an RGID, we’ll try to match it to your account. If not, we’ll create one for you and connect it.

This won’t sign you up to anything or add you to any mailing lists. You can see our full privacy policy here.

Continue

Simple Talk now uses Redgate ID

If you already have a Redgate ID (RGID), sign in using your existing RGID credentials. If not, you can create one on the next screen.

This won’t sign you up to anything or add you to any mailing lists. You can see our full privacy policy here.

Continue