Get IT Solutions

How to do IT
Menu
  • Home
  • SCCM 2012
    • Deploy Packages
    • Troubleshooting errors SCCM 2012
  • Windows
    • Applications Silent Install
    • Windows Tools
    • Windows Error
    • Script
    • Exchange Server
    • Troubleshooting Office
    • Applications Errors
  • Database
    • SQL Server
    • MySQL
    • Oracle
  • Cybersecurity
  • Other
  • Reviews

Find SQL Server Version Query – CMD – Edition and Service Pack

Sometimes we need to find sql server version number, edition or update level. People facing difficulty to determine service pack installed on they SQL Server. In this article we will explain how to query version, service pack or updates installed on SQL Server.  The article using various ways to find those information of SQL Server. Sql Server Management Studio, T-SQL command, Command prompt and using query script.

  • Using SQL Server Management Studio interface
  • Using T-SQL command
  • Check sql server version from command prompt
  • Using SQL Server file exe.
  • How to check sql server version using query

Find SQL Server version Query / TSQL / CMD

About SQL Server

Three main components of SQL Server version are Major Release, Service Pack Level and CU/Hotfix/Update Level. The number of SQL Server version look like 11.0.5058.0.

The first digits describe the version of SQL Server such as:

  • 8.0 for SQL Server 2000
  • 9.0 for SQL Server 2005
  • 10.0 for SQL Server 2008
  • 10.5 for SQL Server 2008 R2
  • 11.0 for SQL Server 2012
  • 12.0 for SQL Server 2014
  • 13.0 for SQL Server 2016

The other part explains Service Pack Level and CU/Hotfix/Update Level. Find More here

Take the look on the website and search with your version number. In my case I have Service Pack 2 level update.

Find SQL Server Version using Management Studio Interface

  1. Open SQL Server Management Studio.
  2. Right click on the instance and select properties
  3. In the general section you will find information’s such:
    • “Product” that give you edition version
    • “Version” that give you the number of the version including Service Pack
    • Other information’s like Operating system, Language, Platform etc.

 

Find sql server version

Find sql server version

Get SQL Server Version using T-SQL script

Simple T-SQL script

One of the fast way to find SQL Server version is to run T-SQL script.


SELECT @@VERSION

The script will give the following information and will be the same for all products:

READ ALSO -   The execute permission was denied on the object – SQL Server Error

Microsoft SQL Server 2012 – 11.0.5058.0 (X64)

                May 14 2014 18:34:29

                Copyright (c) Microsoft Corporation

                Standard Edition (64-bit) on Windows NT 6.3 (Build 9600: ) (Hypervisor)

One problem of this script is that you do not get the Service Pack.

Read also other SQL Server Helping Posts:

  1. How to fix SQL Server Error 18456
  2. How to find SQL Server Version
  3. Fix SQL State 42000

Other T-SQL Script

Query the SERVERPROPERTY values:


SELECT  SERVERPROPERTY('productversion')AS Product_version,

SERVERPROPERTY('productlevel')AS Product_level,

SERVERPROPERTY('edition')AS Edition

Results:  11.0.5058.0  SP2     Standard Edition (64-bit)

Find sql server version query

Find sql server version query

The query will return three columns:

  • The SQL Server version number
  • The Service Pack Level (product level)
  • Edition (enterprise, standard, web, express, etc)

To get more additional information:


select SERVERPROPERTY('MachineName')as 'Host Name',

SERVERPROPERTY('ServerName') as 'Instance Name' ,

SERVERPROPERTY('IsClustered') as 'Cluster' ,

SERVERPROPERTY('Edition') as 'Edition',

SERVERPROPERTY('ProductVersion') as 'version',

SERVERPROPERTY('Productlevel') as 'Service Pack',

SERVERPROPERTY('LicenseType') as 'LicenseType' ,

SERVERPROPERTY('NumLicenses') as 'NumLicenses'

How to check sql server version from command prompt

  1. Launch command prompt on the SQL Server ( Start> Search CMD and click Enter)
  2. Type the command SQLCMD -S servername\instancename ( Change the servername and instancname)
  3. Or just type “SQLCMD”
  4. Type select @@versionand click Enter
  5. Type go and click Enter

SQL version will be showed on the cmd screen. Repeat the process for other instance.

How to check sql server version from command promt

How to check sql server version from command promt

Using SQL Server file exe.

This method is not very simply but is functional. Before you use this method be sure that SQL Server is not running.

  1. Navigate to SQL Server installed folder. For Example “C:\Program Files\Microsoft SQL Server\MSSQL11.SGALDW\MSSQL\Binn”
  2. Right click on sqlservr.exe and select properties.
  3. Go to details tab and you will find information about SQL Server like Product name and Product Version.
get sql server version

get sql server version

How to check sql server version using query.

The following script will return version, edition and other information’s:


SELECT
  CASE 
     WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '8%' THEN 'SQL2000'
     WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '9%' THEN 'SQL2005'
     WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '10.0%' THEN 'SQL2008'
     WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '10.5%' THEN 'SQL2008 R2'
     WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '11%' THEN 'SQL2012'
     WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '12%' THEN 'SQL2014'
     WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '13%' THEN 'SQL2016'     
     ELSE 'unknown'
  END AS MajorVersion,
  SERVERPROPERTY('ProductLevel') AS ProductLevel,
  SERVERPROPERTY('Edition') AS Edition,
  SERVERPROPERTY('ProductVersion') AS ProductVersion
how to check sql server version using query

how to check sql server version using query

Those are 5 methods to get sql server version. If you have any question feel free to ask.

Share
Tweet
Google+
Pinterest
Linkedin
Stumble
Email
Prev Article
Next Article

