Methods to Know COMPATIBILITY LEVEL of a Database

Total Post:19

Points:135
 736  View(s)
Ratings:
Rate this:

I want to know Compatibility level please any one can tell what is script for checking compatibility level.

  1. Post:13

    Points:91
    Re: Methods to Know COMPATIBILITY LEVEL of a Database

    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

     

     

      Modified On Apr-11-2018 11:26:13 PM
  1. Post:1

    Points:7
    Re: Methods to Know COMPATIBILITY LEVEL of a Database

    Post is removed by the Admin.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!