Friday , March 24 2017

How to move database path and log folder path in Exchange 2013

You got to use the Exchange Management Shell to move the database path and log folder path in Exchange 2013

You will be using Move-Databasepath Cmdlet

Move-Databasepath "DatabaseName" –EdbFilepath "C:\Newlocation\DBname.edb" –LogFolderpath "C:\Newlocation"

Caution ** It will dismount the stores temporarily which will cause you downtime.

image

How to Verify it has been moved Successfully

You can Run

Get-MailboxDatabase "DatabaseName" | FL Name,*Path*

image

or

You can login to Exchange Admin Center

image

You can see the New Database Path

image

About Satheshwaran Manoharan

Satheshwaran Manoharan is an Microsoft Exchange Server MVP , Publisher of CareExchange.in Supporting/Deploying/Designing Microsoft Exchange for some years. Extensive experience on Microsoft Technologies.

Check Also

Perennially Reservation with PowerCLI for RDMs

ESXi/ESX hosts with visibility to RDM LUNs being used by MSCS nodes with RDMs may ...

27 comments

  1. Hai amit

    I moved data file path to d drive and its working good,but we not entered command for moving log files,now my c drive filling with log file, is there is any idea to change the log file path to new drive (working on exchange 2013)

  2. Sorry i entered wrong name,question for you satheshwaran

  3. You only told us how to move the database path, what about the log files ?

  4. To Move Both Database and Logfile Use
    Move-Databasepath -Identity “DatabaseName” –EdbFilepath “C:\Newlocation\DBname.edb” –LogFolderpath “C:\Newlocation”

    To move only Databse use
    Move-Databasepath -Identity “DatabaseName” –EdbFilepath “C:\Newlocation\DBname.edb”

    To Move Only Log Files Use
    Move-Databasepath -Identity “DatabaseName” –LogFolderpath “D:\NewLocation”

    • Thanks! I have been looking for the command to move only the log files – this is what I thought but I wasn’t sure if it was just to tell it where to find th log files. I will try it. Thanks again!

  5. We had our transaction log VHD fill up this morning, I thought of a couple scenarios:
    1) Once the AVHD merge is complete, I can simply increase the VHD size?
    2)Restore from our backup at 1am, and quickly enable circular logging to clean up the logs?
    3) When Exchange is online, I cannot login to ECP, use the above EMS steps to move the log files do a newly created VHD?

  6. After trying to run
    Move-DatabasePath “Mailbox Database 1262972672” -EdbFilePath “D:\Exchange DBase1\Mailbox Database 1262972672.edb” -LogFolderPath “E:\Exchange DBase1”
    I get operation couldn’t be performed because object ‘mailbox blah blah’ couldn’t be found on ‘The Wrong Server’
    Why would it be looking for the edb on the wrong server?
    Thanks for any help you can offer

  7. Hello Experts,

    I have around 500GB mailbox, is it good idea to move it? as the current drive is filling fast. and I am planing to move it in another 1 TB drive.

  8. Hi Manoharan,

    We have single mailbox server with nearly 20 mailbox databases, Due to space constraint in existing drive we have moved 7 databases .edb path to different drive in the same server and noticed the database size is showing less now. Before moving the database, size was 136 GB and now it’s showing 55 GB. Do you have any idea what could be the reason

    Command used : Move-DatabasePath -Identity MBX_008 -EdbFilePath “N:\Exchange Server\Mailbox\MBX_008\MBX_008.edb)
    get-mailboxdatabase -Status MBX_008

  9. Hi Manoharan,

    Sorry I did not understand one important detail: To move the the database, I need to before copy the EDB file to the new directory (copy hand) or the command itself does this copy?

    My current scenario: I have the database file on C: and I want to move to D:

    Thank you.

  10. This is a useless article. Unless you are working on a single server, this procedure simply does not work AT ALL. Not even a little bit. Try it and you get:

    “This operation cannot be performed on a remote server. Please use the -ConfigurationOnly option and then manually move the files”

    Obviously not really an option if you have many databases. No where in this article to you ever specify that you need to be on the server that the logs and databases are physically on. No where in the article does it give you a command to determine where those databases actually are.

    “easy”.. this is some new definition of the word that you have invented for your own personal use I take it?

    • Its an HOW – to article —
      TO move your Database – Server to Server – There is something called DAG — Replicate your databases and Fail-over them.
      not move them with this command .. It will bring nothing but disaster.
      TO move your Database – Disk to disk – Prefer to create new database and move them —
      If there is no option left and you are forced to move them manually because of space constraints. people go for move-databasepath affording downtime.

  11. Dear Sathesh,

    Kindly help me on below scenario.

    I have an exchange 2013 which having 200Gb edb,noticed rest of HDD space fully filled with exchange logs file around 600 gb .how can i avoid filling logs file.how can i fine tune it.I need your advice and assistance.

    Thanks
    Pradeep.K.M

  12. Hi sathesh,

    your blog really informative, i am facing a issue on my exchange server 2013:-

    451 4.4.0 primary target ip address responded with : 421 4.7.0 too many errors on the connection,closing transmission channel. “attempted failover to alternate host

  13. Hi all, after I’m applying this command: Move-DatabasePath “MDB11-1K5-EX5” -Edbfilepath “I:\”MDB11-1K5\MDB11-1K5.edb” -LogFolderPath “I:\MDB11logs”
    I’m being prompted by a “>>” prompt and the cmd-let is not executing anything? anyone has idea what >> is waiting for?

  14. I am using Exchange 2007 non-clustered. I don’t want to move database file, Can I change Logs folder path only to another new location?

  15. If a database is in DAG, from EAC you can see which on which server the database is active.
    But how can we check the primary path or primary disk of database when it was actually created on.

Leave a Reply

Your email address will not be published.