30 C
Dubai
Monday, November 4, 2024

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

Satheshwaran Manoharan
Satheshwaran Manoharanhttps://www.azure365pro.com
Award-winning Technology Leader with a wealth of experience running large teams and diversified industry exposure in cloud computing. From shipping lines to rolling stocks.In-depth expertise in driving cloud adoption strategies and modernizing systems to cloud native. Specialized in Microsoft Cloud, DevOps, and Microsoft 365 Stack and conducted numerous successful projects worldwide. Also, Acting as a Technical Advisor for various start-ups.

Related Articles

35 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)

    • Move-Databasepath “DatabaseName” –EdbFilepath “C:NewlocationDBname.edb” –LogFolderpath “C:Newlocation”

      The above command moves log folder path too.

  2. 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!

  3. 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?

  4. 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

  5. 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.

  6. 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

    • Strange. We are just moving the file . May be the disk fragmentation was high showing you are larger size in the source disk.

  7. 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.

  8. 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.

  9. 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

    • Enable Circular logging — Not recommended
      Run Full backups – Logs wil be purged – recommended

  10. 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

  11. 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?

  12. 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?

  13. 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.

  14. is this command running on DAG Environment. If not so what is the procedure to move the EDB path and Log Folder Path during DAG Environment ?

  15. Excellent blog here! Also your website a lot up fast!
    What web host are you the usage of? Can I get your affiliate hyperlink for your host?
    I wish my site loaded up as fast as yours lol

  16. It is actualkly a great aand helpful piedce of info.
    I aam satisfiedd that you shared this usefyl info with us.
    Please stay us up to date like this. Tank yyou for sharing.

  17. After i run the command to move LOG files (only) to Another location

    ( Move-Databasepath -Identity “DatabaseName” –LogFolderpath “D:\NewLocation”)

    do i have to restart any processes or mount/dismount the DB? or will it take the change while running?

    thanks.

    • It will dismount the database automatically after you confirm and after moving it will mount back.
      if the database and logs are large. Database may go offline for a large period of time

LEAVE A REPLY

Please enter your comment!
Please enter your name here

× How can I help you?