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 <Server>\<Database> -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 <Server>\<Database> -Confirm:$False

4. Dismount the active copy of the database

Dismount-Database –id <Database ID> –Confirm:$False

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

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

6. Mount the database

Mount-Database –id <Database ID>

7. Add the passive copy of the active database

Add-MailboxDatabaseCopy –id <Database ID> –MailboxServer <Target MBX> –ActivationPreference <Act Pref>

8. Add the remote passive copy of the active database

Add-MailboxDatabaseCopy –id <Database ID> –MailboxServer <Target MBX> –ActivationPreference <Act Pref>

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

Advertisements

About Raji Subramanian

Nothing great to say about me...Just want to share my knowledge for others that will be useful at any moment of time when they stuck in critical issue....
This entry was posted in Exchange Server 2013 Troubleshooting, Powershell Command and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s