搜尋本站文章

2011-04-16

認識 SQL Server 2008 R2 Best Practices Analyzer (BPA) 工具

發行日期:2010/06/18
版本編號:10.50.9810.10



BPA 是一項偵測、診斷與分析工具,以下是主要功能的簡述:
1. 可以收集 SQL Server 2008 與 2008 R2 版本的執行個體之資料。
2. 檢測目前的環境組態,是否為建議的「最佳作法(best practices)」。
3. 提供報表來檢視相關的組態設定值,以及相關的建議作法。
4. 指示 SQL Server 執行個體的潛在之可能問題。
5. 針對這些潛在問題,提供建議的解決方案。


可以安裝在以下的作業系統環境上:
Windows Server 2003
Windows Server 2008
Windows Vista
Windows Server 2008 R2
Windows 7

但你的環境上,必須要先已經有安裝了以下的軟體:
1. PowerShell V2.0
2. Microsoft Baseline Configuration Analyzer V2.0 (MBCA )

若是沒有安裝 Microsoft Baseline Configuration Analyzer V2.0,將會遇到以下的錯誤訊息:


目前已經超過 130 條的規則可供使用。
可以在 http://support.microsoft.com 上輸入 SQL Server 2008 R2 BPA 關鍵字來查詢相關的資料。
請參考下圖所示:




以下為安裝畫面:
--01

--02

--03

--04

--05



但是在非網域環境下(也就是 Workgroup (aka Non-Domain) Machine ),安裝 SQL Server 2008 R2 BPA 可能會遭遇到以下的錯誤訊息:

Product: Microsoft SQL Server 2008 R2 BPA -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.  Action EnablePSRemoting, location: powershell.exe, command: -NoLogo -NoProfile -Command Enable-PSRemoting -force 


--0501 發生錯誤


--0502 安裝失敗

--06



可能的處理方式是:

(1) 使用管理者身分執行「命令提示字元」視窗。
(2) 切換到先前下載 *.msi 檔案的資料夾路徑,例如:C:\SQL2008R2BPA_Setup64.msi。

(3) 輸入執行以下的命令:

msiexec /i  SKIPCA=1

其中, 就是指 BPA 的 *.msi 檔案。例如:
msiexec /i SQL2008R2BPA_Setup64.msi SKIPCA=1

--07

--08



(4) 一旦完成了 BPA 的安裝作業後,請使用管理者身分,開啟 PowerShell 的「命令提示字元」視窗。

--09 此為 x64 位元版本


(5) 輸入執行以下的命令:

Enable-PSRemoting
winrm set winrm/config/winrs `@`{MaxShellsPerUser=`"10`"`}

--10

--11

--12

--13 此為 x86 位元版本

--14


由上,應該就可以安裝好 SQL Server 2008 R2 Best Practices Analyzer (BPA)。


以下為執行畫面:

--00 選擇執行「Microsoft Baseline Configuration Analyzer 2.0」

--01

--02

--03

--04


--05

--06

--07

--08

--09

--10




參考資料:
下載: Microsoft® SQL Server® 2008 R2 Best Practices Analyzer
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=0fd439d7-4bff-4df7-a52f-9a1be8725591

下載: Microsoft Baseline Configuration Analyzer 2.0
http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=1b6e9026-f505-403e-84c3-a5dea704ec67

安裝 Microsoft Baseline Configuration Analyzer V2.0 (MBCA 2.0)
http://sharedderrick.blogspot.com/2011/04/microsoft-baseline-configuration.html

Windows 管理架構 (Windows PowerShell 2.0、 WinRM 2.0 和 BITS 4.0)
http://support.microsoft.com/kb/968929

Introducing the SQL Server 2008 R2 Best Practices Analyzer (BPA)…
http://blogs.msdn.com/b/psssql/archive/2010/06/20/introducing-the-sql-server-2008-r2-best-practices-analyzer-bpa.aspx

Why use SQL Server 2008 R2 BPA? Case 1: Missing Updates…..
http://blogs.msdn.com/b/psssql/archive/2010/08/24/why-use-sql-server-2008-r2-bpa-case-1-missing-updates.aspx

Known issues installing SQL 2008 R2 BPA relating to Remoting
http://blogs.msdn.com/b/psssql/archive/2010/06/21/known-issues-installing-sql-2008-r2-bpa-relating-to-remoting.aspx

Europe PASS, a volcano, Live Meeting, and SQL 2008 R2 BPA….
http://blogs.msdn.com/b/psssql/archive/2010/04/22/europe-pass-a-volcano-live-meeting-and-sql-2008-r2-bpa.aspx

Enable-PSRemoting
Enable-PSRemoting Cmdlet 會將電腦設定成接收使用 WS-Management 技術所傳送的 Windows PowerShell 遠端命令。
http://technet.microsoft.com/zh-tw/library/dd819498.aspx

沒有留言:

張貼留言