Tip: Use the Exchange Management Shell to Determine the Status of Databases

Mailbox and public folder databases have several associated states, including:

  • Mounted
  • Dismounted
  • Backup In Progress
  • Online Maintenance In Progress
  • Replication In Progress

You can determine the status of a database by following these steps:
1. In Exchange Management Console, expand the Server Configuration node, and then select the related Mailbox node.
2. In the details pane, select the Mailbox server you want to examine. You should see a list of storage groups that are available on the server.
3. For each storage group, you should see a list of available databases. The icon to the left of the database name indicates the mount status. If the icon shows a gray down arrow, the database isn’t mounted. Otherwise, the database is mounted.
4. To determine the status of the database, right-click the database, and then select Properties. In the Properties dialog box, the status is listed on the General tab. In the Exchange Management Shell, you can determine the status of all or specific databases using the get-MailboxDatabase and get-PublicFolderDatabase cmdlets.

Tips RSS Feed

Subscribe to the TechNet Magazine Tips RSS feed.

The following code provides the syntax and usage for these cmdlets. To see status details, you must specify the status flags associated with each state you want to see as part of the formatted output. The Mounted, Dismounted, Backup In Progress, Online Maintenance In Progress, and Replication In Progress status values are then listed as True or False.
Syntax

get-MailboxDatabase [-Identity 'MailboxDatabase' |
-StorageGroup 'StorageGroup | -Server 'Server']
[-DomainController 'DCName']
[-IncludePreExchange2007 <$false|$true>]
[-Status <$false|$true>] | format-table Name,StorageGroup,
Mounted,BackupInProgress,OnlineMaintenanceInProgress
get-PublicFolderDatabase [-Identity 'PublicFolderDatabase' |
-StorageGroup 'StorageGroup | -Server 'Server']
[-DomainController 'DCName' ]
[-IncludePreExchange2007 <$false|$true>]
[-Status <$false|$true>] |
format-table Name, StorageGroup, Mounted, BackupInProgress,
OnlineMaintenanceInProgress,ReplicationInProgress

Usage for specific database and server

get-MailboxDatabase –Identity 'CORPSVR127\Storage Group 2\Eng DB'
–Status | format-table Name,StorageGroup,
Mounted,BackupInProgress,OnlineMaintenanceInProgress

Usage for all databases on a server

get-MailboxDatabase –Server 'CORPSVR127' –Status | format-table
Name,StorageGroup, Mounted, BackupInProgress,
OnlineMaintenanceInProgress

Usage for all databases

get-MailboxDatabase –Status | format-table Name,StorageGroup,
Mounted,BackupInProgress,OnlineMaintenanceInProgress

From the Microsoft Press book Microsoft Exchange Server 2007 Administrator’s Pocket Consultant, Second Edition by William R. Stanek.

Looking for More Tips?

For more Exchange Server tips, visit the TechNet Magazine Exchange Server 2007 Tips page.

For more Tips on other products, visit the TechNet Magazine Tips index.