Related Articles

Sql Server error 262 is common issue faced by SQ …

Microsoft SQL Server Error 262 Solutions – cannot create database

Every DBA has faced Sql server error 300 on the …

Microsoft SQL server error 300 – VIEW SERVER STATE permission solutions

Best Computers & Laptops

Best Computer for Cyber Security – Laptop and Desktop
Best Computer for Cyber Security
Hey, are you seeking the best computer for cyber security? Well, we must say you have come to the right place to find your answer and guidance. There are a plethora of products out there for you to pick from ...
Read More
Best Computer for Microsoft Office & Excel – Laptop and Desktop
Best Computer for Microsoft Office & Excel
Are you finding the Best Computer for Microsoft Office and Excel? In modern days, the best laptop or desktop set is the one which is both portable, has good looks and offers the smoothest performance. Microsoft Office is a package ...
Read More
Best Computer for Hacking – Laptop and Desktop Selection
Best computer for Hacking
When it comes to hacking, either laptop or desktop, choosing the best computer for hacking would be an exhilarating job. There are many specifications to be considered for hacking ...
Read More

SQL Server Tips

FIX sqlstate 42000 – mysql error 1064 – you have an error in your sql syntax
Sqlstate 42000 Is a general code that come together with other number. Most often comes with the code 1064 and ...
Read More
The execute permission was denied on the object – SQL Server Error
The execute permission was denied on the object
The following article will handle “the execute permission was denied on the object” error appears on SQL Server. This error ...
Read More
How to Read Data from LDF file in SQL Server – A Complete Guide
Read LDF File
Hello Everyone, Today we are going to address the most popular query of SQL users, how to read data from ...
Read More

Search

We are on:

Get FREE SPACE for your PC

3 Method to Delete Temp Files in Windows 7/10 including vbs script

In this post we will explain how to delete temp files windows 7 using three different methods including vbs script ...
Read More

Fastest way to delete hiberfil sys from windows 10/8/7 and XP – CMD

In this article we will explain how to remove or delete hiberfil sys from Windows 10/8/7 and XP . If you does ...
Read More

Learn How to Silent Install Applications

Silent Install Adobe Flash Player
In this tutorial will explain how to silent install adobe flash player 25, Msi and Exe version. How to disable auto update and uninstall older ...
Read More
Java Silent Install and Uninstall Older Version – Deploy Package MSI
This tutorial will explain how to silent install Java MSI/EXE version and disable auto-update. The command line will also uninstall the ...
Read More
Silent Install Adobe Shockwave Player 12 and disable update
In this tutorial will explain how to silent install Adobe Shockwave Player 12 msi and disable auto update. The command will uninstall older ...
Read More
Silent Install Google Chrome MSI, Silent Uninstall and Disable Auto Update
This tutorial will explain how to silent install Google Chrome MSI and disable auto update. The command will uninstall older version of ...
Read More
Silent Install Adobe Reader 11 and DC – msi and exe – disable update
In this tutorial will explain how to silent install Adobe Reader version 11 and DC. We will user both version "msi" ...
Read More
Silent Install Mozilla Firefox msi and exe file – Including Silent Uninstallation
This tutorial will explain how to silent install Mozilla Firefox. We will use MSI and EXE files to perform a silent ...
Read More
Skype Silent Install Msi and disable updates
In this tutorial will explain how to silent install skype  and disable auto update. The command will uninstall older version of Skype and ...
Read More
Filezilla Silent Install msi and exe version
Filezilla silent install tutorial will explain how to perform a silent installation of application. We will explain methods, silent install ...
Read More
Silent install VLC Media Player
In this tutorial will explain how to silent install VLC Media Player. We will explain both methods for exe and ...
Read More
Notepad++ silent install exe and msi version – Command Line
Notepad++ silent install is the new article from a series of silent installations. Notepad++ as free software has two main ...
Read More

Batch File Solutions

How to list files in cmd – Command Prompt – Windows 10
Whenever you want to search and make a list of all files on a specific folder, you used the windows ...
Read More
Batch rename multiple files in folder – CMD script – Bulk Method – Win 10
The following article will teach how to rename multiple files in a folder with the bulk method using Command Line ...
Read More
Batch script rename file using Command Line (CMD) & PowerShell – Windows 10
The following article will use the “rename” or “ren” command to rename the file using a command prompt. Also, we ...
Read More
Change extension of multiple files at once – CMD batch file
The following article will teach the methods to change the extension of multiple files at once using command prompt and ...
Read More
How to delete registry key with command line | PowerShell | Batch
The following article is the third of series about registry and working on it through command line (CMD) and PowerShell ...
Read More
How to add registry key & values with CMD | PowerShell | Batch
The registry is the place where most of the applications store the settings but not only. Used also from the ...
Read More
Unmap Network Drive CMD – (Batch file) – net use delete command
After we posted the methods to map network drive using cmd commands we come this time with the method to ...
Read More
Map Network Drive cmd (batch file) – net use user password
This article will focus on another way to map a network drive on your computer instead of from the explorer ...
Read More
How to Find Large Files on Windows 7 & 10 – CMD Forfiles Command
If the capacity of your hard drive is running low, it is time to clean off some files and to ...
Read More
CMD Script to check disk space on windows and multiple remote servers
The following article will provide you script to check disk space. The Script monitor space on windows and multiple remote ...
Read More

Get IT Solutions

How to do IT

About Us

Get IT Solutions is a personal blog, which is managed to guide people for various topic.

Second Menu

  • Donate
  • About Us
  • Contact Us
  • Privacy Policy

What Will You Find

Automation is our area of writing where are included scripts, batch and various tips to automate your daily job.
Copyright © 2025 Get IT Solutions