When an Exchange Server 2010 Mailbox server is installed there is a mailbox database added to the server as part of setup.

The default location for the database is in the Mailbox folder of the Exchange 2010 installation directory. For example:

C:Program FilesMicrosoftExchange ServerV14MailboxMailbox Database

One of the first actions you will normally take is to move the database and transaction log files to a different folder. You can do this with the Exchange Management Console or via command line using the Exchange Management Shell. This is a quick and easy task when the database is brand new and doesn’t contain a lot of mailboxes or data.

However, if the mailbox database is already in use, you’re going to cause an outage for your users by moving the database in this fashion. Instead, I recommend you create a new database and then perform mailbox moves from the old database to the new one, which is far less disruptive to the users.

Moving an Exchange 2010 Mailbox Database with the Exchange Management Console

Launch the Exchange Management Console and navigate to Organization Configuration/Mailbox. In the Database Management tab, right-click the mailbox database that you want to move, and choose Move Database Path.

How to Move an Exchange 2010 Database to a Different Folder

Enter the new paths for the database and log files, and then click Move.

How to Move an Exchange 2010 Database to a Different Folder

The database will be dismounted before it can be moved, which you will need to accept first.

How to Move an Exchange 2010 Database to a Different Folder

The move will take some time depending on the size of the database and transaction log files being moved.

Moving an Exchange 2010 Mailbox Database with the Exchange Management Shell

To achieve the same mailbox database move as above but using the Exchange Management Shell you would run the following command:

Move-DatabasePath -Identity 'MB-HO-03' -EdbFilePath 'E:DataMB-HO-03MB-HO-03.edb' -LogFolderPath 'D:DataMB-HO-03'

As with the graphical wizard you will need to confirm the request before the database is dismounted and moved.

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

About the Author

Paul Cunningham

Paul is a former Microsoft MVP for Office Apps and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul no longer writes for Practical365.com.

