Learn Exchange the Guru way !!!


Move database and log folder path in Exchange 2013

Detailing steps to move the default mailbox database in Exchange 2013.

When Exchange is installed, the database and log files will be located on the default path “C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database”.

I performed installation on the D drive hence it has taken the default path as “D:ExchangeServerV15MailboxMailboxdatabase0846134222”. Normally
default path is not recommended. We can either delete the default database and create the new one or rename default database as per the naming standards of our organization and move the database and log files to different drive.

Before moving the database and log files we need to conscious on the below points:

  • Estimated Time to complete the for database and log file move depending on the factors like size of the database, storage speed etc
  • Account using to move should have required permissions assigned.
  • Database will be dismounted during the move
  • Should not move during the backup.
  • Should not follow for the databases which replicates within a DAG
  • Database replication must be disabled for all copies.
  • Circular logging should be disabled

NOE: We cannot use EAC to move the mailbox database path.

First step is to create a database in a location of your choice using the New-MailboxDatabase cmdlet or through EAC.

Now, move all Arbitration mailboxes from the database follow the steps detailed in:

Unable to delete Exchange database – This mailbox database contains one or more mailboxes:

To move Arbitration mailboxes from Exchange 2010 to Exchange 2013:

Get-MailboxDatabase -IncludePreExchange2013 | FL Name,Server,AdminDisplayVersion

Get-Mailbox -Arbitration | New-MoveRequest -TargetDatabase <NewDatabaseinExchange2013>

To Move Database and log file path for *any* database:

Use the below command to note any replay lag or truncation lag settings for all copies of the mailbox database being moved

        Get-MailboxDatabase Database12013 | FL *lag*

Disable the circular logging if it is enabled:

        Set-MailboxDatabase Database12013 -CircularLoggingEnabled $false
Remove all mailbox database copies for the database being moved if any. In my example I don't have any database copies
        Remove-MailboxDatabaseCopy -Identity Database12013 -Confirm:$False
Move the database path
        Move-DatabasePath -Identity Database12013 -EdbFilePath E:DB1Database1Database12013.edb
To move both database and log file path together.
        Move-Databasepath -Identity Database12013 -EdbFilePath E:DB1Database1Database12013.edb –LogFolderpath E:DB1Database1
To verify the if movement is successful and database is mounted to access:

Get-MailboxDatabase -Identity Database12013 | FL Name,*Path*

Get-MailboxDatabase –Status “Database12013” |FL Name,Mounted

Test-MAPIConnectivity –Database “Database12013”

Ratish Nair

Microsoft MVP | Exchange Server


4 Responses to “Move database and log folder path in Exchange 2013”

  1. NeWay Technologies – Weekly Newsletter #122 – November 20, 2014 | NeWay Says:

    […] Move database and log folder path in Exchange 2013 – […]

  2. NeWay Technologies – Weekly Newsletter #122 – November 21, 2014 | NeWay Says:

    […] Move database and log folder path in Exchange 2013 – […]

  3. F. Pelayo Says:

    Hi. What if I wanted to keep the database where it is and just move the logs that the DB produces to a different drive?

  4. Prabhat Nigam Says:

    you can do it.

Leave a Reply




Do NOT follow this link or you will be banned from the site!