1. 程式人生 > >SQL SERVER版本補丁體系及升級

SQL SERVER版本補丁體系及升級

doc ldr truct bsp sed 使用 receive pda guid

首先了解幾個定義:

RTM : 表示 Release to Manufacturing ,這是產品的原始發布版本,當從光盤或 MSDN 下載的默認版本。不過現在下載 SQL Server 版本時,也有集成了 SP 的版本。

Hotfix :需要修復的某個問題,每年 SQL Server 會出現許多bug或漏洞,這些問題d修復則被定義為 Hotfix。

Cumulative Update(CU):累計更新包,由 Hotfix 組成。CU 每8個星期發布一次,所以會有 CU1、CU2……等,每個最新的CU版本都包含之前的CU中的Hotfix。 CU 的安裝基於原始版本(RTM)或 SP。

Service Package (SP): SP是集成 Hotfix 最多的包,這些 Hotfix是經過官方完整測試過的。SP 是 SQL Server 產品版本最大的一次補丁文件,每12至18月發布一次。

每一個最新的 CU 都包含之前的 CU 集成的問題修復,每一個 SP 也都包含之前 SP 包含的問題修復。現在看一張圖,就知道 SQL Server 是怎麽修復補丁了!

General Distribution Release(GDR) :A GDR fix contains issues that are security-related and/or have a wide impact,and are released without any other critical updates that have been released for the specific branch.These are typically used by customers who need the fixes they contain,but don‘t have the resources to test all of the other fixes that come with Cumulative Updates.

Quick-Fix Engineering(QFE):This is a potentially less-tested fix(also sometimes called a hotfix) that gets distributed to a small number of customers for a very specific issue,through a COD or CU.(In the Windows world,this is called an LDR-Limited Distribution Release-but that nomenclature has not caught on in the SQL Server team.)

At my previous job,we received a private QFE for a SQL Server 2005 issue with temporary tables for destruction.That fix eventually made it into Service Pach(though I can‘t recall if it was an officially documented issue).

以 SQL Server 2014 為例

技術分享圖片

(為便於理解: RTM 相當於完整備份,SP 相當於差異備份,CU 相當於更小的差異備份,GDR 則相當於備份某張表)

由圖可看,如果 SQL Server 2014 剛發布就我們就很快使用,那我們就經常遇到各種可能的問題,所以最好等上一兩年再使用,當然有些問題可以忽略。但是,最好打上最新的補丁。

GDR (General Distribution Release)與 CU 不一樣,每個最新的CU都包含基於 RTM/SP 以來的累計更新, GDR 僅僅包含嚴重的更新。

過去我只是用 SP 修復這些問題,但是即使安裝最新的 SP 後,後來又確認了一些問題。如上圖 SQL Server 2014 SP2 後,也就是現在(截至 2017-04-21),又確認出了 二十多個Hotfix(Cumulative Update 5 for SQL Server 2014 SP2)。也許不久, SQL Server 2014 將會把 SP2及最新的CU 的Hotfix合並為 SP3。

現在測試:

註意,打補丁前最好備份好數據庫,包括系統數據庫!

查看當前版本,好確定需要下載哪些補丁:

技術分享圖片

主版本為 SQL Server 2014 ,按最上面的圖顯示,先下載最新的 SP2 :

SP2詳細介紹:SQL Server 2014 Service Pack 2 release information

SP2下載地址: Microsoft? SQL Server? 2014 Service Pack 2 (SP2)

下載文件為 SQLServer2014SP2-KB3171021-x64-CHS.exe ,雙機進行安裝。

技術分享圖片

安裝完成!再查看版本:

技術分享圖片

現在變成 SP2 了,已經安裝完成,生產環境最好重啟一次服務器。

接下來應該安裝 Cumulative Update 5 ,此處為了測試,現在安裝 SQL Server 2014 Service Pack 2 GDR。

GDR 詳細介紹:MS16-136: Description of the security update for SQL Server 2014 Service Pack 2 GDR: November 8, 2016

GDR下載地址:SQL Server 2014 Service Pack 2 GDR 安全性更新 (KB3194714)

GDR下載文件為:SQLServer2014-KB3194714-x64.exe,雙機進行安裝,操作與安裝 SP 一樣!

技術分享圖片

現在接著安裝 Cumulative Update 5 ,此 CU5 基於 SP2 ,因此前面先安裝 SP2 。

CU5 詳細介紹:Cumulative Update 5 for SQL Server 2014 SP2

CU5 下載地址:Microsoft? SQL Server? 2014 SP2 最新累積更新 SQL Server 2014 SP2 累積更新包 5 - KB4013098 (當時最新為 CU5)

CU5 下載文件為 SQLServer2014-KB4013098-x64.exe ,雙機進行安裝,操作與安裝 SP 一樣!

技術分享圖片

查看 windows 更新程序,可以看到 SP2、CU5、GDR 三個更新。

對於回滾,可以按反序逐個右鍵卸載!卸載後必須重啟服務器!

技術分享圖片

若在卸載 Cumulative Update 5 的時候彈出以下提示,報表sharepoint相關,根據提示在SQL Server 2014 的安裝包裏面找到對應的文件就行。

技術分享圖片

附:SQL SERVER版本及補丁

Product Version

Latest Service Pack

Latest GDR Update

Latest Cumulative Update

CU Release Date

General Guidance

SQL Server 2016

SP1 (KB 3182545)

3210089

CU 2 (KB 4013106)

3/20/2017

SQL Server 2016 Installation

SQL Server 2016

N/A

3210111

CU 5 (KB 4013105)

3/20/2017

SQL Server 2016 Installation

SQL Server 2014

SP2 (KB 3171021)

MS16-136

CU 5 (KB 4013098)

4/17/2017

SQL Server 2014 Installation

SQL Server 2014

SP1 (KB 3058865)

MS16-136

CU 12 (KB 4017793)

4/17/2017

SQL Server 2014 Installation

SQL Server 2014

N/A

MS15-058

CU 14 (KB 3158271)

6/20/2016

SQL Server 2014 Installation

SQL Server 2012

SP3 (KB 3072779)

MS16-136

CU 8 (KB 4013104)

3/21/2017

SQL Server 2012 Installation

SQL Server 2012

SP2 (KB 2958429)

MS16-136

CU 16 (KB 3205054)

1/18/2017

SQL Server 2012 Installation

SQL Server 2012

SP1 (KB 2674319)

MS15-058

CU 16 (KB 3052476)

5/18/2015

SQL Server 2012 Installation

SQL Server 2008 R2

SP3 (KB 2979597)

MS15-058

N/A

N/A

SQL Server 2008 R2 SP3 Installation

SQL Server 2008 R2

SP2 (KB 2630458)

MS15-058

CU 13 (KB 2967540)

6/30/2014

SQL Server 2008 R2 SP2 Installation

SQL Server 2008

SP4 (KB 2979596)

MS15-058

N/A

N/A

SQL Server 2008 Servicing

SQL Server 2008

SP3 (KB 2546951)

MS15-058

CU 17 (KB 2958696)

5/19/2014

SQL Server 2008 Servicing

SQL Server 2005

SP4 (KB 2463332)

N/A

N/A

N/A

SQL Server 2005 Installation

SQL Server 2000

SP4 (KB 290211)

N/A

N/A

N/A

SQL Server 2000 Installation

SQL SERVER版本補丁體系及升級