One of the tasks common in Exchange 2010 is creating a mailbox database. If DAG is involved, then adding a second copy (or third or more) is also common. In addition, application servers such as RIM® Blackberry™ Enterprise Server and CommVault have service accounts that are typically granted permissions at the database level so that they can interact with the database mailboxes. This guide will show you how to create a database, add database copies, and change the database to support BES or similar third-party application service accounts. Powershell commands equivalent to the EMC GUI are shown – in the case of the database changes, powershell is the only method to make the necessary changes (although you could use ADSIedit if you were very brave/adventurous).
Assumptions
· You know the database and transaction log file location. If you are creating multiple database copies, the server data location is IDENTICAL between servers.
· This procedure assumes an existing Database Availability Group (DAG)
· You know the activation preference for subsequent database copies
· If the mailbox server upon which you are placing the active copy of the new database does not have a public folder (PF) database, you know which PF database you want the new mailbox database to use.
· You are using the default offline address book.
· You know the netbios\alias or username of the service accounts for applications such as BES or the Commvault backup agent.
You will need to adjust these commands to match your specific parameters. If you choose to do the file locations on the fly, the powershell/GUI creation process will create the paths for you.
Create the mailbox database
Open the EMC (Exchange Management Console)
Once that tool is open, expand the tree in the left pane until you can see the “Organization Configuration | Mailbox” as shown, and the select New Mailbox Database
Input the names as prompted
The program will input default locations for the database file path and the log folder path. You may not want this. Keep in mind, the database path needs to be a complete path, with file name. The log folder path is just the folder that will hold the log files.
Here is an example of paths that are different from the default
Check off the “mount this database” as you desire. I always leave it checked, and about 40% of the time, the database will mount properly. If it does not mount, give yourself about 10 minutes for AD to catch up, and then mount the database.
You get a chance to review your selection (and go back if needed)
Here is the new database creation process at the finish screen
Here is the underlying powershell commands for creating the new database and mounting the new database: (the first command wrapped – powershell commands need to be on one line)
new-mailboxdatabase -Server 'E2010THIRD' -Name 'New Database' -EdbFilePath 'C:\VolMtPts\NewDB\EDB\New Database.edb' -LogFolderPath 'C:\VolMtPts\NewDB\TL'
mount-database -Identity 'New Database'
Add Database Copy
From the same location in the EMC, choose the “Database Management” tab, select a mailbox database, and then select “Add Mailbox Database Copy” from the Action Pane.
When the wizard opens, note that you do not get to change the database name, the server(s) already with a copy of the database are shown, and you have a “preference” number. The preference number is used to determine automatic mount order should the active database fail. For the second copy, leave it as “2.” If you are making 3 or 4 copies and doing the creation in reverse order, you could set this to 4 or 3 and then do the lower precedence number later. If you set this number to “1” the original database will be raised to “2.” At any rate, browse for a new server to host the new database copy. When you have things the way you want them, click on “ADD.”
At the end, you will have a mailbox database with two copies, one copy mounted, the other healthy and ready to take over if needed.
Here is the powershell equivalent:
Add-MailboxDatabaseCopy -Identity 'New Database' -MailboxServer 'E2010SECOND' -ActivationPreference '2'
Add PF and OAB to new Mailbox Database
In the EMC, select the new database, and then right-click it to get at the properties as shown
Note the details regarding the database reflect the database as a logical entity, not a physical object.
Select the “Client Settings” tab and adjust the PF database and OAB to your environment.
Select the “Limits” tab and adjust the database limits to your environment. This illustration shows the system database defaults.
Select the “Maintenance” tab and adjust the database to your environment.
Change database to support third-party applications
Once you have a new database, and a new copy of the database, and you have adjusted the database to meet the requirements in your environment, you need to change a few permissions to allow third-party applications such as Commvault® and BES™ to access the mailboxes housed in the database.
The database parameters that need adjusting are only exposed to powershell. To begin, open an Exchange Management Shell.
You should get something that looks like this.
BES and CommVault need read-as and send-as at the database level so that they can send and receive mail on behalf of the individual user. What needs to be done with a new database is grant permissions to the service account.
get-mailboxdatabase –identity “new database” | add-adpermission –user <service account> -extendedrights receive-as,send-as
YMMV.