If an Exchange Server Standard Edition mailbox database grows beyond the default 1,024 GB (1 TB) logical size limit, the Microsoft Exchange Information Store (MSExchangeIS) will automatically dismount the database during background maintenance and refuse to remount it, logging Event ID 1012 / 4002 and returning the following error in the Exchange Admin Center (EAC) or Exchange Management Shell (EMS):
Failed to mount database "DB01".
Error: An Active Manager operation failed. Error: The database action failed.
Error: Database 'DB01' on server 'EXCH01' cannot be mounted due to a previous error:
At '3/14/2019 9:41:57 AM' database copy 'DB01' 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.
In this step-by-step troubleshooting guide for Exchange Server 2016, Exchange Server 2019, and Exchange Server Subscription Edition (SE), we show how to immediately increase the Database Size Limit in Gb registry key across single servers or all Database Availability Group (DAG) members using PowerShell, remount the database safely, and reclaim whitespace without offline defragmentation (eseutil /d).
Architecture: How Exchange Enforces and Overrides the 1,024 GB Database Size Limit
- Exchange Standard Edition defaults to 1,024 GB
MSExchangeISdismounts DB to prevent corruption- Blocks
Mount-Databaseuntil registry override is set
- Get DB GUID:
(Get-MailboxDatabase DB01).Guid - Create
REG_DWORD:Database Size Limit in Gb - Restart
MSExchangeIS& runMount-Database -Force
- Create new Mailbox Database (
New-MailboxDatabase) - Move largest mailboxes via
New-MoveRequest - Keep production DBs under 2 TB (DAG) / 200 GB (Standalone)
Default vs. Maximum Database Size Limits by Exchange Edition
| Exchange Server Version & Edition | Default Database Size Limit | Hard Maximum Supported Limit (via Registry) | Microsoft Best-Practice Target Size |
|---|---|---|---|
| Exchange 2016 / 2019 / SE Standard Edition | 1,024 GB (1 TB) | 16,000 GB (16 TB) | ≤ 200 GB (Standalone) or ≤ 2 TB (2+ DAG copies) |
| Exchange 2016 / 2019 / SE Enterprise Edition | Unlimited (16 TB logical cap) | 16,000 GB (16 TB) | ≤ 2 TB (with 2 or more highly available DAG copies) |
Step 1: Check the Database GUID and Current Physical .edb Size
Open the Exchange Management Shell (EMS) as Administrator and retrieve the unique GUID of the dismounted database (DB01), along with all DAG servers that host a copy of this database:
$DbName = "DB01"
$Db = Get-MailboxDatabase -Identity $DbName -Status
[PSCustomObject]@{
DatabaseName = $Db.Name
DatabaseGuid = $Db.Guid
Mounted = $Db.Mounted
ActiveServer = $Db.Server.Name
EdbFilePath = $Db.EdbFilePath
DatabaseCopiesServers = ($Db.Servers | ForEach-Object { $_.Name }) -join ", "
} | Format-List
Step 2: Automated PowerShell Script to Set Database Size Limit in Gb Across All DAG Servers
Critical DAG Rule: If your database is replicated in a Database Availability Group (DAG), you must create the Database Size Limit in Gb registry value on every DAG member server hosting a copy of that database. Otherwise, if the database fails over to a secondary node that still has the 1,024 GB default, it will immediately dismount on the target server!
Also note the exact capitalization required by the Exchange Information Store service: Database Size Limit in Gb (or case-insensitive Database Size Limit in GB in the Windows Registry under Private-<DatabaseGuid>):
- Registry Path:
HKLM:\SYSTEM\CurrentControlSet\Services\MSExchangeIS\<ServerName>\Private-<DatabaseGuid> - Value Name:
Database Size Limit in Gb - Value Type:
DWORD (32-bit) - Value Data (Decimal): New limit in GB (for example,
1536for 1.5 TB or2048for 2 TB)
Run this PowerShell script in the Exchange Management Shell to apply the new limit (2048 GB), restart MSExchangeIS on the active server, and mount the database:
$DbName = "DB01"
$NewLimitInGB = 2048 # 2 TB (2048 GB) in Decimal
$WarningPct = 90 # Log warning event at 90% of limit
$Db = Get-MailboxDatabase -Identity $DbName
$DbGuid = $Db.Guid.ToString()
$TargetServers = $Db.Servers | Select-Object -ExpandProperty Name
foreach ($Server in $TargetServers) {
Write-Host "[+] Configuring $NewLimitInGB GB limit for $DbName ($DbGuid) on $Server..." -ForegroundColor Cyan
Invoke-Command -ComputerName $Server -ScriptBlock {
param($ServerName, $Guid, $LimitGB, $WarnPct)
$RegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\MSExchangeIS\$ServerName\Private-$Guid"
if (-not (Test-Path $RegPath)) {
New-Item -Path $RegPath -Force | Out-Null
}
New-ItemProperty -Path $RegPath -Name "Database Size Limit in Gb" `
-Value $LimitGB -PropertyType DWord -Force | Out-Null
New-ItemProperty -Path $RegPath -Name "Database Size Buffer in Percentage" `
-Value $WarnPct -PropertyType DWord -Force | Out-Null
Get-ItemProperty -Path $RegPath | Select-Object "Database Size Limit in Gb", "Database Size Buffer in Percentage"
} -ArgumentList $Server, $DbGuid, $NewLimitInGB, $WarningPct
}
# Restart Microsoft Exchange Information Store on the active server and mount the database
$ActiveServer = $Db.Server.Name
Write-Host "[+] Restarting MSExchangeIS on $ActiveServer and mounting $DbName..." -ForegroundColor Green
Invoke-Command -ComputerName $ActiveServer -ScriptBlock { Restart-Service MSExchangeIS }
Mount-Database -Identity $DbName -Force
Step 3: Verify Available New Mailbox Space (Whitespace) & Long-Term Remediation
Once the database is mounted, check how much internal whitespace (AvailableNewMailboxSpace) exists inside the .edb file:
Get-MailboxDatabase -Identity "DB01" -Status |
Select-Object Name, Server, Mounted, DatabaseSize, AvailableNewMailboxSpace | Format-Table -AutoSize
How to Shrink the Physical .edb File Without Downtime
Never run eseutil /d (offline defragmentation) in production, as it requires taking the database offline for hours and breaks DAG replication requiring a full reseed. Instead:
- Create a new Mailbox Database (
New-MailboxDatabase -Name "DB02" -EdbFilePath ... -LogFolderPath ...). - Move mailboxes from
DB01toDB02online with zero user downtime (Get-Mailbox -Database "DB01" | New-MoveRequest -TargetDatabase "DB02"). - Once
DB01is empty (including Arbitration, Archive, and Monitoring mailboxes), dismount and deleteDB01(Remove-MailboxDatabase -Identity "DB01").