title: How to check SQL Server Database compatibility after sp_dbcmptlevel is deprecated?
body: <p>According to BOL (SQL Server Books Online) on <a href="http://technet.microsoft.com/en-us/library/ms178653.aspx" rel="noreferrer"><code>sp_dbcmptlevel</code></a>, <br /></p>
  
  <blockquote>
    <p>This feature will be removed in a future version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible. Use ALTER DATABASE Compatibility Level instead.</p>
  </blockquote>
  
  <p>Now, the only TSQL way I know of checking database compatibility is through <code>sp_dbcmptlevel</code>.
  As far as I know, <a href="http://technet.microsoft.com/en-us/library/bb510680.aspx" rel="noreferrer"><code>ALTER DATABASE Compatibility Level</code></a> is just for <strong>setting</strong> the compatibility level, not getting info.</p>
  
  <p>How should one to get compatibility level without using GUI?</p>