GSX Blog

Exchange 2010 Monitoring: Database Management (Part 2, Ongoing Management and Statistics)

Posted by Carl Drechsel on Tue, Dec 20, 2011

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\"

New maiboxdatabase

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\ 

Move-DatabasePath 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

Circular Logging

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

Exchange Search

To disable for the entire Mailbox Server disable the service

Stop-Service MSExchangeSearch

Set-Service MSExchangeSearch -StartupType Disabled 

Exchange Search Service

To re-enable the service:

Set-Service MSExchangeSearch -StartupType Automatic

Start-Service MSExchangeSearch

MSExchangeSearch Service

Specify a Client Access Server for a Database

Set-MailboxDatabase DB01 –RpcClientAccessServer exchange2010srv 

Specify Client Access Server



Get-MailboxDatabase -Status

Get-MailboxDatabase -Status

Mailbox Counts

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

Get-Mailbox Counts

Database Sizes

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

Get-MailboxDatabase Sizes

Average Mailbox Size

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

Exchange Average Mailbox Size

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.


Check out Part 3 of this article! 


Find out why more than 6 million mailboxes are monitored by GSX Solutions!

Tags: Exchange 2010, Scripts, Database Management, Exchange 2010 monitoring, Powershell, Exchange Management Shell