sql server版本號
In this article, I am going to show different methods to identify the SQL Server version number and its edition. Also, I have included the list of known SQL Server version numbers, Service Packs (SP), and Cumulative Updates (CU of MS SQL Server 2019, 2017). I have not included the hotfixes and CUs of SQL Server 2008 R2 and earlier versions.
在本文中,我將展示識別SQL Server版本號及其版本的不同方法。 此外,我還列出了已知SQL Server版本號,Service Pack(SP)和累積更新的列表(MS SQL Server 2019、2017的CU)。 我沒有包括SQL Server 2008 R2和更早版本的修補程序和CU。
Before going through the list, let us understand the terms RTM, Service Packs, and Cumulative Update.
在瀏覽列表之前,讓我們了解RTM , Service Pack和累積更新的術語。
RTM: RTM is the acronym of release to manufacturing. It is also known as “going gold”. This term is used when the product is ready to be delivered. This build may be digitally signed that allows users to verify the authenticity of software which they had purchased. RTM is the precedence of the General Availability (GA).
RTM: RTM是發布到制造的縮寫。 它也被稱為“走金”。 當准備好交付產品時使用此術語。 可以對該版本進行數字簽名,以允許用戶驗證他們購買的軟件的真實性。 RTM是通用(GA)的優先級。
Service Pack: A Service Pack (SP) is a collection of updates, hotfixes or it can be the enhancement to the existing software program. Prior to SQL Server 2017, Microsoft often released service packs based on the issues and feedbacks reported by the users. The service pack is considered a stable version and usually released after one or two years after the product’s release. Service packs are delivered in the single installable package.
Service Pack: Service Pack(SP)是更新,修補程序的集合,也可以是對現有軟件程序的增強。 在SQL Server 2017之前,Microsoft經常根據用戶報告的問題和反饋發布Service Pack。 該Service Pack被認為是穩定版本,通常在產品發布后一兩年后發布。 Service Pack以單個可安裝軟件包的形式提供。
Cumulative Update: Cumulative Update is a rollup of multiple hotfixes. Cumulative updates are tested as a group. When you’re building a new SQL Server from scratch, then it is advisable to apply all the recent service packs and cumulative updates.
累積更新:累積更新是多個修補程序的匯總。 累積更新將作為一個整體進行測試。 從頭開始構建新SQL Server時,建議應用所有最新的Service Pack和累積更新。
The following is the list of SQL Server version number, release type, and release date:
以下是SQL Server版本號,發行類型和發行日期的列表:
SQL Server release |
Version Number |
Type |
Release Date |
SQL Server 2019 |
15.0.2000.5 |
RTM |
2019-11-04 |
SQL Server 2017 |
14.0.1000.169 |
RTM |
2017-10-02 |
CU 17 |
Cumulative Update (Note: After SQL Server 2017, |
2019-10-08 |
|
SQL Server 2016 |
13.0.1601.5 |
RTM |
2016-06-01 |
13.0.4001.0 |
Service pack 1 |
2016-11-16 |
|
13.0.5026.0 |
Service pack 2 |
2018-04-24 |
|
SQL Server 2014 |
12.0.2000.8 |
RTM |
2014-04-01 |
12.0.4100.1 |
Service pack 1 |
2015-05-14 |
|
12.0.5000.0 |
Service pack 2 |
2016-07-11 |
|
12.0.6024.0 |
Service pack 3 |
2018-10-30 |
|
SQL Server 2012 |
11.0.2100.60 |
RTM |
2012-03-06 |
11.0.3000.0 |
Service pack 1 |
2012-11-06 |
|
11.0.5058.0 |
Service pack 2 |
2014-06-10 |
|
11.0.6020.0 |
Service pack 3 |
2015-11-23 |
|
11.0.7001.0 |
Service pack 4 |
2017-10-05 |
SQL Server版本 |
版本號 |
類型 |
發布日期 |
SQL Server 2019 |
15.0.2000.5 |
RTM |
2019-11-04 |
SQL Server 2017 |
14.0.1000.169 |
RTM |
2017-10-02 |
銅17 |
累積更新(注意:SQL Server 2017之后, |
2019-10-08 |
|
SQL Server 2016 |
13.0.1601.5 |
RTM |
2016-06-01 |
13.0.4001.0 |
服務包1 |
2016-11-16 |
|
13.0.5026.0 |
Service Pack 2 |
2018-04-24 |
|
SQL Server 2014 |
12.0.2000.8 |
RTM |
2014-04-01 |
12.0.4100.1 |
服務包1 |
2015-05-14 |
|
12.0.5000.0 |
Service Pack 2 |
2016-07-11 |
|
12.0.6024.0 |
Service Pack 3 |
2018-10-30 |
|
SQL Server 2012 |
11.0.2100.60 |
RTM |
2012-03-06 |
11.0.3000.0 |
服務包1 |
2012-11-06 |
|
11.0.5058.0 |
Service Pack 2 |
2014-06-10 |
|
11.0.6020.0 |
Service Pack 3 |
2015-11-23 |
|
11.0.7001.0 |
Service Pack 4 |
2017-10-05 |
如何識別SQL Server版本號 (How to identify the SQL Server version number)
We can identify the SQL Server version numbers using the following methods:
我們可以使用以下方法識別SQL Server版本號:
- SQL Server Management Studio SQL Server管理Studio
- SQL Server Configuration Manager SQL Server配置管理器
- Windows Registry Windows注冊表
- T-SQL query T-SQL查詢
- SQL Server error log file SQL Server錯誤日志文件
- PowerShell command PowerShell命令
方法1 –使用SSMS識別SQL Server版本號 (Method 1 – Identify SQL Server version number using SSMS)
First, open SQL Server Management Studio and connect to the Database Engine. See the following image:
首先,打開SQL Server Management Studio並連接到數據庫引擎。 見下圖:
Right-click on an instance name and select Properties. See the following image:
右鍵單擊實例名稱,然后選擇屬性 。 見下圖:
In the Server Properties dialog box, you can see in opposite to Version. Alternatively, you can see the version in Object Explorer. See the following image:
在“ 服務器屬性”對話框中,可以在“ 版本”的對面看到。 或者,您可以在對象資源管理器中查看版本。 見下圖:
方法2 – SQL Server配置管理器 (Method 2 – SQL Server Configuration Manager)
To obtain the SQL Server version numbers, open SQL Server Configuration Manager. Click on SQL Server Services. Right-click on SQL Server instance, SQLServer (SQL2017) in my case, and choose Properties. See the following screenshot:
要獲取SQL Server版本號,請打開SQL Server配置管理器。 單擊“ SQL Server服務” 。 右鍵單擊我的實例中SQL Server實例SQLServer(SQL2017) ,然后選擇屬性 。 請參見以下屏幕截圖:
In Properties dialog box, click on the Advanced tab. You can see the SQL Server edition in Stock Keeping Unit Name text box and its version number in the Version text box. See the following image:
在“ 屬性”對話框中,單擊“ 高級”選項卡。 您可以在“ 庫存單位名稱”文本框中看到SQL Server版本,在“ 版本”文本框中看到其版本號。 見下圖:

方法3 –使用Windows注冊表 (Method 3 – Using Windows Registry)
To obtain the SQL Server version numbers, open Registry Editor and find the registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL14.MSSQLSERVER\Setup
若要獲取SQL Server版本號,請打開注冊表編輯器並找到注冊表項: HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Microsoft SQL Server \ MSSQL14.MSSQLSERVER \ Setup
In the key, the value of PatchLevel indicates the current version number of SQL Server. See the following image:
在鍵中, PatchLevel的值指示SQL Server的當前版本號。 見下圖:
方法4 – T-SQL查詢 (Method 4 – T-SQL query)
To obtain the SQL Server version numbers using T-SQL, execute the following query in the SQL Server Management Studio:
若要使用T-SQL獲取SQL Server版本號,請在SQL Server Management Studio中執行以下查詢:
-
SELECT @@version AS [SQL Server version number];
-
GO
Following is the output:
以下是輸出:
Microsoft SQL Server 2017 (RTM) – 14.0.1000.169 (X64)
Aug 22 2017 17:04:49
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Windows 10 Pro 10.0 (Build 17763: ) (Hypervisor)
Microsoft SQL Server 2017(RTM)– 14.0.1000.169(X64)
2017年8月22日17:04:49
版權所有(C)2017 Microsoft Corporation
Windows 10 Pro 10.0上的Developer Edition(64位) (內部版本17763:)(管理程序)
If you run the same query on Azure instance, the following should be the output:
如果在Azure實例上運行相同的查詢,則應為以下輸出:
Microsoft SQL Azure (RTM) – 12.0.2000.8
Oct 12 2019 22:46:48
Copyright (C) 2019 Microsoft Corporation
Microsoft SQL Azure(RTM)– 12.0.2000.8
2019年10月12日22:46:48
版權所有(C)2019 Microsoft Corporation
方法5 – SQL Server錯誤日志文件 (Method 5 – SQL Server error log file)
To obtain the SQL Server version numbers from the error log file, open the ERRORLOG.txt file of SQL Server. The default location of the ERRORLOG file is C:\<InstanceRootDirectory>\<MajorBuildVersion>.MSSQLSERVER\MSSQL\Log. I have installed the SQL Server using default settings; therefore, the ERRORLOG file is in C:\Program Files\Microsoft SQL Server\MSSQL14.SQL2017\MSSQL\Log directory.
要從錯誤日志文件中獲取SQL Server版本號,請打開SQL Server的ERRORLOG.txt文件。 ERRORLOG文件的默認位置是C:\ <InstanceRootDirectory> \ <MajorBuildVersion> .MSSQLSERVER \ MSSQL \ Log 。 我已經使用默認設置安裝了SQL Server。 因此,ERRORLOG文件位於C:\ Program Files \ Microsoft SQL Server \ MSSQL14.SQL2017 \ MSSQL \ Log目錄中。
Open the ERRORLOG file using Notepad or any other text editor, and you can see the SQL Server edition, its version number, and build number on the first line of the ERRORLOG. See the following image:
使用記事本或任何其他文本編輯器打開ERRORLOG文件,您可以在ERRORLOG的第一行上看到SQL Server版本,其版本號和內部版本號。 見下圖:

方法6 – PowerShell命令 (Method 6 – PowerShell Command)
To obtain the SQL Server version numbers using PowerShell, execute the following command:
要使用PowerShell獲取SQL Server版本號,請執行以下命令:
-
Invoke-Sqlcmd -ServerInstance "Nisarg-PC" -Query " Select @@version"
Following is the screenshot of the output:
以下是輸出的屏幕截圖:

結論 (Conclusion)
In this short article, I have explained what RTM, Service Packs, and Cumulative Updates are. I have also included the list of major SQL server versions and their service packs with respective build numbers. Furthermore, I have explained the different methods to identify the SQL Server build number and its edition.
在這篇簡短的文章中,我解釋了什么是RTM,Service Pack和累積更新。 我還列出了主要SQL Server版本及其包含相應內部版本號的Service Pack的列表。 此外,我已經解釋了識別SQL Server內部版本號及其版本的不同方法。