Export (0) Print
Expand All

Move-DatabasePath

 

Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1

Topic Last Modified: 2008-07-07

Use the Move-DatabasePath cmdlet to set a new path to the location of a database on the specified Mailbox server and to move the related files to that location.


Move-DatabasePath -Identity <DatabaseIdParameter> [-ConfigurationOnly <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-CopyEdbFilePath <EdbFilePath>] [-DomainController <Fqdn>] [-EdbFilePath <EdbFilePath>] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Use the Move-DatabasePath cmdlet to set a new path to the location of a database on the specified Mailbox server and move the related files to that location. This cmdlet is valid only for Microsoft Exchange Server 2007 Mailbox servers.

When you use the Move-DatabasePath cmdlet, consider the following:

  • This cmdlet fails if it is run while the database is being backed up.

  • If the specified database is mounted when this cmdlet is run, the database will be automatically dismounted and then remounted, and will be unavailable to users while it is dismounted.

  • In a cluster continuous replication (CCR) environment, the second copy of the data must be moved manually.

  • This command can be run on the affected Mailbox server only, except that it can be run on an administrator's workstation when you are using the ConfigurationOnly parameter.

To run the Move-DatabasePath cmdlet, the account you use must be delegated the following:

  • Exchange Server Administrator role and local Administrators group for the target server

For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.

 

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.DatabaseIdParameter

The Identity parameter specifies the GUID, distinguished name (DN), or name of the database.

  • When specifying the database name, you can include the server name by using the format Server Name\Storage Group\Database.

  • The Identity parameter label is optional.

ConfigurationOnly

Optional

System.Management.Automation.SwitchParameter

The ConfigurationOnly parameter changes the configuration of the database without moving any files. A value of $true only changes the configuration in Active Directory. A value of $false changes the configuration in Active Directory and moves the files. The default value is $true.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm parameter causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm parameter.

CopyEDBFilePath

Optional

Microsoft.Exchange.Data.EdbFilePath

The CopyEDBFilePath parameter specifies a new file path for the backup copy of the database. This file path cannot be the same as the EDBFilePath.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to the Active Directory directory service, include the DomainController parameter in the command.

EDBFilePath

Optional

Microsoft.Exchange.Data.EdbFilePath

The EDBFilePath parameter specifies a new file path for the database. All current database files are moved to this location. The default location is <ExchangeInstallDirectory>\Mailbox\LocalCopies\Storage Group\MBDatabase.edb. This file path cannot be the same as the path for the backup copy of the database.

Force

Optional

System.Management.Automation.SwitchParameter

Include the Force parameter to force the command to execute without asking for user confirmation.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf parameter.

 

Error Description

 

 

Exceptions Description

 

In the first example, the Move-DatabasePath command is used to set a new path for the mailbox database specified by the GUID.

In the second example, the Move-DatabasePath command is used to set a new path for the mailbox database specified by the database name, using the Identity parameter format Server Name\Storage Group\Database.

Move-DatabasePath -Identity a0ec9f03-12a9-4e40-9310-43f9105fd4d2 -EdbFilePath C:\NewFolder\MyDatabase.edb
Move-DatabasePath -Identity "ExchangeServer2.Contoso.com\First Storage Group\Mailbox Database 2" -EdbFilePath "C:\NewFolder\Mailbox Database 2.edb"

To perform the move operation, the database must be temporarily dismounted, making it inaccessible to all users. If the database is currently dismounted, it is not remounted upon completion.

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft