MS SQL is one of the most popular SQL databases. It is created in 1988 for the OS/2. During time SQL Server has a lot of versions which has different versions. In this tutorial, we will learn how to get the MS SQL Server Database version in different ways like GUI, SQL Prompt, Error Logs, Command-Line, etc. We will also provide the MS SQL Server versions from the start.
How To Find MS SQL Server Version From GUI
MS SQL server is generally managed with the Microsoft SQL Server Management Studio
simply MSSMS tool which provides GUI features. We can use this MSSMS GUI tool in order to get the connected MS SQL Server database version. After connecting data from the Object Explorer
right-click to the Database Server which will open a menu. From this menu click to the Properties
which will open a Server Properties
window.

The server properties window will provide information like Product, Operating System, Platform, Version Language, etc like below.

We can see from the screenshot that the given MS SQL Server Database version is 15.0.1800.32
.
How To Find MS SQL Ser Version From SQL Prompt
MS SQL Server provides some special queries in order to provide metadata information about the database server. This language is called T-SQL where we can run MS SQL Database Server related special SQL queries. We can use @@VERSION
keyword with the Select
Query. As we can see @@version
, @@VERsion
are all of them are the same which means they are case insensitive.
SELECT @@VERSION SELECT @@version Select @@Version

We can see the following information is available from the query result.
- `SQL Server Version` is Microsoft SQL Server 2019(CTP3.2)-15.0.1800.32(X64).
- `Processor Architecture` is 64 bit where software is also compiled as 64 bit executable.
- SQL Server build date is `17 July 2019 21:29:33`.
- SQL Server edition is `Enterprise Evaluation Edition`.
- `Operation System Version` is Windows 10 Professional 64 bit with build number 17134.
How To Find MS SQL Ser Version From sqlservr.exe
The SQL Server Daemon executable file is named as sqlservr.exe
and stored in the C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Binn
path. This executable can also provide information about the MS SQL DAtabase Server version. This path can be different according to the operating system architecture like 32 and 64 bit.

This will open the following screen which provides information about the sqlservr.exe
executable file. We can get version information about the MS SQL Server database from the Details
tab which can be shown below. We can get information like File Version
, Product Name
, Product Version
. The product version is 15.0.1800.32
.

How To Find MS SQL Server Version From Error Logs
We can also find the MS SQL Server version from the log files. The MS SQL Server version information is logged into the ERRORLOG
file at the start of the file. First, we will list the log path for the current MS SQL Server by using the following query.
SELECT SERVERPROPERTY('ErrorLogFileName') AS 'Error log file location'

We can see from the result of the query that the ERRORLOG
file is located at the C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log
path. We will open this path with the Windows Explorer and open the log file with a text editor like Notepad++.

We can see that the MS SQL Server 2019is installed with the version number 15.0.1800.32
. Also, information like build architecture, edition, current host operating system are provided.

How To Find MS SQL Server Version From Command Line
We can also use the command line like Ms-DOS or PowerShell in order to list currently installed MS SQL Server Database version. First, we will launch the command-line interface and the SQL command line. In this example, we will use the MS-DOS but PowerShell is ok too. From the Start Menu
type cmd
and press enter. Alternatively WIN+R
and cmd
can be used too.

We will see a clean MS-DOS command prompt. We will connect to the local database server command line with the sqlcmd
command by providing the hostname or IP address of the server which is localhost
in this case. We will provide the hostname of the server with the -s
option like below. We can also type remote server hostname or IP address and specify the instance name like poftut/mydatabase
. Lastly, we will type the SQL query select @@version
and press enter. In the new line, we will type go
in order to execute given SQL query which will print the detailed MS SQL Server version information to the command-line interface.

MS SQL Server Terminology
While releasing and using the MS SQL Database Server there are some terms used to describe the release and version. Here we will list some of the most common and popular of them.
- `CTP` or Community Technology Preview simply means beta release which will be tested by the volunteers before official release for free.
- `RC` or `Release Candidate` is the last release before the official release which is though as without an error.
- `RTM` or `Released To Manufacturing` is the original version of the products that were provided as DVD or downloaded from the MSDN as ISO file.
- `CU` or `Cumulative Update` is used for the updates and bug fixes. These updates and bug fixes are provided from the latest Service Pack release.
- `SP` or `Service Pack` provides a larger collection of the hot and bug fixes in order to update into a new intermediate version.
- `GDR` or `General Distribution Release` fix bug fixes except for CU updates.
- `QFE` or `Quick Fix Engineering` updates include CU fixes.
- `CVE` or `Common Vulnerabilities and Exposures` contains updates or fixes about the CVE publishes security vulnerabilities.
- `OD` or `On-Demand` is a customer-specific bug fix that is generally related to some of the customers. OD fixes may or may not released for public usage.
- `COD` or `Critical On-Demand` is similar to the OD where the problem is a critical level which is generally security related.
MS SQL Server Editions
MS SQL Server has editions in order to provide different features for different user bases. They are generally used in every MS SQL releases and versions.
- `SQL Server Enterprise` is used for high end, large scale and mission-critical business operations and provides advanced features.
- `SQL Server Standard` is generally provided mid-level business with crippled features of the Enterprise versions.
- `SQL Server WEB` generally provides basic features about database services. It is designed for entry-level businesses.
- `SQL Server Developer` edition is similar to the Enterprise where it is designed for IT guy to test and demo real-world scenarios.
- `SQL Server Express` edition is small scale usage and provided as free without a license fee.
MS SQL Server Major Versions, Release Date, and Code Name
We have learned different ways to list MS SQL Database Server version information. Here we will provide the major SQL Server versions, release date, and code name.
- `SQL Server 1.0` is released in 1989 and codenamed as `Filipi`. It was 16-bit software
- `SQL Server 1.1` is released in 1990 and codenamed as `Pietro`. It was a 16-bit software.
- `SQL Server 4.2` is released in 1992.
- `SQL Server 6.0` is released in 1995 and codenamed as `SQL95`.
- `SQL Server 6.5` is released in 1996 and codenamed as `Hydra`.
- `SQL Server 7.0` is released in 1998 and codenamed as `Sphinx`.
- `SQL Server 2000` is released in 2000 and codenamed as `Shiloh`.
- `SQL Server 2005` is released in 2005 and codenamed as `Yukon`.
- `SQL Server 2008` is released in 2008 and codenamed as `Katmai`.
- `SQL Server 2008 R2` is released in 2010 and codenamed as `Kilimanjaro`.
- `SQL Server 2012` is released in 2012 and codenamed as `Denali`.
- `SQL Server 2014` is released in 2014 and codenamed as `SQL14`.
- `SQL Server 2016` is released in 2016 and codenamed as `SQL16`.
- `SQL Server 2017` is released in 2017 and codenamed as `Helsinki`.
- `SQL Server 2019` is released in 2019 and codenamed as `Seattle`.