Database Compatibility Level

The database compatibility level controls how the SQL Server database engine processes queries. Running at the latest supported compatibility level ensures access to current performance and feature improvements.

Requirements

Trapeze products require a minimum database compatibility level of 130 (SQL Server 2016). Running a database at a compatibility level below 130 may result in unexpected behavior or errors.

For best results, set the database compatibility level to match the version of SQL Server that is installed. For example, a database hosted on SQL Server 2022 should use compatibility level 160.

SQL Server Version Compatibility Level
SQL Server 2016 130 (minimum)
SQL Server 2017 140
SQL Server 2019 150
SQL Server 2022 160

After a SQL Server Upgrade

When SQL Server is upgraded or a database is migrated using backup and restore or detach and attach, the database compatibility level does not automatically update. It continues to run at the previous level until a database administrator explicitly changes it.

After any SQL Server upgrade or database migration, verify the compatibility level and update it to match the installed SQL Server version. To view or change the compatibility level, use SQL Server Management Studio or T-SQL. For instructions, refer to the Microsoft documentation on database compatibility levels.

How to Check the Compatibility Level

To check the current compatibility level of a database, run the following query in SQL Server Management Studio:

SELECT name, compatibility_level
FROM sys.databases;

Alternatively, in SQL Server Management Studio, right-click the database, select Properties, and then select Options to view the compatibility level.