Condividi tramite


Moving Database And Log File Path In Exchange 2010 DAG

Sometime we come across in a situation where we have to move database or log files path , its straight forward in standalone exchange server however when it comes to a database that is part of a DAG things might be tricky.

There are multiple ways and this is option 1

In This Demonstration, I Have Two Mailbox Servers Part Of DAG (E2K10-DAG) And We Are Changing The Database & Log File Path Of MB1

To Check The Current Mailbox Database & Log File Location, Run Below Command

Get-MailboxDatabase “Database Name” | FL Name,LogFolderPath,EDBFilePath

Suspend The Mailbox Database Copy Associated With The Mailbox Database

Suspend-MailboxDatabaseCopy -Identity “Database Name\Server Name” -SuspendComment "Changing Database Path"

Dismount The Active Mailbox Database

Dismount-Database –Identity “Database Name”

Changing Mailbox Database File Path & Log File Path Through Command Will Fail As It Part Of DAG

Move-DatabasePath -Identity MyDatabase01 -EdbFilePath “Database Location” –LogFolderPath “Log File Location

In This Case, We Need To Change It Through ADSIEDIT, Locate The Mailbox Database And Change The Below Attribute Manually

msExchEDBFile

msExchESEparamLogFilePath

msExchESEparamSystemPath

Manually Copy The Mailbox Database EDB File & Catalog Folder To The New Location

Mount The Active mailbox Database After Moving The File.

Mount-Database –Identity “Database Name” –Force

There Are Two Ways To Bring The Mailbox Database Copy In Healthy State

 1.Reseed The Mailbox Database Copy

Update The Mailbox Database Copy

 2.Create Same Folder Structure On Passive Server And Move Mailbox Database EDB File, Catalog Folder In New Database Location And Log Files To New Log File Location.

 

 

Resume The Mailbox Database Copy

Resume-MailboxDatabaseCopy –Identity “Database Name\Server Name”

 

Mailbox Database Copy Will Come In Healthy State.

Thanks

(Shekhar.Kembavi)

Comments

  • Anonymous
    October 08, 2014
    Thanks for info
  • Anonymous
    October 30, 2014
    Nice article man !
  • Anonymous
    December 01, 2014
    Thanks a lot such a great info.
  • Anonymous
    February 11, 2015
    Thanks for the step-by-step. I added one thing when I followed your process. Based on another post, I made sure that I turned off Circular Logging before moving the data store. (And back on after bringing it up in its new home.)
  • Anonymous
    May 28, 2015
    Awesome, thanks for the Info! It applied also to one Public Folder Database in a DAG, I was getting an error message, but I followed the instructions and it worked perfectly.
  • Anonymous
    June 08, 2015
    Thank you for your procedure. It works correctly except fot the Index catalog part. I had to restart to the "Microsoft Exchange Search Indexer" in order Exchange take into account that catalog index was moved. If not, each time I mounted the Database, the catalog was recreated at the source directory
  • Anonymous
    August 07, 2015
    Is there any risk in removing the Mailbox Database copies first, use the GUI to do a database move to the new path and then re-create your database copies again?
  • Anonymous
    August 19, 2015
    Ben - I don't believe there are any risks except that when you will re-add the DBcopy, DAG will initiate a full seeding of DB automatically
  • Anonymous
    October 26, 2015

    You can avoid the ADSIEDIT routine by ensuring the powershell command is in the following format :
    Move-DatabasePath –Identity –EdbFilePath
  • Anonymous
    October 26, 2015
    Above Powershell command should read :-

    Move-DatabasePath –Identity "DB ID" –EdbFilePath "C:NewFolderMyDatabase.edb"
  • Anonymous
    December 18, 2015
    Yesterday I moved only logs from 2 of my DB. This blog really helped me a lot. Only difference was that it wasn't necessary to copy logs from old to new location.

    Best
  • Anonymous
    January 04, 2016
    Hi Eduardo, did you just change msExchESEparamLogFilePath & msExchESEparamSystemPath through ADSI edit? Did the system "move" the transaction logs as part of this? I only want to change the Log Folder Path (Ex 2013 DAG).

    Thank You