Home
%3CLINGO-SUB%20id%3D%22lingo-sub-1003458%22%20slang%3D%22en-US%22%3EGeneral%20availability%3A%20Database%20compatibility%20level%20150%20in%20Azure%20SQL%20Database%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1003458%22%20slang%3D%22en-US%22%3E%3CP%3EWith%20last%20week%E2%80%99s%20%3CA%20href%3D%22https%3A%2F%2Fcloudblogs.microsoft.com%2Fsqlserver%2F2019%2F11%2F04%2Fsql-server-2019-is-now-generally-available%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Elaunch%20of%20SQL%20Server%202019%3C%2FA%3E%2C%20database%20compatibility%20level%20150%20moves%20out%20of%20public%20preview%20and%20into%20general%20availability%20status.%20With%20this%20change%20in%20status%2C%20the%20default%20compatibility%20level%20for%20%3CEM%3Enew%3C%2FEM%3E%20databases%20created%20in%20Azure%20SQL%20Database%20is%20now%20150.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20alignment%20of%20SQL%20versions%20to%20default%20compatibility%20levels%20are%20as%20follows%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E100%3A%20in%20SQL%20Server%202008%20and%20Azure%20SQL%20Database%3C%2FLI%3E%0A%3CLI%3E110%3A%20in%20SQL%20Server%202012%20and%20Azure%20SQL%20Database%3C%2FLI%3E%0A%3CLI%3E120%3A%20in%20SQL%20Server%202014%20and%20Azure%20SQL%20Database%3C%2FLI%3E%0A%3CLI%3E130%3A%20in%20SQL%20Server%202016%20and%20Azure%20SQL%20Database%3C%2FLI%3E%0A%3CLI%3E140%3A%20in%20SQL%20Server%202017%20and%20Azure%20SQL%20Database%3C%2FLI%3E%0A%3CLI%3E150%3A%20in%20SQL%20Server%202019%20and%20Azure%20SQL%20Database%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EFor%20details%20on%20what%20compatibility%20level%20150%20specifically%20enables%2C%20see%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fperformance%2Fintelligent-query-processing%3Fview%3Dsql-server-2017%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EIntelligent%20query%20processing%20in%20SQL%20databases%3C%2FA%3E.%26nbsp%3BThe%20IQP%20feature%20family%20includes%20multiple%20features%20that%20improve%20the%20performance%20of%20existing%20workloads%20with%20minimal%20implementation%20effort.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20this%20new%20database%20compatibility%20default%20goes%20into%20effect%2C%20if%20you%20wish%20to%20still%20use%20database%20compatibility%20level%20140%20or%20lower%2C%20please%20follow%20the%20instructions%20detailed%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fna01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fdocs.microsoft.com%252Fen-us%252Fsql%252Frelational-databases%252Fdatabases%252Fview-or-change-the-compatibility-level-of-a-database%26amp%3Bdata%3D02%257C01%257CUmachandar.Jayachandran%2540microsoft.com%257C04ae16681bcb4862657508d4eb04b66c%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C636391853007257605%26amp%3Bsdata%3DrHDtYbB4Sujo4ok6x%252F8sxpWAKq7KJRH1%252BZrxNhXL3mo%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eview%20or%20change%20the%20compatibility%20level%20of%20a%20database%3C%2FA%3E.%20For%20example%2C%20you%20may%20wish%20to%20ensure%20that%20new%20databases%20created%20in%20Azure%20SQL%20Database%20use%20the%20same%20compatibility%20level%20as%20other%20databases%20in%20Azure%20SQL%20Database.%20This%20is%20to%20ensure%20consistent%20query%20optimization%20behavior%20across%20development%2C%20QA%2C%20and%20production%20versions%20of%20your%20databases.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20recommend%20that%20database%20configuration%20scripts%20explicitly%20designate%20COMPATIBILITY_LEVEL%20rather%20than%20rely%20on%20the%20defaults%2C%20in%20order%20to%20ensure%20consistent%20application%20behavior.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20new%20databases%20supporting%20new%20applications%2C%20we%20recommend%20using%20the%20latest%20compatibility%20level%2C%20150.%20For%20pre-existing%20databases%20running%20at%20lower%20compatibility%20levels%2C%20the%20recommended%20workflow%20for%20upgrading%20the%20query%20processor%20to%20a%20higher%20compatibility%20level%20is%20detailed%20in%20the%20article%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Fdatabase-engine%2Finstall-windows%2Fchange-the-database-compatibility-mode-and-use-the-query-store%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EChange%20the%20Database%20Compatibility%20Mode%20and%20Use%20the%20Query%20Store%3C%2FA%3E.%20Note%20that%20this%20article%20refers%20to%20compatibility%20level%20130%20and%20SQL%20Server%2C%20but%20the%20same%20methodology%20applies%20for%20moves%20to%20150%20for%20SQL%20Server%20and%20Azure%20SQL%20Database.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20determine%20the%20current%20compatibility%20level%20of%20your%20database%2C%20execute%20the%20following%20Transact-SQL%20statement%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3ESELECT%20compatibility_level%3CBR%20%2F%3EFROM%26nbsp%3B%26nbsp%3B%20%5Bsys%5D.%5Bdatabases%5D%3CBR%20%2F%3EWHERE%26nbsp%3B%20%5Bname%5D%20%3D%20'Your%20Database%20Name'%3B%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20newly%20created%20databases%2C%20if%20you%20wish%20to%20use%20database%20compatibility%20level%20140%20or%20lower%20instead%20of%20the%20new%20150%20default%2C%20execute%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Ft-sql%2Fstatements%2Falter-database-transact-sql-compatibility-level%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EALTER%20DATABASE%3C%2FA%3E.%20For%20example%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EALTER%20DATABASE%20database_name%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3ESET%20COMPATIBILITY_LEVEL%20%3D%26nbsp%3B%20140%3B%3C%2FPRE%3E%0A%3CP%3EDatabases%20created%20%3CEM%3Eprior%3C%2FEM%3E%20to%20the%20new%20compatibility%20level%20default%20change%20will%20not%20be%20affected%20and%20will%20maintain%20their%20current%20compatibility%20level.%20Also%20note%20that%20point%20in%20time%20backups%20will%20preserve%20the%20compatibility%20level%20that%20was%20in%20effect%20when%20the%20full%20backup%20was%20performed.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1003458%22%20slang%3D%22en-US%22%3E%3CP%3EDatabase%20compatibility%20level%20150%20is%20now%20generally%20available%20in%20Azure%20SQL%20Database%2C%20unlocking%26nbsp%3B%3CSPAN%3Eeven%20more%20new%20features%20from%20the%20%3CA%20title%3D%22IQP%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fperformance%2Fintelligent-query-processing%3Fview%3Dsql-server-2017%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EIntelligent%20Query%20Processing%20(IQP)%3C%2FA%3E%20feature%20family%2C%20including%20features%20that%20improve%20the%20performance%20of%20existing%20workloads%20with%20minimal%20implementation%20effort.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1003458%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPerformance%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

