Exchange 2010 Monitoring: Database Management (Part 2, Ongoing Management and Statistics)
Last week we looked at Exchange 2010 new features and best practices, this week we’re going to look at ongoing management activities and important database statistics.
Ok, let’s take a look now at standard database management activities.
In Exchange 2010 the concept of storage groups has been removed meaning mailbox databases are now uncoupled from an individual Mailbox server. With this change replication now occurs at the database level, transaction logs are replicated to one or more Mailbox servers, and replayed into each copy of the database.
As with Exchange 2007, in Exchange 2010 you can use the Exchange Management Shell to manage the database and its copies.
Creating a database
Let’s start with creating the database, for this we can use a simple command specifying the the server where it is located, the database path and the location of the logs.
New-MailboxDatabase "EXDB01" -Server EXCHANGE2010SRV -EdbFilePath "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\EXDB01\EXDB01.edb" -LogFolderPath "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\EXDB01 Logs\"

Mounting and Dismounting a database
Mount-Database EXDB01

Dismount-Database EXDB01

Moving a database and transaction logs
In the case of high availability, to move a database path you must first delete the database replicas, move the path and then recreate the replicas.
Move-DatabasePath “EXDB01” –Edbfilepath D:\EXDB01\EXDB01.edb

Move-DatabasePath -Identity EXDB01 -LogFolderPath D:\EXDB01 Logs\

Enable Circular Logging
If relying upon Exchange High Availability or a backup-less solution it is important to enable circular logging This can be enabled by running the below command:
Set-MailboxDatabase EXDB01 -CircularLoggingEnabled $True

Enable or Disable Exchange search
Exchange Search performs full-text index of Mailbox databases giving users the ability to search their email quickly. We can use the commands below to configure:
Individual Database
Set-MailboxDatabase "EXDB01" -IndexEnabled $False

To disable for the entire Mailbox Server disable the service
Stop-Service MSExchangeSearch
Set-Service MSExchangeSearch -StartupType Disabled

To re-enable the service:
Set-Service MSExchangeSearch -StartupType Automatic
Start-Service MSExchangeSearch

Specify a Client Access Server for a Database
Set-MailboxDatabase DB01 –RpcClientAccessServer exchange2010srv

Statistics
Status
Get-MailboxDatabase -Status

Mailbox Counts
Get-Mailbox | Group-Object -Property:Database | Select-Object name,count

Database Sizes
Get-MailboxDatabase -Status |Select Name, DatabaseSize,AvailableNewMailboxSpace

Average Mailbox Size
Get-Mailbox -Database Mailbox Database 0436873797 | Get-MailboxStatistics | %{$_.TotalItemSize.Value.ToMB()} | Measure-Object -sum -average -max -min

Hopefully we’ve provided a good introduction to Exchange 2010 and some best practices around database management. Please check back next week for part 3 where I review Database maintenance. In the meantime please feel free to check our webpage on Exchange 2010 monitoring.