Thor Logo dbatools

Compatibility

Get-DbaDbCompatibility

Garry Bargsley, blog.garrybargsley.com

Get-DbaDbCompatibility View Source Garry Bargsley, blog.garrybargsley.com Windows, Linux, macOS Synopsis Retrieves database compatibility levels from SQL Server instances for upgrade planning and compliance auditing. Description Returns the current compatibility level setting for each database, which determines what SQL Server language features and behaviors are available to that database. This is essential when planning SQL Server upgrades, as databases often retain older compatibility levels even after the instance is upgraded. The function helps identify which databases may need compatibility level updates to take advantage of newer SQL Server features or to maintain vendor application support requirements.

Read more

Set-DbaDbCompatibility

Garry Bargsley, blog.garrybargsley.com

Set-DbaDbCompatibility View Source Garry Bargsley, blog.garrybargsley.com Windows, Linux, macOS Synopsis Changes database compatibility levels to match SQL Server instance version or specified target level. Description Updates database compatibility levels across one or more SQL Server instances. When no specific compatibility level is provided, automatically sets each database to match the SQL Server instance version it resides on. This is particularly useful after SQL Server upgrades when databases retain their original compatibility levels and need updating to take advantage of newer engine features and optimizations.

Read more

Test-DbaDbCompatibility

Chrissy LeMaire (@cl), netnerds.net

Test-DbaDbCompatibility View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Identifies databases running at lower compatibility levels than the SQL Server instance supports Description Compares each database’s compatibility level against the SQL Server instance’s maximum supported compatibility level. This helps identify databases that may not be leveraging newer SQL Server features and performance improvements available after an instance upgrade. Returns detailed comparison results showing which databases could benefit from compatibility level updates to match the server version.

Read more