About SQL Server Compatibility Levels

About SQL Server Compatibility Levels

About SQL Server Compatibility Levels

Each SQL Server version has a specific native compatibility level, as a way to distinguish it from other SQL Server versions. The compatibility level is used internally in SQL Server for many operations.

For example, if you try to restore a database backup taken on SQL Server 2017 with native compatibility level 140, to an older SQL Server instance, for example SQL Server 2014 with native compatibility level 120 you will get an error since you cannot do that.


Learn all about SQL Server 2019 on both Windows and Linux

Check my online course on Udemy titled “SQL Server 2019: What’s New” (discount included in link) which among other, has a section dedicated to SQL Server on Linux.

SQL Server 2019: What's New - Online Course


Backup and Restore with Different SQL Server Compatibility Levels

However, if you backup a database on a SQL Server instance (i.e. instance A) and restore it on a newer one (i.e. instance B), given the fact that the instance B is backwards compatible with instance A, you can restore the database on the new instance and either maintain its compatibility level, or upgrade it (via database options) to the native compatibility level of the new SQL Server instance.

About SQL Server Compatibility Levels - Article on SQLNetHub

 

Table with SQL Server Compatibility Levels

In the below table, you can find the currently available SQL Server versions, along with their compatibility level and backwards compatibility:

SQL Server VersionCompatibility LevelBackward compatibility
20059090, 80
2008100100, 90, 80
2008 R2100100, 90, 80
2012110110, 100, 90
2014120120, 110, 100
2016130130, 120, 110, 100
2017140140, 130, 120, 110, 100
2019150150, 140, 130, 120, 110, 100

 

A Free Online Service – SQL Server Backward Compatibility Check

Moreover, there is a free online service I have created, which you can find here, at SQLNetHub, which given a SQL Server version, it returns backwards compatibility info.

Also, you can learn more about SQL Server, by enrolling to my course “SQL Server Fundamentals (SQL Database for Beginners)“.

Last, you can learn more about SQL Server compatibility levels and the ALTER DATABASE T-SQL statement on this MS-Docs article.

 

Learn Azure SQL Database Today!

Check my online course on Udemy titled “Introduction to Azure SQL Database” (discount included in link).

Learn all about Azure SQL Database and Azure SQL Server on Virtual Machines. Get started in no time via a comprehensive set of lectures and live demos.

Learn more about the course…

Introduction to Azure SQL Database (Online Course - Lifetime Access)

Online Course: Introduction to Azure SQL Database

 

Rate this article: 1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

Loading...

Reference: SQLNetHub.com (https://www.sqlnethub.com)

© SQLNetHub

Artemakis Artemiou
Artemakis Artemiou is a Senior SQL Server Architect, Author, and a 9 Times Microsoft Data Platform MVP (2009-2018). He has over 15 years of experience in the IT industry in various roles. Artemakis is the founder of SQLNetHub and TechHowTos.com. Artemakis is the creator of the well-known software tools Snippets Generator and DBA Security Advisor. Also, he is the author of many eBooks on SQL Server. Artemakis currently serves as the President of the Cyprus .NET User Group (CDNUG) and the International .NET Association Country Leader for Cyprus (INETA). Artemakis's official website can be found at aartemiou.com.