With last week’s launch of SQL Server 2019, database compatibility level 150 moves out of public preview and into general availability status. With this change in status, the default compatibility level for new databases created in Azure SQL Database is now 150.  

 

The alignment of SQL versions to default compatibility levels are as follows:

  • 100: in SQL Server 2008 and Azure SQL Database
  • 110: in SQL Server 2012 and Azure SQL Database
  • 120: in SQL Server 2014 and Azure SQL Database
  • 130: in SQL Server 2016 and Azure SQL Database
  • 140: in SQL Server 2017 and Azure SQL Database
  • 150: in SQL Server 2019 and Azure SQL Database

For details on what compatibility level 150 specifically enables, see Intelligent query processing in SQL databases. The IQP feature family includes multiple features that improve the performance of existing workloads with minimal implementation effort.  

 

Once this new database compatibility default goes into effect, if you wish to still use database compatibility level 140 or lower, please follow the instructions detailed to view or change the compatibility level of a database. For example, you may wish to ensure that new databases created in Azure SQL Database use the same compatibility level as other databases in Azure SQL Database. This is to ensure consistent query optimization behavior across development, QA, and production versions of your databases.

 

We recommend that database configuration scripts explicitly designate COMPATIBILITY_LEVEL rather than rely on the defaults, in order to ensure consistent application behavior.

 

For new databases supporting new applications, we recommend using the latest compatibility level, 150. For pre-existing databases running at lower compatibility levels, the recommended workflow for upgrading the query processor to a higher compatibility level is detailed in the article Change the Database Compatibility Mode and Use the Query Store. Note that this article refers to compatibility level 130 and SQL Server, but the same methodology applies for moves to 150 for SQL Server and Azure SQL Database.

 

To determine the current compatibility level of your database, execute the following Transact-SQL statement:

 

SELECT compatibility_level
FROM   [sys].[databases]
WHERE  [name] = 'Your Database Name';

 

For newly created databases, if you wish to use database compatibility level 140 or lower instead of the new 150 default, execute ALTER DATABASE. For example:

 

ALTER DATABASE database_name  
SET COMPATIBILITY_LEVEL =  140;

Databases created prior to the new compatibility level default change will not be affected and will maintain their current compatibility level. Also note that point in time backups will preserve the compatibility level that was in effect when the full backup was performed.