Saturday, February 15, 2014

Exchange 2013 Database Availability Group - How to Move Database and Log Path

Exchange 2013 Database Availability Group - How to Move Database and Log Path

Move-DatabasePath Powershell cmdlet is used to change the location path of Database and Log folder in Exchange Server 2013 . It just a simple command

To Move Both Database and Logfile

Move-Databasepath -Identity “DatabaseName” –EdbFilepath “C:\Newlocation\DBname.edb” –LogFolderpath “C:\Newlocation”

To Move Only Database

Move-Databasepath -Identity “DatabaseName” –EdbFilepath “C:\Newlocation\DBname.edb”

To Move Only Log Files 

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

What is important to understand is - how to move the database and log path when the exchange 2013 mailbox server configured under Database availablity group. This makes some few challenges since it's holds passive copy and remote lagged copy. Follow the below step as best practise that can be helpful on moving the Database and Log Path in Exchange server 2013 mailbox server.

1. Make sure backup is perfromed successfully and log are purged for the database that needs to be moved.

Get-MailboxDatabase –Status | format-table Name,Mounted,BackupInProgress,OnlineMaintenanceInProgress

2. Remove the remote Lagged copy of the Database that new to be moved to new location in Exchange mailbox server

Remove-MailboxDatabaseCopy –Identity \ -Confirm:$False

3. Remove the Passive copy of the Database that new to be moved to new location in Exchange mailbox server

Remove-MailboxDatabaseCopy –Identity \ -Confirm:$False

4. Dismount the active copy of the database

Dismount-Database –id –Confirm:$False

5. Move the database and log folder to different location.

Move-DatabasePath –Identity –EdbFilepath “C:\Newlocation\Databasename.edb” –LogFolderpath “C:\Newlocation”

6. Mount the database

Mount-Database –id

7. Add the passive copy of the active database

Add-MailboxDatabaseCopy –id –MailboxServer –ActivationPreference

8. Add the remote passive copy of the active database

Add-MailboxDatabaseCopy –id –MailboxServer –ActivationPreference

Verification:

1. Check the database and content index are in health status - Get-Mailboxdatabsecopystatus * | Out-GridView

Note:

1. Make sure the database is not performing backup while doing the above change
2. Need's downtime since database will dismounted on perfroming this action.

Ref:  http://technet.microsoft.com/en-us/library/bb124742%28v=exchg.150%29.aspx

No comments:

Post a Comment

The blog is written to the share the knowledge mainly on Microsoft Exchange Server and other Microsoft product that experienced on day-to-day life.