2013年4月19日 星期五

Install SQL Server 2012 Failover Cluster with Command Line and Configuration File 使用命令列與組態檔安裝 SQL Server Failover Cluster

Install SQL Server 2012 Failover Cluster with Command Line and Configuration File

使用命令列與組態檔安裝 SQL Server Failover Cluster

from my MSDN blog April 19, 2013

1.安裝設定好Windows 2008 R2 Failover Cluster。

可參考這一篇的前半部

Build a two-node SQL Server 2008 R2 Cluster with iSCSI

2.安裝SQL Server Failover Cluster之前,必須在兩個節點先安裝.Net Framework 3.5.1。

可以透過Server Manager或PowerShell的方式來安裝。

(1)使用Server Manager安裝。



(2)使用PowerShell安裝。

A.以系統管理員身分啟動PowerShell命令提示字元。

B.輸入以下命令。

    Import-Module ServerManager

    Add-WindowsFeature NET-Framework-Core 


How to install/enable .Net 3.5 SP1 on Windows Server 2008 R2 for SQL Server 2008 and SQL Server 2008 R2

https://blogs.msdn.com/b/sqlblog/archive/2010/01/08/how-to-install-net-framework-3-5-sp1-on-windows-server-2008-r2-environments.aspx

Overview of Server Manager Commands

https://technet.microsoft.com/en-us/library/cc732757.aspx

 

3.安裝SQL Server 2012 Failover Cluster步驟如下:

Integrated Install option (create a single node failover cluster on a node and for additional nodes, run AddNode on them):

  • Run the "Install a Failover Cluster" option and capture the configuration file that lists all the installation settings.

在第1個節點(First Node),放入SQL Server 2012安裝光碟,開始一般SQL Server failover Cluster Instalce的安裝程序,在最後面的[準備安裝(Ready to Install)]步驟會顯示Configuration File檔案位置,將Configuration File複製出來,在此步驟按下[取消]按鈕,放棄安裝。

修改ConfigurationFile.ini

(1)將UIMODE="Normal"前面加上;符號,remark這個參數。

(2)將QUIET="FALSE"改成將QUIET="TRUE"或是將QUIETSIMPLE="TRUE",只能選其中一個為TRUE。

檢查ConfigurationFile.ini

(1)檢查share disk代號與安裝目錄路徑是否需要修改。

(2)檢查服務啟動帳戶是否需要在命令列加上服務密碼參數。

(3)檢查是否啟用SQL驗證,則需要在命令列加上密碼參數。

 

  • Run the command-line failover cluster install by supplying the ConfigurationFile parameter.

在第1個節點(First Node)執行以下命令來安裝第1個節點的SQL Server Failover Cluster Instalce

Setup.exe /SQLSVCPASSWORD="************" /AGTSVCPASSWORD="************" /ASSVCPASSWORD="************" /SAPWD "******" /ConfigurationFile=MyConfigurationFile.INI /IAcceptSQLServerLicenseTerms /PID "ABCDE-FGHIJ-KLMNO-PQRST-UVWXY"

例如

setup.exe /SQLSVCPASSWORD="P@ssw0rd" /AGTSVCPASSWORD="P@ssw0rd" /ASSVCPASSWORD="P@ssw0rd" /SAPWD "P@ssw0rd" /ConfigurationFile=C:\Temp\ConfigurationFile.ini /IAcceptSQLServerLicenseTerms /PID "ABCDE-FGHIJ-KLMNO-PQRST-UVWXY"

一般SQL Cluster安裝,預設值只有SQL Server, SQL Agent, Analysis service需要指定一個網域帳戶,所以命令列只需要提供這三個服務的啟動帳戶的密碼。

SSIS與SSRS預設使用系統帳戶則不需要加 /ISSVCPASSWORD="************" /RSSVCPASSWORD="************"

  • On an additional node to be added, run AddNode to capture the ConfigurationFile.ini file applicable to the existing failover cluster.

在第2個節點(second node),放入SQL Server 2012安裝光碟,開始一般SQL Server failover Cluster Instalce的安裝程序,在最後面的[準備安裝(Ready to Install)]步驟會顯示Configuration File檔案位置,將Configuration File複製出來,在此步驟按下[取消]按鈕,放棄安裝。

修改ConfigurationFile.ini

(1)將UIMODE="Normal"前面加上;符號,remark這個參數。

(2)將QUIET="FALSE"改成將QUIET="TRUE"或是將QUIETSIMPLE="TRUE",只能選其中一個為TRUE。

檢查ConfigurationFile.ini

(1)檢查share disk代號與安裝目錄路徑是否需要修改。

(2)檢查服務啟動帳戶是否需要在命令列加上服務密碼參數。

(3)檢查是否啟用SQL驗證,則需要在命令列加上密碼參數。

  • Run the command-line AddNode on all the additional nodes that will join the failover cluster, by supplying the same configuration file using the ConfigurationFile parameter.

在第2個節點(second Node)執行以下命令來安裝第2個節點的SQL Server Failover Cluster Instalce

Setup.exe /SQLSVCPASSWORD="************" /AGTSVCPASSWORD="************" /ASSVCPASSWORD="************" /ISSVCPASSWORD="************" /RSSVCPASSWORD="************" /ConfigurationFile=MyConfigurationFile.INI /IAcceptSQLServerLicenseTerms

例如

setup.exe /SQLSVCPASSWORD="P@ssw0rd" /AGTSVCPASSWORD="P@ssw0rd" /ASSVCPASSWORD="P@ssw0rd" /ConfigurationFile=C:\Temp\ConfigurationFile.ini /IAcceptSQLServerLicenseTerms

第2個以後的節點,只需要指定服務帳戶的密碼,不需要再指定sa的密碼與Product Key。

[Reference]

Install SQL Server 2012 Using a Configuration File

https://msdn.microsoft.com/en-us/library/dd239405.aspx

沒有留言:

SQL Server Database Mirroring 資料庫鏡像

SQL Server Database Mirroring 資料庫鏡像