How to Find the SQL Server Version

  • Comments posted to this topic are about the item How to Find the SQL Server Version

  • hi,

    nice post

    can you do the same for analysis server version

    thanks

    • This reply was modified 1 year ago by  mr.jim.
  • Knowing the version is not nearly as important as knowing where it is say SQL 2014, 2017, 2019 etc... and what service pack is applied.

    Knowing that it's say 15.2.3459 doesn't convey anything on its own because you then have to go look up what they version means.

  • peter.row wrote:

    Knowing the version is not nearly as important as knowing where it is say SQL 2014, 2017, 2019 etc... and what service pack is applied.

    Knowing that it's say 15.2.3459 doesn't convey anything on its own because you then have to go look up what they version means.

    Oh, so how can that be done?

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • Hello Everyone, Thanks for your valuable feedback. I will make changes in the article accordingly as soon as possible.

  • Sure. I will add that in revised version of article.

  • It was one of the way

    Michael L John wrote:

    peter.row wrote:

    Knowing the version is not nearly as important as knowing where it is say SQL 2014, 2017, 2019 etc... and what service pack is applied.

    Knowing that it's say 15.2.3459 doesn't convey anything on its own because you then have to go look up what they version means.

    Oh, so how can that be done?

    It was mentioned in the article as one of the ways, but in short simply running the following SQL query is the way I use when I want to know:

    select @@version

    For example, on my local SQL 2014 Developer edition it tells me, so it tells you which SQL Server edition, service pack, bit-ness, as well as the mostly useless version number.

    Microsoft SQL Server 2014 (SP3-GDR) (KB5021037) - 12.0.6174.8 (X64) Jan 4 2023 08:59:45 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.3 <X64> (Build 22621: ) (Hypervisor)

  • This was removed by the editor as SPAM

  • This should give you everything you would ever want. I use it to populate several columns of my instance inventory table.

    select
    right((left(@@VERSION,25)),15) as 'ProductVersionName'
    ,SERVERPROPERTY('ProductLevel') AS 'ProductSpLevel'
    ,SERVERPROPERTY('ProductUpdateLevel') AS 'CumulativeUpdateLevel'
    ,SERVERPROPERTY('ProductUpdateReference') AS 'KbArticle'
    ,SERVERPROPERTY('Edition') AS 'ProductEdition'
    ,SERVERPROPERTY('ProductVersion') AS 'ProductFullRevisionVersion'
    ,SERVERPROPERTY('ProductMajorVersion') AS 'ProductMajorVersion'
    ,SERVERPROPERTY('ProductMinorVersion') AS 'ProductMinorVersion'
    ,SERVERPROPERTY('ProductBuild') AS 'ProductBuildNum'
    ,SERVERPROPERTY('ProductBuildType') AS 'ProductBuildType'
  • Hello, this is Gulshan Negi

    Well, there are various ways to find the version of Microsoft SQL Server:

    1. Using SQL Server Management Studio (SSMS) by right-clicking on the server name in the Object Explorer and selecting Properties.

    2. Using the Windows Registry by navigating to the appropriate registry key and checking the "CurrentVersion" value.

    3. Using the command prompt by executing the command sqlservr.exe -v in the SQL Server installation directory.

    You can quickly determine which version of Microsoft SQL Server is installed on your system by using one of these methods.

    I hope it will help you.

    Thanks

     

  • Hi.

    Thanks for posting PS script for fetching SQL version.

    Invoke-Sqlcmd -ServerInstance "Servername" -Query "Select @@version as SQLVERSION"

    I want to store output in sql server table like servername, version column from multiple server names. please post the script if any.

    Thanks

     

     

     

    • This reply was modified 12 months ago by  SQL Galaxy.
  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic. Login to reply