---
title: "Methods to Know COMPATIBILITY LEVEL of a Database"  
description: "Methods to Know COMPATIBILITY LEVEL of a Database"  
author: "Sushant Mishra"  
published: 2017-09-16  
updated: 2017-09-26  
canonical: https://www.mindstick.com/forum/34343/methods-to-know-compatibility-level-of-a-database  
category: "database"  
tags: ["sql server", "sql server 2008", "sql server 2012"]  
reading_time: 1 minute  

---

# Methods to Know COMPATIBILITY LEVEL of a Database

I want to know [Compatibility](https://yourviews.mindstick.com/story/1513/7-zodiac-signs-astrology-dates-meanings-amp-compatibility) level please any one can tell what is [script](https://www.mindstick.com/interview/477/how-can-i-execute-a-php-script-using-command-line) for checking compatibility level.

## Replies

### Reply by Amanda Nunes

Post is removed by the Admin.

### Reply by Samuel Fernandes

Hi Sushant ,

There are many mehods to know compatibility level I will tell one by one

| ``` Create database School_Context ``` | \ |
| --- | --- |

Now run any of these codes to know the compatibility levels of the newly created database named School_Context

1) Use system stored procedure sp_helpdb

|  | EXEC sp_helpdb School_Context |
| --- | --- |

It shows you two results. The first result has the column named compatibility_level

that shows the value.

2) Use system stored procedure sp_dbcmptlevel

EXEC sp_dbcmptlevel School_Context

The result is

The current compatibility level is 120.

3-Use system views

| SELECT name,compatibility_level\ FROM sys.databases\ WHERE name='School_Context' \ |  |
| --- | --- |

The result is 120


---

Original Source: https://www.mindstick.com/forum/34343/methods-to-know-compatibility-level-of-a-database

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
