Sdílet prostřednictvím


How to Set a Database File Location

Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.

 

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

This topic explains how to use the Exchange Management Console or the Exchange Management Shell to set the location of mailbox or public folder database files.

Before You Begin

To perform the following procedures, 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 Microsoft Exchange Server 2007, see Permission Considerations.

Also, before you perform these procedures, be aware of the following:

  • You cannot configure the location of database files from a remote server.

  • A database is automatically dismounted, and then remounted while its files are being moved to a new location. During this time, the database is inaccessible to any user.

Procedure

To use the Exchange Management Console to set the database file location when you create a database

  1. Start the Exchange Management Console.

  2. In the console tree, expand Server Configuration, and then click Mailbox.

  3. In the result pane, click the Mailbox server that contains the storage group in which you want to create the database.

  4. In the work pane, click the storage group in which you want to create the database.

  5. In the action pane, click New Mailbox Database or New Public Folder Database. The New Mailbox Database wizard or New Public Folder Database wizard appears.

  6. In the database name box, type the name of the new database.

  7. On the New Mailbox Database or New Public Folder Database page, the Database file path box displays the default location of the database file. Click Browse to change the default location.

  8. If you do not want the database to be mounted when it is created, clear the Mount this database check box. Mounting a database puts it online, thereby making its data available to users.

  9. Click New to create the database. For more information about creating mailbox and public folder databases, see How to Create a New Mailbox Database and How to Create a New Public Folder Database.

To use the Exchange Management Console to change the database file location for an existing database

  1. Start the Exchange Management Console on the server that contains the database.

  2. In the console tree, expand Server Configuration, and then click Mailbox.

  3. In the result pane, click the Mailbox server that contains the database for which you want to change the database file location.

  4. In the work pane, click the desired database.

  5. In the action pane, click Move Database Path. The Move Database Path wizard appears.

  6. On the Introduction page, the Database file path box displays the location where your database file is currently stored. Click Browse to select a new location for the database file.

  7. Click Move. A warning appears indicating that the database must be temporarily dismounted, which will make it inaccessible to any user. To continue, click Yes.

  8. On the Completion page, confirm whether the database files were moved successfully. A status of Completed indicates that the wizard completed the task successfully. A status of Failed indicates that the task was not completed. If the task fails, review the summary for an explanation, and then click Back to make any configuration changes. Click Finish to complete the Move Database Path wizard.

To use the Exchange Management Shell to set the database file location when you create a mailbox database

  1. Run the following command, using the EdbFilePath parameter to specify the database location:

    New-MailboxDatabase -StorageGroup "Server01\First Storage Group" -Name MailboxDatabase01 -EdbFilePath "D:\DatabaseFiles\MailboxDatabase01.edb"
    
  2. To mount the new database, run the following command:

    Mount-Database -Identity MailboxDatabase02
    

For detailed syntax and parameter information, see the New-MailboxDatabase and Mount-Database reference topics.

To use the Exchange Management Shell to change the database file location for an existing mailbox database

  • On the server that contains the mailbox database, run the following command, using the EdbFilePath parameter to specify the database location:

    Move-DatabasePath -Identity "Server01\First Storage Group\First Mailbox Database" -EdbFilePath "D:\DatabaseFiles\First Mailbox Database.edb"
    

For detailed syntax and parameter information, see the Move-DatabasePath reference topic.

To use the Exchange Management Shell to set the database file location when you create a public folder database

  • Run the following command, using the EdbFilePath parameter to specify the database location:

    New-PublicFolderDatabase -Name "My Public Folder Database" -StorageGroup "Second Storage Group" -EdbFilePath "C:\Program Files\Microsoft\ExchangeServer\Mailbox\Second Storage Group\My Public Folder Database.edb"
    

For detailed syntax and parameter information, see the New-PublicFolderDatabase reference topic.

To use the Exchange Management Shell to change the database file location for an existing a public folder database

  • On the server that contains the public folder database, run the following command, using the EdbFilePath parameter to specify the database location:

    Move-DatabasePath -Identity "Server01\Second Storage Group\First Public Folder Database" -EdbFilePath "D:\DatabaseFiles\First Public Folder Database.edb"
    

For detailed syntax and parameter information, see the Move-DatabasePath reference topic.

For More Information

For more information about managing public folders, see Managing Public Folders.

For more information about managing mailbox databases, see Managing Mailbox Databases.

For information about configuring log files, see How to Set or Change the Location of Storage Group Log Files.