Experience Stellar's software with confidence! 100% safe to download.
Free Download For Windows

Email Repair

How to Check Exchange Database Health?

Summary:Checking the Exchange database health is important to ensure that the Exchange Server database is healthy and mounted at all times. But for some reason, if the database dismounts or does not mount, it can lead to downtime. In this guide, we’ve mentioned the steps to check the health of the Exchange database and to restore it if any issue arises.

Free Download For Windows
Free Download For Windows

Monitoring Exchange Server is one of the most critical tasks of the administrators that they have to perform every day to ensure email services are up and running. A corrupt or inconsistent Exchange database can lead to downtimes. It can disrupt email services and prevent users from accessing their mailboxes or sending or receiving new emails.

To prevent such a scenario, Microsoft Exchange Server requires periodic maintenance and testing to ensure that the server and its components, including the database, remain healthy and up-to-date.

In this post, we will be discussing the steps to check the Exchange databases’ health.

Steps to Check Exchange Database Health

Follow the below steps to check the database health and restore the Exchange Services and the database, in case of any issue.

Step 1: Check Exchange Services

If there’s any disruption caused in your organization where users are not able to connect or access their mailboxes, a corrupt or damaged database could be a reason. However, before moving to any conclusion, it would be best to validate and check all Microsoft Exchange services on your Exchange Server are up and running. This can be done by opening the Services app on your Exchange Server. The steps are as follows:

  • PressWindows + Rkeys on the keyboard, typeservices.msc,and press theEnterkey or clickOK
  • Check the Microsoft Exchange services and ensure the required services of the Exchange Server are up, along with other dependent services.
    check and restart exchange services

Alternatively, you can use the below PowerShell cmdlet. This will give you a complete overview of the Exchange Services status.

Test-ServiceHealth

test servicehealth

Step 2: Check Database Status

If there are no complaints by the users, it does not mean that all is fine. After ensuring the Exchange Services are running, check if the databases are mounted. The database where the archives are stored may be down. To check this, you can use theExchange Admin Center (EAC).The steps are as follows:

  • Open theExchange Admin Center (EAC)by browsing the Exchange Server and adding the/ECPat the end of the URL.
https://ex01/ecp
  • Log in with the administrator’s credentials and click on theServerssection in the left pane.
  • Click ondatabases.

Exchange Admin Center

  • Make sure that the databases’ status is showing as mounted.

Alternatively, you can use PowerShell to check the status of the database. Run theGet-MailboxDatabase cmdletas given below.

Get-MailboxDatabase -Status | Format-List name,server,mounted

得到邮箱数据库

With this simple command, you can see all the databases and their mounting status. If the database ‘Mounted’ status is ‘False’, it indicates a problem. You can try tomount Exchange databaseby using the below PowerShell cmdlet.

Mount-Database -Identity DB2

mount database

如果数据库没有山, there could be some issues that need further investigation.

Step 3: Repair the Database

You can use theESEUtil Commandto identify the possible cause of the issue, along with two recovery options – Soft Recovery and Hard Recovery. First, you need to confirm the status of the database. You can use the/mhparameter to know the status of the database.

eseutil database status

If the state is shown asDirty Shutdown, it means that the database or logs are corrupt, or a log is missing (uncommitted). In this case, you can performSoft Recovery by running the ESEUtil command with the /r parameter

EseUtil /r E00 /l C:\EDB /d C:\EDB\db2.edb

eseutil soft recovery

Depending on the size of the database, this may take some time. If the Soft Recovery is successful, you can try to mount the database. If it mounts, take a backup of the database to make sure that all is fine.

If it is not successful, you may need to performESEUTIL /P Hard Recovery.然而,建议避免艰难复苏as it can lead to data loss. Hard Recovery purges all the data which is deemed corrupt. Apart from this, after Hard Recovery, the database is hardcoded and Microsoft will not provide any support if you face an issue. Also, there’s no guarantee that the database would mount after this process.

hard recovery eseutil

After successful recovery, it is highly suggested to perform defragmentation of the database. It is to be noted that the database will not be mounted during this process. The defrag process will remove all the white space to improve the performance of the database. Before running the defrag process, it is good to see the status, size, and free space of the database. This can be done by running theGet-MailboxDatabasewith some parameters.

Get-MailboxDatabase -Status | ft name, databasesize, availablenewmailboxspace -auto

get-mailboxdatabase -status

Here, you can see thatDB3has a size of247MB, with118MBof free space. So, it needs defragmentation to clear that space. To run the defrag process, it is best to have ample storage space as it will create a new EDB file to work on. To defrag a database, you need to use the ESEUtil with the /d parameter, as given below.

Eseutil /d "DB3.edb" /t "temp_db3.edb"

This will defrag the database. After that, you can again run theGet-MailboxDatabaseto see the shrunk database.

Conclusion

In this post, we’ve shared the steps to check the health of Exchange databases. However, in a large setup, it is strongly suggested to have a monitoring system in place with alerts that constantly check the status of the Exchange Server, its services, and databases, apart from CPU, storage, and other resources.

If something fails, you will end up with a huge administrative effort to recover the data or end up with data loss as you would need to restore from the previous day’s backup. However, you can cut down on administrative effort and resources by usingStellar Repair for Exchangesoftware that can open any version of the Exchange Server database - healthy or not. By using the software, you can repair and export mailboxes from the database to PST and other formats. You can also export directly to a new live Exchange database or Office 365 tenant. The software is easy-to-use, fast, and can reduce downtime and effort to the minimum.

progress
83% of people found this article helpful

WHY STELLAR®IS GLOBAL LEADER

Why Choose Stellar?
  • 0M+

    Customers

  • 0+

    Years of Excellence

  • 0+

    R&D Engineers

  • 0+

    Countries

  • 0+

    PARTNERS

  • 0+

    Awards Received

  • TUV SUD ISO 27001
  • TUV SUD ISO 9001
  • NIST
  • HIPAA Verified