SQL Server Version

If you want to know details about which version of SQL Server is running on a machine, you can run the following query:

SELECT @@version as [Verbose Version Info]
    , SERVERPROPERTY('productversion') as 'Product Version' 
    , SERVERPROPERTY('productlevel') as 'Patch Level'  
    , SERVERPROPERTY('edition') as 'Product Edition'
    , SERVERPROPERTY('buildclrversion') as 'CLR Version'
    , SERVERPROPERTY('collation') as 'Default Collation'
    , SERVERPROPERTY('instancename') as 'Instance'
    , SERVERPROPERTY('lcid') as 'LCID'
    , SERVERPROPERTY('servername') as 'Server Name'

Also, for the specific version of the databases:

SELECT name, version 
FROM sys.sysdatabases

When would you run this? You get error messages that specify a particular version of SQL Server must be installed for a particular database to be attached/restored (as the case may be).

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>