In this post, we will provide different ways to get SQL Server build numbers and its corresponding SQL Server update name to can determine what’s the latest cumulative update or service pack that has been installed on our SQL Server.
You might also like to read SQL Server: Get the Detailed Information Via SERVERPROPERTY
Get SQL Server Build Numbers
Here, we will provide four ways to get SQL Server Build Numbers / Versions.
(1) Using SQL Server Management Studio
- Open SQL Management Studio > Connect To Server.
- Right Click on Server Name > Properties.
- In General section > Check the Version field number.
(2) Using SQL Query
- Again open SQL Server Management Studio > Connect to SQL Server.
- Click on New Query > Type the following query.
select @@version
(3) Using the SQL Configuration Manager
- Open SQL Server Configuration Manager.
- From right side > Open SQL Server Services.
- Right click on SQL Server Instance name > Select Properties.
- Click on Advanced Tab > Scroll down to version field number.
(4) Using PowerShell
You can use Windows PowerShell to invoke SQL command on a reachable server within the network using Invoke-Sqlcmd cmdlet as the following:
- Open Windows PowerShell as Administrator
- Type the Invoke-Sqlcmd with the below parameters.
- -query: the SQL query that you need to run on the remote server.
- -ServerInstance: the SQL server instance name.
- -Username: the username that has sufficient permission to access and execute SQL query on the remote server.
- -Password: The password of the elevated user.
- Run Windows Power-Shell as Administrator.
- Run the following command.
Invoke-Sqlcmd -query "select @@version" -ServerInstance epm\epmdb -Username sa -Password ****
- Make sure that you provide the correct SQL Server Instance to avoid the following error.
- Make sure that you have elevated permission to can access SQL Server Instance.
Get the current update installed in SQL Server
Once you got SQL Server build numbers for the current installed SQL Server, you can easily get the corresponding update name by doing the following:
- Open SQL Server Build Number Table. > Search for the copied version number as shown below.
Applies To
- SQL Server 2017.
- SQL Server 2016.
- SQL Server 2014.
- SQL Server 2012.
Pingback: Extend SQL Server Trial Period more than once | SPGeeks
Pingback: Extend SQL Server Evaluation Period | SPGeeks
Nice tips Mohamed!
Thanks Aroh.