Author | Michael Fal (@Mike_Fal), mikefal.net |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Test-DbaTempDbConfig on GitHub.
Want to see the Bill Of Health for this command? Check out Test-DbaTempDbConfig.
Tests tempdb configuration against SQL Server best practices and returns compliance status for each rule.
Performs a comprehensive audit of tempdb configuration against Microsoft's recommended best practices, returning detailed compliance results for each rule. This saves DBAs from manually checking multiple tempdb settings and provides clear guidance on which configurations need attention.
The function evaluates six critical areas of tempdb configuration:
Each rule returns the current setting, recommended setting, and whether the configuration follows best practices. This is particularly useful during SQL Server health checks, performance troubleshooting, or compliance audits where tempdb configuration directly impacts system performance.
Test-DbaTempDbConfig
[-SqlInstance] <DbaInstanceParameter[]>
[[-SqlCredential] <PSCredential>]
[-EnableException]
[<CommonParameters>]
PS C:\> Test-DbaTempDbConfig -SqlInstance localhost
Checks tempdb on the localhost machine.
PS C:\> Test-DbaTempDbConfig -SqlInstance localhost | Select-Object *
Checks tempdb on the localhost machine. All rest results are shown.
PS C:\> Get-DbaRegServer -SqlInstance sqlserver2014a | Test-DbaTempDbConfig | Select-Object * | Out-GridView
Checks tempdb configuration for a group of servers from SQL Server Central Management Server (CMS). Output includes all columns. Send output to GridView.
The target SQL Server instance or instances. SQL Server 2005 and higher are supported.
Alias | |
Required | True |
Pipeline | true (ByValue) |
Default Value |
Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).
Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.
For MFA support, please use Connect-DbaInstance.
Alias | |
Required | False |
Pipeline | false |
Default Value |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |