Home » Exchange Server » Moving an Exchange Server 2016 Mailbox Database

Moving an Exchange Server 2016 Mailbox Database

When Exchange Server 2016 is installed it creates a mailbox database for you on the server . If you installed Exchange to the default path then the mailbox will be stored in C:Program FilesMicrosoftExchange ServerV15Mailbox.

Here’s an example from my test server:

The default location is probably not suitable for your environment, so you would likely want to move this database to the volumes that you’ve provisioned for your Exchange database and log files. Another common scenario is that the database is growing and the current volume is low on free disk space, so you want to move it to new, larger volume.

A mailbox database can be moved, but before you proceed consider that the move requires the database to be dismounted and taken offline, so it will not be accessible by your mailbox users during the move. This is fine if the server has just been set up and there are no mailboxes on it, but if you’re moving a database with active mailbox users a better option would be to create a new database on the new volume and perform mailbox moves (which are non-disruptive to end users).

I will also point out that the procedure below is not suitable for mailbox databases that are being replicated to multiple DAG members.

Before I move the database I am first going to rename it. The uniquely generated name of “Mailbox Database 2116642217” is not desirable so I will rename it to “DB01” instead.

To move the database and transaction log files to their new locations we use the Move-DatabasePath cmdlet.

The database is temporarily dismounted, the files are copied to the new locations, and then the database is mounted again. The time operation takes will depend on how much data there is to be moved, as well as the speed of the source and destination disks. Generally speaking, the more data you have the longer it will take, potentially becoming a very long outage for your users, hence why I recommend considering moving mailboxes to a new database instead.

Paul is a Microsoft MVP for Office Servers and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul is a co-author of Office 365 for IT Pros and several other books, and is also a Pluralsight author.
Category: Exchange Server

