Get The build number of the latest Cumulative Update / Service Pack that was installed in SQL Server

In this article, I’ll show How to

Get the build number of the latest Cumulative Update / Service Pack that has been installed in SQL Server.

Scenario:

I decided to configure PowerPivot for SharePoint 2013 Enterprise Edition with Service Pack 1 that requires installing SQL Server 2012 Service Pack 1 as a prerequisite.

So that I need to check if the SQL Server Service Pack 1 has been installed on SQL Server or not!

So in this article, by getting the build number of the latest Cumulative Update / Service Pack that has been installed in SQL Server by following the mentioned below:

Steps:

Get the build number of the latest Cumulative Update / Service Pack that has been installed in SQL Server.

(1) Via SQL Server Management Studio.
  • Open SQL Managment Studio > Connect To Server.

Connect to SQL Server.png

  • Right Click on Server Name > Properties.

SQL Server Properties.png

  • In General section > Check the Version field number.

SQL Server Versions.png

SQL Server Build Number.png

In my case, it’s 11.0.2100 that refers to SQL Server 2012 RTM and lower than Service Pack 1. thence, I should install SQL Server Service Pack 1 from here (about 3.63 GB) to can configure PowerPivot.

You can also use  the ServerProperty to get ProductLevel and ProductUpdateLevel.

 For more details check, SQL Server 2016: Getting the Current Cumulative Update / Service Pack installed


Alternative Method to get the The SQL Server Verion Number

Via SQL Query.
  • Again open SQL Server Management Studio > Connect to SQL Server.
  • Click on New Query  > Type the following query.

select @@version

SQL Server Versions by query

Via SQL Server Configuration Manager.
  • Open SQL Server Configuration Manager.

Open SQL Server Configuration Manager

  • From right side > Open SQL Server Services.
  • Right click on SQL Server Instance name > Select Properties.

SQL Server Version via SQL Configuration wizard 1

  • Click on Advanced Tab > Scroll down to version field number.

SQL Server Version via SQL Configuration wizard

Via Windows Power-Shell.

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 ****

SQL Server Versions by windows PowerShell

  • Make sure that you provide the correct SQL Server Instance to avoid the following error.

SQL Server Versions by windows PowerShell error.png

  • Make sure that you have elevated permission to can access SQL Server Instance.

SQL Server Versions by windows PowerShell error1.png

See Also
Advertisements

2 thoughts on “Get The build number of the latest Cumulative Update / Service Pack that was installed in SQL Server

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s