Exchange 2019: ExchangeStoreDB EventID 171 database cannot be mounted

Problems can occur on an Exchange 2019 server if a database is larger than 1 TB. On an Exchange 2019 Standard Server, the maximum database size is 1 TB; if the database is larger, there are problems with failover within the DAG. Databases larger than 1 TB can also be mounted on an Exchange Standard Server. The following error message from the ExchangeStoreDB source is then logged in the event log:

Exchange 2019: ExchangeStoreDB EventID 171 database cannot be mounted

Source: ExchangeStoreDB

Event ID: 171

Message:

At '16.04.2023 19:38:25' database copy 'DBNAME' on this server exceeded the configured maximum database size and service recovery was not attempted. Please increase the value of this registry key on the server hosting the active database copy before attempting to mount this database. For more details about the failure, consult the Event log on the server for other storage and "MSExchangeIS" events.

Exchange Server 2019 Enterprise Edition has no such limit. Fortunately, you do not necessarily have to switch to the Enterprise Edition if a database becomes larger. The limit can be easily adjusted in the registry.

To increase the maximum database size, you must first display the GUID of the database:

Get-MailboxDatabase DATENBANKNAME | select name,guid

The following path must now be searched for in the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\SERVERNAME\Private-DATENBANKGUID

A new DWORD with the name "Database Size Limit in GB" and the desired new limit as a decimal value can now be created under this path. In this example it is 2 TB:

After the limit has been adjusted, the database can be mounted again with the following command:

Mount-Database DBNAME -Force

If you have several databases and several Exchange servers, you can also make your work a little easier with a small PowerShell script:

#New max database size in GB:
$NewDBMaxSize = 2048
$DBGUIDs = Get-ExchangeServer $env:computername | Get-MailboxDatabase | select guid
foreach ($DBGUID in $DBGUIDs) {
$RegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\MSExchangeIS\"
$DatabaseRegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\MSExchangeIS\" + $env:computername + "\Private-" + $DBGUID.Guid
New-ItemProperty -Path $DatabaseRegPath -Name "Database Size Limit in GB" -Value $NewDBMaxSize -PropertyType DWORD -Force | Out-Null
}

The script determines the GUIDs of the databases on the server on which it is executed and enters the new limit ($NewDBMaxSize) in the registry. The script must be executed in an Exchange Management Shell with administrative rights. These limits also apply to Exchange Server 2016 in the Standard Edition. The script is also available on GitHub:

7 thoughts on “Exchange 2019: ExchangeStoreDB EventID 171 Datenbank lässt sich nicht mounten”

  1. Ich habe nicht geschrieben dass es technisch nicht funktioniert, ich habe nur darauf hingewiesen dass man mit Standard Lizenz keine Datenbanken größer 1 TB einbinden kann und gleichzeitig sauber lizenziert ist, steht auch so in dem genannten Artikel.

    Reply
    • Das sollte man auch nicht unbedingt dauerhaft so betreiben, da das spätestens beim nächsten CU einem um die Ohren fliegen kann. Der Workaround ist mMn eher dafür gedacht, die Datenbank temporär wieder online zu bekommen um dann eine bzw. zwei weitere anzulegen (sofern man das Limit noch nicht erreicht hat) und dann Postfächer durch Umzug auf mehrere kleinere Datenbanken aufzuteilen. So haben wir das gemacht, als wir in dieses Problem gelaufen sind. Das sollte dann auch lizenztechnisch eher kein Problem sein, weil man am Ende sich ja wieder innerhalb des Limits befindet.

      Reply
  2. Mit der Standardlizenz hebelt der Workaround die saubere Lizenzierung aus. Ist das unter Exchange 2019 jetzt anders?

    Reply
  3. Ja, hierüber bin ich auch schon mal fies gestolpert. Besonders böse dabei: Solange die DB noch gemountet ist funktioniert die und es gibt meine ich auch keine Fehlermeldung darüber, dass was im Argen ist. Das Problem tritt erst auf, wenn die neu gemountet werden soll, z.Bsp. nach einem Serverneustart.

    Reply

Leave a Comment