Execution Flow
The 85–95% tolerance band avoids flagging every instance that's off by a rounding error from the 90% target. This is a read-only diagnostic, set the value with dbatools'
Set-DbaMaxMemory. On instances that share hardware with other SQL instances or services, the 90% default target is too aggressive; use -RecommendedPct to match your actual sizing plan.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| -SqlInstance | String | Required | SQL Server instance name, e.g. "MSSQLSERVER" or "SERVER\INST01". |
| -RecommendedPct | Int (70–99) | Optional | Target percentage of physical RAM for SQL Server. Default: 90. |
Return Value
Returns a single PSCustomObject with: SqlInstance, CurrentMaxMemMB, RecommendedMB, TotalRamMB, Status (OK, TooHigh, TooLow, Unconfigured, or Error), Message.
Examples
Example 1, Check against the default 90% target
Test-sqmMaxMemory -SqlInstance 'MSSQLSERVER'Example 2, Show only instances that need adjustment
Test-sqmMaxMemory -SqlInstance 'SQL01\INST1' | Where-Object { $_.Status -ne 'OK' }