21 comments

  1. Xavier Fárez says:

    Good day,

    I have a database Exchange 2010 supports 2016, I have a new server running Exchange 2016 as the base from 2010 to 2016 migrate, you can use the same base: Move-DatabasePath

  2. Jeff says:

    Trying to run these commands on a newly installed Exchange server. I have 2 servers in the domain right now. A domain controller and the exchange server. The exch server says everything is installed to the exch server. When I run the command I get: “The operation couldn’t be performed because object ‘Mailbox Database xxxxxxxxx’ couldn’t be found on ‘server.xyz.com’. Server xyz being the domain controller, not the exchange server. Any ideas why it would be looking to wrong server? DNS is setup and working correctly.

    • The domain controller is in the error because Exchange tools look up objects in Active Directory.

      Most likely cause is the mailbox database you’re specifying doesn’t exist. Maybe a typo. But you haven’t said exactly what the command is you’re running, nor whether you’ve double checked that the mailbox database name is correct.

  3. johnny s says:

    Paul,
    Getting a similar error as Jeff. Changed the DB name as you mentioned to DB01, and ran:

    Move-DatabasePath HCMSX -EdbFilePath C:ExchangeDatabasesDB01 -LogFolderPath C:ExchangeDatabasesDB01_log and the error I get is:
    The operation couldn’t be performed because object ‘HCMSX’ couldn’t be found on ‘PDC Server Name’

    I triple checked, and the Server is on the DOmain and in Active Directory. Any ideas?

  4. Praveen Kumar says:

    Hello Paul,

    Cross forest mailbox move from Exchange 2013 to Exchange 2016 is offline move or online move?

    Thanks,

    Praveen

  5. Mike Zapke says:

    After i renamed the DB moved the it. I get a warning for the “Administrator” Mailbox.
    “‘Database’ ist für ‘UserMailbox’ verbindlich.” -> Database is necessary for UserMailbox
    I think the Admin Mailbox was already there before i moved the db and cant find its database now.
    I dont have any Mailboxes yet, installed fresh ex2016cu3

  6. Robert Österlund says:

    Hi
    Thanks for all the help setting our new EX2016 DAG environment… BUT!
    I get this stupid error:

    [PS] C:Windowssystem32>Get-MailboxDatabase | fl Name,EdbFilePath,LogFolderPath

    Name : DB01
    EdbFilePath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 1203173335Mailbox Database 1203173335.edb
    LogFolderPath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 1203173335

    Name : Mailbox Database 0844235906
    EdbFilePath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0844235906Mailbox Database 0844235906.edb
    LogFolderPath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0844235906

    Name : Mailbox Database 0480460219
    EdbFilePath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0480460219Mailbox Database 0480460219.edb
    LogFolderPath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0480460219

    [PS] C:Windowssystem32>Set-MailboxDatabase “Mailbox Database 1203173335” -Name “DB01”
    The operation couldn’t be performed because object ‘Mailbox Database 1203173335’ couldn’t be found on ‘DC-01’.
    + CategoryInfo : NotSpecified: (:) [Set-MailboxDatabase], ManagementObjectNotFoundException
    + FullyQualifiedErrorId : [Server=EX-02,RequestId=087ac95d-7d4f-4541-be00-d20bd36cbfe4,TimeStamp=2016-09-27 13
    :06:11] [FailureCategory=Cmdlet-ManagementObjectNotFoundException] D47D1B98,Microsoft.Exchange.Management.SystemCo
    nfigurationTasks.SetMailboxDatabase
    + PSComputerName : ex-02

    [PS] C:Windowssystem32>

    Any ideas on how to solve this?
    I got a second server (EX-01) and get the exact same problem there.

    • Robert Österlund says:

      I also see now that i have managed to rename the DB, but failed the first time (with error no longer in window), cos i got this 🙂

      [PS] C:Windowssystem32>Set-MailboxDatabase “Mailbox Database 0844235906” -Name “DB02”
      [PS] C:Windowssystem32>Set-MailboxDatabase “Mailbox Database 0480460219” -Name “DB03”
      [PS] C:Windowssystem32>Get-MailboxDatabase | fl Name,EdbFilePath,LogFolderPath

      Name : DB01
      EdbFilePath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 1203173335Mailbox Database 1203173335.edb
      LogFolderPath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 1203173335

      Name : DB02
      EdbFilePath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0844235906Mailbox Database 0844235906.edb
      LogFolderPath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0844235906

      Name : DB03
      EdbFilePath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0480460219Mailbox Database 0480460219.edb
      LogFolderPath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 0480460219

      And here i though it would actually rename the edb-file as well as the catalogue name 😉

      • Robert Österlund says:

        and finally i get this:

        [PS] C:Windowssystem32>Move-DatabasePath DB01 -EdbFilePath D:DB01DB01.edb -LogFolderPath E:DB01
        This operation cannot be performed on a remote server. Please use the -ConfigurationOnly option and the
        the files.
        Parameter name: ConfigurationOnly
        + CategoryInfo : InvalidArgument: (DB01:ADObjectId) [Move-DatabasePath], ArgumentException
        + FullyQualifiedErrorId : [Server=EX-01,RequestId=d6d34ace-846c-4005-8e69-1107109afe00,TimeStam
        :13:24] [FailureCategory=Cmdlet-ArgumentException] 6DF879DA,Microsoft.Exchange.Management.SystemConf
        .MoveDatabasePath
        + PSComputerName : ex-01

        i get this error on both servers (ex-01 and ex-02). in some places, where the name is EX-01 it is not written as FQDN. but when it says ex-01 it is as FQDN (i removed that info from my post)
        could there be an issue with that?

        • Robert Österlund says:

          very sorry for the looooong post…

          [PS] C:Windowssystem32>Get-MailboxDatabase | fl Name,EdbFilePath,LogFolderPath

          Name : DB01
          EdbFilePath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 1203173335Mail3173335.edb
          LogFolderPath : C:Program FilesMicrosoftExchange ServerV15MailboxMailbox Database 1203173335

          Name : DB02
          EdbFilePath : D:DB02DB02.edb
          LogFolderPath : E:DB02

          Name : DB03
          EdbFilePath : D:DB03DB03.edb
          LogFolderPath : E:DB03

  7. Robert Österlund says:

    You can remove this post as i no have had to restart the installation, but in short… the problem i had was that i could not move the DB1 as i was using a “remote server” although i was actually using the EX-01 or EX-02 to do the move.
    I will get back to you in this matter IF and WHEN i get the error again.
    Right now the servers are not even running Exchange installation due to some error so i need to solve that first.

    Thank you again for the great blog on how to install Exchange, it has helped me alot so far.

  8. steven yu says:

    Hello Mr. Paul
    My exchange mailbox databases that are being replicated to multiple DAG members. After I dismounted them and moved them to D drive, the server event reminding me 1564, 1177 , 1135 error message,
    I have two exchange are being replicated to multiple DAG members. How to fix this problem.
    Thank you for your help in advance.

    • I don’t know what those event numbers are, unless you share the full error information.

      But before you do that, I wrote in the article that moving a database like this shouldn’t be done for databases hosted in a DAG. If you want to move databases in a DAG to a new folder path, it’s better to create a new database, set up the database copies, and then perform mailbox moves.

      • steven yu says:

        I’m sorry to let you know that before read you article I have moved my 2 exchange2013sp1 servers mailbox folder (not include user pst data) to D drive.

        And I have two error as below need your help, thanks a lot. Maybe you can kindly give me the advice or solution to fix them. Currently I’m not sure whether i f they have affected my server running.

        Event 4138″
        Some databases on server TTMSEXCH have insufficient data redundancy.

        Databases:

        Mailbox Database 0306853485

        Mailbox Database 0306853485 – There were database redundancy check failures for database ‘Mailbox Database 0306853485’ that may be lowering its redundancy and putting the database at risk of data loss. Redundancy Count: 1. Expected Redundancy Count: 2. Detailed error(s):

        XXXXexch:
        Database ‘Mailbox Database 0306853485’ does not have enough copies configured to meet the validation criteria.”

        Event 4374″
        Database availability health check failed.
        Database copy: Mailbox Database 0306853485
        Redundancy count: 1

        Error: There were database availability check failures for database ‘Mailbox Database 0306853485’ that may be lowering its availability. Availability Count: 1. Expected Availability Count: 2. Detailed error(s):

        XXXXexch:
        Database ‘Mailbox Database 0306853485’ does not have enough copies configured to meet the validation criteria.

        ================
        Full Copy Status
        ================

        —————-
        Database Copy : Mailbox Database 0306853485XXXXexch
        —————-
        WorkerProcessId : 10684
        ActivationPreference : 1
        CopyStatus : Mounted
        Viable : False
        ActivationSuspended : False
        ErrorEventId : 0
        LastStatusTransitionTime : 1/1/0001 12:00:00 AM
        StatusRetrievedTime : 12/8/2016 5:07:18 AM
        InstanceStartTime : 12/8/2016 3:21:49 AM
        LowestLogPresent : 0
        LastLogInspected : 0
        LastLogReplayed : 0
        LastLogCopied : 0
        LastLogCopyNotified : 0
        LastLogGenerated : 0
        LastLogGeneratedTime : 1/1/0001 12:00:00 AM
        LastCopyNotifiedLogTime : 1/1/0001 12:00:00 AM
        LastInspectedLogTime : 1/1/0001 12:00:00 AM
        LastReplayedLogTime : 1/1/0001 12:00:00 AM
        LastCopiedLogTime : 1/1/0001 12:00:00 AM
        LastLogInfoFromClusterGen : 0
        LastLogInfoFromClusterTime : 1/1/0001 12:00:00 AM
        LastLogInfoFromCopierTime : 1/1/0001 12:00:00 AM
        LastLogInfoIsStale : False
        ReplayLagEnabled : Unknown
        ReplayLagPlayDownReason : None
        ReplayLagPercentage : 0

Leave a Reply

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