When you create a fresh, new installation of Exchange Server 2016, it automatically creates a new database for you. Most network environments have specific requirements for data storage, and it’s usually on a separate partition from the main C drive. If you find yourself in the position of moving the database, it’s a tricky process since you can’t just copy and paste the database to a new location. It requires dismounting the database, moving it, and mounting it again without disrupting your busy users.
Where is the Database Installed?
One of the most difficult parts of administrating software that automatically puts files in a standard location is finding that location. It’s not always an intuitive directory, especially when the administrator expects some kind of prompt to store them in alternative locations.
The default directory used by Exchange is the following:
C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\
You can confirm this location using Microsoft PowerShell. Open PowerShell and type the following command into the command line.
Get-MailboxDatabase | fl Name,EdbFilePath,LogFolderPath
The first command gets the mailbox file location. The second one gets the log file location. If you’re not familiar with the way a database is set up, just know that there is always the database file and then the log file that corresponds with the database to keep track of transactions.
Take note of the database name that is returned with the above command. You’ll need this for the next section.
Moving the Entire Database to a New Location (Warning: Disrupts Users!)
We’ll show you how to migrate an Exchange database without disrupting users, but first we’ll show you how to move the entire database files and their locations. You can perform this step using PowerShell. The command dismounts the database first and then transfers it to a new location that you specify.
Before we move the database, notice that Exchange gives the database an unfriendly name. If you move it, it would be difficult to identify it as the Exchange mailbox name among any other databases in your directory. Since many administrators store their database files in a separate data directory, we’re going to show you how to give the database a friendlier name.
Open PowerShell and type the following command:
Set-MailboxDatabase “Mailbox Database 3957483847” -Name “ExchangeDb”
Your original database name will be something different, but the main template through Exchange is “Mailbox Database <numbers>”. In the example above, we switch this name to a friendlier, recognizable name called ExchangeDb.
Now, we can perform the move. With PowerShell opened, type the following command.
Move-DatabasePath ExchangeDb -EdbFilePath D:\ ExchangeDb \ ExchangeDb.edb -LogFolderPath E:\ ExchangeDb
In the above statement, we move the database file from the default location to the D:\ExchangeDb directory, and we move the log file to the E:\ExchangeDb location. Of course, you can choose your own location.
That’s all it takes to move your files, but now let’s cover a way to move the data so that you don’t disrupt your users.
[cta id=’18654′]
Moving an Exchange 2016 Database without Disrupting Users
If you already have a database and just want to move mailbox data, you have the option of using the Exchange migration tool. Luckily, the tool is built into Exchange, so you don’t need to download any extra utilities or software.
To create a new empty DB :
New-MailboxDatabase -Name “ExchangeDB2” -EdbFilePath D:\ExchangeDb\ExchangeDB2\ExchangeDB2.edb
Open the Exchange admin center on the server that contains your current mailbox data and click “Recipients” in the left navigation panel. At the top of the page, click the “Migration” link.
The main migration page opens, and you can start the process. Click the button labeled “+” and then click “Move to a different database” from the drop-down menu. This option opens another page that gives you a list of options for migration.
This next page lets you select users from the local database, or you can specify users from a CSV file. In this case, since we want to move all users, choose the “Select the users that you want to move” option. Click the plus button to view a list of users.
The popup shows a list of current users on the database. You can select these users one by one, or you can just highlight them all to move every mailbox to its new location. Once you’ve selected all the users, click the OK button.
From the next screen, choose a name for your migration. Exchange saves the migration process, so you can perform this same action again without performing any of the same setup actions. You also have the option to move certain information such as the primary mailboxes and the archived mailboxes.
In this same screen, choose the database where you want to move the mailboxes to. If you want to move them to the new Exchange installation, you would choose the mailbox file we renamed in the previous section. Click the Next button.
The next screen asks you if you want any notifications after the migration completes. You can choose your options on this screen and click Next.
Once you move to the next screen, the migration begins. You’ll notice in the right panel that there is a “Details” link. This link lets you see the progress for your job.
You could see some slowness from the migration if you have several users to move and large amounts of data to transfer. However, your users will still be able to work with their email and calendar events.
You can perform both of these processes late at night to avoid any disruption issues. One of the great additions to Exchange 2016 is that you can synchronize your servers and integrate a new mail server more easily than older versions.
Leave a Comment