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 more tips like this! Enroll to the Online Course!
Check our 6-hour online course on Udemy titled “Essential SQL Server Administration Tips” (special limited-time discount included in link).
Learn essential hands-on SQL Server Administration tips on SQL Server maintenance, security, performance, integration, error handling and more. Many live demonstrations and downloadable resources included!
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.
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 Version | Compatibility Level | Backward Compatibility |
---|---|---|
2005 | 90 | 90, 80 |
2008 | 100 | 100, 90, 80 |
2008 R2 | 100 | 100, 90, 80 |
2012 | 110 | 120, 110, 100 |
2014 | 120 | 120, 110, 100 |
2016 | 130 | 130, 120, 110, 100 |
2017 | 140 | 140, 130, 120, 110, 100 |
2019 | 150 | 150, 140, 130, 120, 110, 100 |
2022 | 160 | 160, 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.
Featured Online Courses:
- SQL Server 2022: What’s New – New and Enhanced Features
- Working with Python on Windows and SQL Server Databases
- Introduction to Azure Database for MySQL
- Boost SQL Server Database Performance with In-Memory OLTP
- Introduction to Azure SQL Database for Beginners
- Essential SQL Server Administration Tips
- SQL Server Fundamentals – SQL Database for Beginners
- Essential SQL Server Development Tips for SQL Developers
- Introduction to Computer Programming for Beginners
- .NET Programming for Beginners – Windows Forms with C#
- SQL Server 2019: What’s New – New and Enhanced Features
- Entity Framework: Getting Started – Complete Beginners Guide
- Data Management for Beginners – Main Principles
- A Guide on How to Start and Monetize a Successful Blog
Related SQL Server Administration Articles:
- Essential SQL Sever Administration Tips
- How to Patch a Standalone SQL Server Instance
- The SQL Server Browser Service and UDP Port 1434
- The Maximum Number of Concurrent Connections Setting in SQL Server
- Top 10 SQL Server DBA Daily Tasks List
- There is no SQL Server Failover Cluster Available to Join
- Encrypting a SQL Server Database Backup
- …more
Rate this article:
Reference: SQLNetHub.com (https://www.sqlnethub.com)
© SQLNetHub
Artemakis Artemiou is a seasoned Senior Database and AI/Automation Architect with over 20 years of expertise in the IT industry. As a Certified Database, Cloud, and AI professional, he has been recognized as a thought leader, earning the prestigious Microsoft Data Platform MVP title for nine consecutive years (2009-2018). Driven by a passion for simplifying complex topics, Artemakis shares his expertise through articles, online courses, and speaking engagements. He empowers professionals around the globe to excel in Databases, Cloud, AI, Automation, and Software Development. Committed to innovation and education, Artemakis strives to make technology accessible and impactful for everyone.