Methods to Know COMPATIBILITY LEVEL of a Database

Total Post:19


 1101  View(s)
Rate this:

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

  1. 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


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.