• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
OpenTechTips

OpenTechTips

Comprehensive IT Guides for Pros and Enthusiasts

MENUMENU
  • HOME
  • ALL TOPICS
    • Exchange
    • InfoSec
    • Linux
    • Networking
    • Scripting
      • PowerShell
    • SSL
    • Tools
    • Virtualization
    • Web
    • Windows
  • ABOUT
  • SUBSCRIBE
Home » Quickie – How to Move Exchange Database File Location

Quickie – How to Move Exchange Database File Location

May 9, 2020 - by Zsolt Agoston - last edited on May 10, 2020

As a rule of thumb, it's a good practice to place the Exchange databases in a dedicated location. By default, in Exchange 2013, 2016 and 2019 both the EDB file (the database itself) and the log files are created under:

C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\[DB-name]

Usually they are better be put on a separate volume as an iSCSI or NFS volume is easy to expand, backed up or snapshotted. As a side note, DAGs also need the path to the databases to match on all members.

Move database and log path

In this example we move a database called DB-test on server MAIL.alwayshotcafe.com from the default physical location to the E: drive, which is dedicated to Exchange database content. Original location:

PS C:\> Get-MailboxDatabase -Identity DB-test | fl EdbFilePath, LogFolderPath


EdbFilePath   : C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\DB-test\DB-test.edb
LogFolderPath : C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\DB-test

We move the EDB file to the E:\ExchangeDatabases\DB-test\db folder. The log files will also have a separate folder, called E:\ExchangeDatabases\DB-test\logs.

Note: when specifying the EDB file location, we must use the whole path INCLUDING the edb file itself!

PS C:\> Move-DatabasePath -Identity DB-test -EdbFilePath E:\ExchangeDatabases\DB-test\db\DB-test.edb -LogFolderPath E:\ExchangeDatabases\DB-test\logs

Confirm
Are you sure you want to perform this action?
Moving database path "DB-test".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): y

Confirm
To perform the move operation, database "DB-test" must be temporarily dismounted, which will make it inaccessible to
all users. Do you want to continue?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): y

Re-Mount the moved database

The last step is dismounting and remounting the relocated database. For that, we issue the following commands in order:

PS C:\> Dismount-Database -Identity DB-test -Confirm:$false
PS C:\> Mount-Database -Identity DB-test
Quickie – How to Move Exchange Database File Location

Reader Interactions

Comments Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Tools

Secondary Sidebar

CONTENTS

  • Move database and log path
  • Re-Mount the moved database

  • Terms of Use
  • Disclaimer
  • Privacy Policy
Manage your privacy

To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.

Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.

Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Statistics

Marketing

Features
Always active

Always active
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
Manage options
{title} {title} {title}
Manage your privacy
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Statistics

Marketing

Features
Always active

Always active
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
Manage options
{title} {title} {title}