Comments

  1. Jeff

    Hi Paul:

    Due to Server 2008 EOL, I just built four more Exchange 2010 servers on Windows Server 2012 in order to decommission Win Server 2008. What’s the best method you know of to move databases from Server 2008 to the new Server 2012? Adding the new servers to the DAG and do a database copy isn’t supported due to 2 different OS’s. We’re looking to move the disk in VMware storage vmotion to the new host however, you can’t change the database path to another server in Exchange and you can’t use database portability because the OS is different. Any help would be appreciated.

    We could potentially do a shell game – add one disk to the new server with a database copy and dismount/reclaim the disk on the old server.

  2. rollie

    hello! if i transfer exchange server transaction logs into new path, will it migrate all transaction logs into new path? or it will remain in old path, then will create new logs at the new path.

  3. wael

    i need your help

  4. Lars Panzerbjørn

    I really don’t understand why microsoft didn’t include an option similar to -SuspendUntilReadyToComplete like they did for mailbox moves. I can’t imagine that it is an impossible task to engineer, since they did it with mailboxes. The principle must be the same…

    1. Avatar photo

      The database needs to be dismounted for the move to occur, otherwise updates will still be occurring in the original database.

      Keep in mind this process is basically a file move. It is not a replication process like database replication in a DAG.

      If you want to move a database without interrupting users, create a new database in the new location and perform mailbox moves.

  5. Elmi

    yes i do understand what you mean ,but i don’t have enough experience in Microsoft side ,if i upgrade the hard disk ,i need to configure again all the operating system .
    now i have imported all the messages to barracuda message achiever and i need to delete old message older that 1 year in my database ,please tell me how can proceed on it .

    Thanks

  6. Ashwin Pujari

    Hi,
    I have Exchange 2010, and we are planning to move the database to SAN storage.

    Kindly advise if performing the same steps as mentioned above will do. I will perform the GUI based steps.

      1. Elmi

        Dear Paul,

        I am running exchange server 2010 which my database partition is almost full ,just 10 GB free ,i would like to ask you what is the best solution to get free space without losing the old messages.
        your prompt reply will be highly appreciated .

        Thanks

          1. Elmi

            Thank you for your quick reply ,one more question shall i change the database path to an external hard drive , i have only 5 GB free space i am really in shit .

            Thanking you

  7. Marcelo Santos

    Paul, I would like to ask you help im my problem with my Exchange 2010 – Version 14.3 (Build 123.4)

    After I have moved the path of the databases to another HD driver and put the old HD driver off line, the Microsoft Exchange Replication Service started to restart and the only way to have this service started is to put the old driver on line again.

    There is any configuration that I nedd to change in order to solve this issue?

    Thanks a lot!

    Marcelo

  8. Bob Newkirk

    Great. Thanks

  9. Bob Newkirk

    Paul, first thanks for all of your great information.

    Our company has a SBS 2011 with Exchange 2010. Does being on a SBS change anything when moving the database and transaction log? We would be moving them to another drive on the same box. Will we need to do anything with privileges/rights for the new location?

    Thanks

  10. Andrew

    Hi Paul,

    Thanks for all your great articles, also my goto place for our exchange needs.

    If a DAG member is taken offline (i.e. all exchange services stopped on this particular member), witht he DBs being active on another Member and the database files in question manually moved on the offline member to a new disk, then rename the disk drive letter to that of the original disk, and start the services again, would that work? or is there some underlying ID tag for the disk the Database files reside on that is referenced in the config?

    Basically our Disk is not about the space requiring us to move the DB, but more about the drive(s) itself reliability that is in question. It is on a RAID1, but the RAID VD is suspect.. we have a new RAID1 VD setup already of same size on that member, so want to move ALL data from the one disk to the other and remove the suspect one, and assign the original drive letter to the new disk.

    thanks in advance.

  11. Andre

    Also, at what stage does sending and receiving become an issue when it come to free space on the C: drive of the exchange?

  12. Andre

    I have already created a second database and have moved all my mailboxes over. Can I unmout the old one and delete it or just move to a backup drive? What is the danger of removing the original database?

  13. Mayor Adam West

    Hi Paul,

    My co-worker created a second mail database and moved all boxes to it. That is working.

    But now, this is a SBS 2011 server, and when I create a new user account in the console, it creates their mailbox in the first(no longer being used and is dismounted) instead of the second, active one.

    Do you know a way to fix this? I’ve googled a little bit but the ‘answers’ don’t seem to work. Thanks.

  14. Daniel

    Hi Paul,

    Do you need to reconnect users mailboxes after the database move? I.e recreating their account on their mobiles or recreating their outlook profile?

    Appreciate the help.

    Thanks,

    Daniel

      1. Daniel

        Thanks Paul. I have an outage scheduled on the server this coming Saturday for patching so will be a good time to perform it then (not very big only around 30 gigs!)

        The company that originally built this server left the default database on the c: *facepalms*

        Really appreciate your help and speedy reply.

        Regards,

        Daniel

  15. James

    i am facing below error while moving the log database from C drive to other drive letter.
    Error “Failed to connect to target server “RS-SBS01″. Error: WMI exception occurred on server ‘RS-SBS01.rsmetaal.local’: Call
    cancelled
    + CategoryInfo : InvalidOperation: (Mailbox Database 2013122716:DatabaseIdParameter) [Move-DatabasePath],
    InvalidOperationException
    + FullyQualifiedErrorId : 79B3D2F3,Microsoft.Exchange.Management.SystemConfigurationTasks.MoveDatabasePath”

    Please help..

      1. Piyush

        Yes this is an SBS server 2011, I have also tried to move the Log file path from Exchange console wizard but the same issue and error.(Error: WMI exception occurred on server ‘RS-SBS01.rsmetaal.local’:) Is there any relation with WMI service for this error.

        Can you please help me move the option available in the SBS admin console. if any process to be followed, Please help.
        Thanks

  16. Leonard

    Hi Paul ,

    My Mailbox Exchange 2010 has only one drive C: about 1 TB , now this drive is almost full and i a have to attach a new HDD ( vhd ) about 500 GB as D : in my Exchange mailbox server.

    My question is : What security permissions i have to add to these D drive ?

    br
    leo

  17. lato

    hello ,

    when try move database path i get this message

    Error:
    faild to connect to target server “myserver name” .Error:WMI exception occurred on server
    call cancelled

  18. Remi

    How long would it take for 180GB database to move?

  19. Jason

    Hi Paul,

    After reading through all your input, I appreciate the time you take to reply to questions. I had one question that I thought could ask you.

    I have a Exchange 2010 SP!1 (14.01.0438.000) . I have all my databases and logs on one drive, which now only has about 10 GB of free space.

    Can I just add a new drive, dismount one of the three databases, cut and paste the database folder with the transaction log files to the new drive, and then update it in exchange?

    I’m guessing that would be faster ( my DB is about 300GB) ? Please let me know if that can be done. If yes, I’d like the instructions please.

    Does your method of migration, build up transaction log files?? If it does, I would be hosed as I only have 10GB of free space.

    Please advise..

    Thanks,
    Jason

    1. Avatar photo

      If you manually move the files then you would need to run the Move-DatabasePath command with the -ConfigurationOnly switch to update the attributes in AD with the new path to the files, before you can mount it in the new location.

      Personally, for a standalone database (ie not in a DAG), I would just use the method shown in the article and let Exchange handle it all for me.

      The DB move doesn’t generate transaction logging.

  20. VMdude

    When you create your first 2010 Mailbox server it creates a default Public Folder Database located on the C: drive. There are no replicas for this DB. I would like to move this default Public folder DB to a different mailbox server on different disks. It is pretty straightforward with “normal” mailbox databases. How is this accomplished with the out of the box Default Public Folders DB?

  21. Ian Cortez

    oh im sorry , did not include that..yes it will dismount your db. my deepest apologies..

    ian

  22. TAG

    I have a DAG, 5 MB DB on each of 2 MB servers, and simply need to move the log files (NOT the databases) – what is the safest way to do this?

    1. Ian Cortez

      Move-databasepath -identity “database” -logfolderpath “path directory”

      1. yurok

        Be aware that your DB is going to be dismounted during that process that Ian outlined above.

  23. Ian Cortez

    noted sir. Many tnx…

  24. Ian Cortez

    [PS] C:Windowssystem32>Get-MailboxDatabaseCopyStatus -Server mbx03

    Name Status CopyQueue ReplayQueue LastInspectedLogTime ContentIndex
    Length Length State
    —- —— ——— ———– ——————– ————
    MBDatabase07MBX03 Mounted 0 0 Healthy
    MBDatabase-DSL02MBX03 Mounted 0 0 Healthy
    MBDatabase04MBX03 Mounted 0 0 Healthy
    MBDatabase06MBX03 Mounted 0 0 Healthy
    MBDatabase05MBX03 Mounted 0 0 Healthy
    Hitachi-NewMBX03 Mounted 0 0 Healthy

    [PS] C:Windowssystem32>Get-MailboxDatabaseCopyStatus -Server mbx04

    Name Status CopyQueue ReplayQueue LastInspectedLogTime ContentIndex
    Length Length State
    —- —— ——— ———– ——————– ————
    MBDatabase07MBX04 Healthy 0 1 4/23/2013 9:08:00 AM Healthy
    MBDatabase-DSL02MBX04 Healthy 0 1 4/23/2013 9:08:06 AM Healthy
    MBDatabase04MBX04 Healthy 0 0 4/23/2013 9:07:38 AM Healthy
    MBDatabase06MBX04 Healthy 0 1 4/23/2013 9:08:05 AM Healthy
    MBDatabase05MBX04 Healthy 0 0 4/23/2013 9:07:42 AM Healthy
    Hitachi-NewMBX04 Healthy 0 0 4/23/2013 9:06:43 AM Healthy

    [PS] C:Windowssystem32>Get-MailboxDatabase -Identity MBDatabase06 |fl EdbFilePath

    EdbFilePath : F:MBDatabase05MBDatabase06.edb

    [PS] C:Windowssystem32>Get-MailboxDatabase -Identity MBDatabase05 |fl EdbFilePath

    EdbFilePath : F:MBDatabase05MBDatabase05.edb

    —–before, MBDatabase06 was located at “F:MBDatabase06” folder. Do i have to move it to its original location or so be it?

    1. Avatar photo

      Well if it is healthy, mounted, and replicating fine then it didn’t get there by simple drag and drop. I would say someone made a typo when it was created, or deliberately moved it.

      You can move it if you want to. I wouldn’t say you *have* to. But for the sake of neatness and consistency its probably something you’ll want to sort out.

      1. Ian Cortez

        tanks a lot..! i’ll leave it like that for now. Do you have any idea how can i check via Ex Mgnt Shell or logs why this happens. We are using only 1 admin account and there’s 3 of us here, just want to look up who did this.

        1. Avatar photo

          You could search the admin audit log.

          http://technet.microsoft.com/en-us/library/ff459262(v=exchg.141).aspx

          Keep in mind though that the process for moving a database path for a replicated DB in a DAG is not quite the same as demonstrated above. The DB needs to be manually dismounted, the Move-DatabasePath cmdlet run with the -ConfigurationOnly switch, and the files manually moved, then the DB can be remounted. So it is not likely to be something that was done accidentally.

  25. Ian Cortez

    i have 4 mailbox server in 1 dag, mbx1 replicate mbx2, mbx3 replicate mbx4. databse1 mounted on mbx3. check all exchange management shell logs via event viewer but no to avail during the (.edb) file was modified (moved to another folder). It was actually moved into another database folder (database2). database2 now has 2 .edb file.

    1. Avatar photo

      Run Get-MailboxDatabase for that database. Look at the EDBFilePath. If the file is in a different path, then you’ve got a problem.

      Run Get-MailboxDatabaseCopyStatus for that database. If the passive database copies where the file is in the wrong path are failed or otherwise not healthy then you’ve got a problem.

      If it looks to you like someone has moved the passive database copies into a different folder then you will need to reseed those database copies so that they are back in the correct folder and up to date as far as replication is concerned. You can likely then remove the databases files that are in the wrong place.

  26. Ian Cortez

    Hi Paul,

    Would a drag and drop of the database folder in exchange 2010 in another folder can? One of my database(.edb) has been moved to another folder, i’m still looking at the exchange shell log for (move-databasepath) command but no to avail base on the time stamp indicated on the file “date modified”.

    Tnx in advance.

    Ian

      1. Ian Cortez

        possibly, but that would dismount the database right? How can i check if the database has been dismounted during that time? i cant seem to find any logs why it has been moved. Still lucky that database still working.

  27. Johnny Holston

    Hi Paul,
    Trying to move a PF database and logs, but keep getting the following error:
    Failed to connect to target server “Server2”. Error: WMI exception occurred on server ‘Server2.domain.org’: Call cancelled

    Exchange Management Shell command attempted:
    move-DatabasePath -Identity ‘PF2’ -EdbFilePath ‘X:MailboxPF2PF2.edb’ -LogFolderPath ‘X:MailboxPF2’

    Elapsed Time: 00:15:06

    Searched the Internet, but have not found any real solution. Both the source and destination disk has over 500GB of free space and the PF database and logs are about 140 GB currently. Was hoping that you might have some insight on moving the PF database and logs.
    Any help is appreciated at this point…

      1. Johnny Holston

        Yes, i was on the server that is hosting the PF database. I also tried from the EMC and i still get the same error. I followed the information on the link that you posted, so i am really confused as to why i am getting this error.

        1. Avatar photo

          There is a process you can follow that involves manually moving the files. Basically you would:

          1) Dismount the database
          2) Manually move logs and/or database files to the new path
          3) Run the Move-DatabasePath cmdlet as shown in the article but with the -ConfigurationOnly parameter, which instructs it to only update the attributes in AD

          http://technet.microsoft.com/en-us/library/bb124742.aspx

          4) Mount the database again (possibly waiting a short time first to allow the AD change to replicate)

          1. chamjisky

            i have two mailbox servers 2 databases were created on first mailbox server. third was created on second mailbox server. however server1 is hosting all active copies.

            database path is the default c dive from exchange.
            now i have installed another two drives on one mailbox server one to hold the mailboxes and the other to hold the backups.

            so i want to move database path on primary mailbox server (that is active most of the time) form c drive to D drive on that machine.

            can i perfom this in my case using above ?
            or do i need to have same drives path made available in each server meaning a db copy has same path on all servers ..
            i.e. if db x is on mb server 1 on d:mbdatax.edb path then on server two it should also be in d:mbdatax.edb ?

          2. Avatar photo

            If you have mailbox servers in a DAG, and you want to replicate a database to each of the mailbox servers, then yes, they need the same storage paths available.

            In your situation the best approach will be to create brand new databases in the new locations, add the database copies so they are highly available within the DAG, and then migrate the mailboxes.

  28. Casey Maines

    I don’t have the option of “Move Database Path”. Running Ex2010 SP1. 2 servers in a DAG and 4 mailbox db’s. Am I missing something?

    1. Avatar photo

      The procedure above doesn’t apply for databases that are replicated in a DAG.

      You can try this:
      http://blogs.dirteam.com/blogs/davestork/archive/2011/11/02/unable-to-change-database-path-on-an-exchange-2010-in-a-dag.aspx

      But I don’t recommend it, because it breaks the HA of the DAG. Better off setting up a new database in the new path, with its own database copies, and doing mailbox moves to get all the data across.

  29. Faisal Khan

    Hi Paul, Thanks, this is another nice article as usual we expect from you. My qestion here is does such move gives you white space back?
    Faisal Khan

  30. Dave Purscell

    If it is that small, it should move easily and quickly.

    Sorry to pick on you. But if you have ever re-installed a server O/S, you understand why data belongs on another drive.

    1. Aaron Copeland

      LOL… I do know and I NEVER but my data on the root drive. This was a VM and was supposed to be for a test only… My company put it into production and I wasn’t even finished with it.

      So the Move should be like any other move and there is nothing unique about the /hosting mode?? I really appreciate the response and help!!

  31. Aaron Copeland

    I have an Exchange server 2010 SP1 running in hosted mode. Will moving the store be any different? I do not have the MMC so I will do it via PS but was curious if you know of any issues or references as to possible different senerios when using the /hosting switch with exchange.

    My database and logs are actually located in this Directory:
    C:Program FilesMicrosoftExchange ServerV14MailboxMailbox Database 0849706585

    Any help is appreciated!! Thanks

    1. Dave Purscell

      Eeeewe… Your host actually puts the database and logs on the O/S partition? Time to get a new host. 🙂

      How big are the files?

      1. Aaron Copeland

        It was my first attempt at building a hosted exchange server and it is now in production. I need to either move the mail store or expand the root partition to accommodate for the growth. I’d rather move it. I would think it would move fine but with it being in hosted mode I am unsure. The store is only 11 GB. Not to large yet…..

  32. Dave Purscell

    What is the proper way to accomplish the Database move to a Different Folder when the server is member of a DAG?

    We have four databases in the organization (each with their DAG copies on other servers). Due to growth of two of the databases, I need to move one of the databases to a different volume. The source and destination volumes already exist on both Exchange Servers.

    1. Avatar photo

      You would need to dismount the database, manually move the files on each server, and then use Move-DatabasePath with the -ConfigurationOnly parameter to update the configuration, before remounting the database again.

      This means an outage, so the better way would be to create a new database in the new location and perform mailbox moves from the old database to the new one.

      1. Dave Purscell

        Thank you for the great suggestions. The problem with performing a lot of mailbox moves is that huge amount of replication that will naturally occur. It would be like ingesting large amounts of fresh data into a DFSR share — the primary difference being that I can throttle the bandwidth for the DFSR replication.

      2. Ed

        As usual, my goto site for everything Exchange 2010, you have answered yet another question I had. I too had to move the logfolderpath for a mailbox database that is a member of a DAG. In my experience, I found that after I dismounted the database, I had to suspend both the copy and the LAG copy. Then move all the log files to the the new folder then remount the database and restart the copy and LAG copy. The LAG copy complained of need to reseed so I just let it go and resync. Of course, all of this after a backup…
        Thanks again for your site.

      3. uma

        what happen if I delete the Logs files

        1. uma

          can you please suggest proper way to delete Log files

      4. Darren C

        Ok, so I’m probably kicking an old thread here, but the last time i tried this I overwhelmed my log files and ran out of drive space for them too. I simply selected all users in the database and requested a move to the new database.

        Is there a way to suppress/slowdown/limit the production of logs? I have an exchange 2010 DB in a DAG with 293 mailboxes, around 170Gb in size and I’m concerned that the same will happen again.

        Do I just have to batch it? And in that case approx how many mailboxes are suitable to transfer at a time?

        Thanks muchly.

          1. Darren C

            Took me a while to work thru, but batching it kept the logs under control. Thanks Paul for the feedback. Also thanks for all the info you put on this site. It’s one of my main go-to references!

    2. Obi Ejiofor

      In a DAG situation the beste move method would be to dismount the database remove all mailbox copies but not the physical files of the copies.

      Making it an ordinary database then move the databsae path through the console.

      Move the files from the passive copy to the new location

      then remount the database and re add copies.

  33. burntpepsi

    can you cancel a move database path in exchange 2007. at the current progress is appear it might take days to complete.

      1. burntpepsi

        I ended up shutting down the Exchange server and when it came back up the database mounted in the original location just fine. Looking for a much faster way to move the database path now. I wouldn’t suggest to anyone hardbooting your Exchange server during the database move, I’m just glad it worked. There has to be a much faster way to move your database path, through the console it appeared it might take 24 hours or more, who can afford that much downtime? I do however appreciate your article Paul.

      2. burntpepsi

        I found a quick way to move my database with only about 10 seconds of downtime. I had LCR enabled so I went ahead and told Exchange to switch to that database. Only had to dismount the database for about 10 seconds while the switchover was running. Worked like a charm! Thanks Paul

Leave a Reply