User Tools

Site Tools


microsoft:excange_2013_cmd_move_database

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
microsoft:excange_2013_cmd_move_database [2017/01/12 11:47]
admin created
microsoft:excange_2013_cmd_move_database [2017/01/12 11:51] (current)
admin
Line 1: Line 1:
 ====== Exchange 2013 Move Database to a New Location ====== ====== Exchange 2013 Move Database to a New Location ======
 +
 +When you install a new Exchange Server 2013 Mailbox server a database is automatically created on the server as well.
 +
 +The database is located in the \Mailbox folder of the Exchange installation path, which by default is the C:\ drive therefore a mailbox database will be placed in a path such as:
 +
 +<code bash>
 +C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Mailbox Database 1
 +</​code>​
 +
 +Usually this default location is not suitable, so you have two choices:
 +  * Remove the database and create a new one in the desired path
 +  * Move the existing database to the desired path
 +
 +To move a database to a new location use the Move-DatabasePath cmdlet in the Exchange Management Shell.
 +
 +Before you proceed please be aware that:
 +  * the command must be run while logged on to the mailbox server hosting the database
 +  * this process requires that the database be dismounted while the move takes place, making it unavailable for mailbox users
 +  * this process should not be followed for databases that are replicated within a Database Availability Group
 +  * this process cannot be run at the same time as a backup is in progress
 +
 +Also consider that for non-replicated databases the best practice is still to separate the database file and transaction logs onto separate disks.
 +
 +To move an Exchange 2013 database named “Mailbox Database 1” to a new EDB file location of **E:​\Mailbox Database 1** and a new logs folder of **F:​\Mailbox Database 1** the following command is used.
 +
 +<code bash>
 +[PS] C:​\>​Move-DatabasePath "​Mailbox Database 1" -EdbFilePath "​E:​\Mailbox Database 1\Mailbox Database 1.edb" -LogFolderPath "​F:​\Mailbox Database 1"
 +
 +Confirm
 +Are you sure you want to perform this action?
 +Moving database path "​Mailbox Database 1".
 +[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "​Y"​):​ y
 +
 +Confirm
 +To perform the move operation, database "​Mailbox Database 1" must be temporarily dismounted, which will make it
 +inaccessible to all users. Do you want to continue?
 +[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "​Y"​):​ y
 +</​code>​
 +
 +To check whether the database is mounted and accessible again you can run the following commands.
 +
 +<code bash>
 +[PS] C:​\>​Get-MailboxDatabase -Status "​Mailbox Database 1" | Select Name,​Mounted
 +
 +Name               ​Mounted
 +----               ​-------
 +Mailbox Database 1    True
 +
 +[PS] C:​\>​Test-MAPIConnectivity -Database "​Mailbox Database 1"
 +
 +MailboxServer ​     Database ​          ​Result ​   Error
 +------------- ​     -------- ​          ​------ ​   -----
 +E15MB1 ​            ​Mailbox Database 1 Success
 +</​code>​
  
  
microsoft/excange_2013_cmd_move_database.1484218039.txt.gz · Last modified: 2017/01/12 11:47 by admin