By: Edwin Sarmiento | Updated: 2020-08-03 | Comments | Related: 1 | 2 | > Clustering
Problem
In a previous tip on Step-by-step Installation of SQL Server 2017 on a Windows Server 2016 Failover Cluster - Part 1, I have seen how to install a SQL Server 2017 on a Windows Server 2016 failover cluster (WSFC). Manually installing a SQL Server 2017 failover clustered instance (FCI) can be very tedious and time consuming. I want to reduce the amount of time and effort that goes into deploying a SQL Server 2017 FCI. How do I go about performing an unattended installation of a SQL Server 2017 failover cluster on Windows Server 2016?
Solution
To continue this series on Unattended Installation of SQL Server 2017 on a Windows Server 2016 Failover Cluster via Command-Line, we will look at adding a node to an existing SQL Server 2017 failover clustered instance (FCI). Part 1 describes the different command-line parameters that you can use for installing and configuring a SQL Server 2017 FCI. It also provides a sample configuration file that you can use as an alternative to performing an unattended installation. Since a single-node SQL Server 2017 FCI is not highly available, you need to add nodes. This tip will cover performing an unattended installation of a secondary node to an existing SQL Server 2017 FCI.
SQL Server 2017 Failover Cluster Instance Installation - Install Secondary (Failover) Cluster Node using Command-Line Parameters
If you observe the process for adding a node to an existing SQL Server 2017 FCI as described the tip Step-by-step Installation of SQL Server 2017 on a Windows Server 2016 Failover Cluster Part 2, there are not a lot of parameters that you need to provide compared to installing a new instance. That’s because the process of adding a node consists of just a handful of steps: installing the SQL Server binaries on the additional node, setting the SQL Server service account passwords, specifying the instance name, and enabling instant file initialization. The minimum parameters that I use when adding node to SQL Server 2017 FCI via an unattended installation are shown below.
- /ACTION=AddNode: The AddNode is the only value supported in the /Action parameter when adding a node to an existing SQL Server 2017 FCI.
- /UpdateEnabled=True:This is to tell the setup process to discover and include product updates.
- /UpdateSource="location": This is to tell the setup process the location of the product updates.
- /SQLSVCPASSWORD="y0ur$ecUr3PAssw0rd": This is for the SQL Server service account password. You only need to specify the password since the same service account will be used when adding a node to an existing SQL Server 2017 FCI.
- /AGTSVCPASSWORD="y0ur$ecUr3PAssw0rd": This is for the SQL Server Agent service account password. You only need to specify the password since the same service account will be used when adding a node to an existing SQL Server 2017 FCI.
- /INSTANCENAME="INST98": This is for the instance name. It is a required parameter when adding a node to an existing SQL Server 2017 FCI.
- /SQLSVCINSTANTFILEINIT="True": This is for enabling the instant file initialization feature. Because this is a local permission assigned to an account, you need to explicitly do this on all the nodes in the SQL Server FCI.
- /IACCEPTSQLSERVERLICENSETERMS=1: This is to acknowledge acceptance of the end-user license agreement.
- /INDICATEPROGRESS: This is to specify that the verbose Setup log file is piped to the console.
- /Q: This is to run the setup process in quiet mode without any user interface.
The Microsoft documentation states that the /FAILOVERCLUSTERIPADDRESSES parameter is required when adding a node to an existing SQL Server 2017 FCI. This is for multi-subnet SQL Server 2017 FCI deployments that allow multiple virtual IP addresses for a single SQL Server virtual network name. For single-subnet deployments, there is no need to include this parameter since you are assigning a single virtual IP address to the SQL Server virtual network name.
The list of command-line parameters for SQL Server 2017 FCI installations can be found in this Microsoft documentation. Combining the command-line parameters, the example command below is what I use for adding a node to a SQL Server 2017 FCI.
setup.exe /ACTION=AddNode /UpdateEnabled=True /UpdateSource="\\CentralFileServer\SQLServer2017CUs\CU20" /SQLSVCPASSWORD="y0ur$ecUr3PAssw0rd" /AGTSVCPASSWORD="y0ur$ecUr3PAssw0rd" /INSTANCENAME="INST98" /SQLSVCINSTANTFILEINIT="True" /IACCEPTSQLSERVERLICENSETERMS=1 /INDICATEPROGRESS /Q
SQL Server 2017 Failover Cluster Instance Installation - Install Secondary (Failover) Cluster Node using a Configuration File
Similarly, the contents of the configuration file for adding a node to an existing SQL Server 2017 FCI does not contain as much as the one used for installing a new SQL Server 2017 FCI. The sample configuration file below was generated using the SQL Server Installation Wizard. Review the contents of the configuration file and save it for use as a parameter in your installation. Also, the UIMODE=”Normal” line has been commented so it doesn’t conflict with the use of the /Q parameter.
;SQL Server 2017 Configuration File [OPTIONS] ; By specifying this parameter and accepting Microsoft R Open and Microsoft R Server terms, you acknowledge that you have read and understood the terms of use. IACCEPTPYTHONLICENSETERMS="False" ; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter. ACTION="AddNode" ; Specifies that SQL Server Setup should not display the privacy statement when ran from the command line. SUPPRESSPRIVACYSTATEMENTNOTICE="False" ; By specifying this parameter and accepting Microsoft R Open and Microsoft R Server terms, you acknowledge that you have read and understood the terms of use. IACCEPTROPENLICENSETERMS="False" ; Use the /ENU parameter to install the English version of SQL Server on your localized Windows operating system. ENU="True" ; Setup will not display any user interface. QUIET="True" ; Setup will display progress only, without any user interaction. QUIETSIMPLE="False" ; Parameter that controls the user interface behavior. Valid values are Normal for the full UI,AutoAdvance for a simplied UI, and EnableUIOnServerCore for bypassing Server Core setup GUI block. ; UIMODE="Normal" ; Specify whether SQL Server Setup should discover and include product updates. The valid values are True and False or 1 and 0. By default SQL Server Setup will include updates that are found. UpdateEnabled="True" ; If this parameter is provided, then this computer will use Microsoft Update to check for updates. USEMICROSOFTUPDATE="False" ; Specify the location where SQL Server Setup will obtain product updates. The valid values are "MU" to search Microsoft Update, a valid folder path, a relative path such as .\MyUpdates or a UNC share. By default SQL Server Setup will search Microsoft Update or a Windows Update service through the Window Server Update Services. UpdateSource="\\CentralFileServer\SQLServer2017CUs\CU20" ; Displays the command line parameters usage HELP="False" ; Specifies that the detailed Setup log should be piped to the console. INDICATEPROGRESS="True" ; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system. X86="False" ; Specify a default or named instance. MSSQLSERVER is the default instance for non-Express editions and SQLExpress for Express editions. This parameter is required when installing the SQL Server Database Engine (SQL), or Analysis Services (AS). INSTANCENAME="INST98" ; Specifies the name of the cluster group for the SQL Server failover cluster instance. FAILOVERCLUSTERGROUP="SQL Server (TDPRDSQLCLS98\INST98)" ; Indicates that the change in IP address resource dependency type for the SQL Server multi-subnet failover cluster is accepted. CONFIRMIPDEPENDENCYCHANGE="False" ; Specifies the name of the SQL Server failover cluster instance. This name is the network name that is used to connect to SQL Server services. FAILOVERCLUSTERNETWORKNAME="TDPRDSQLCLS98" ; Agent account name AGTSVCACCOUNT="TESTDOMAIN\sqlservice" ; Account for SQL Server service: Domain\User or system account. SQLSVCACCOUNT="TESTDOMAIN\sqlservice" ; Set to "True" to enable instant file initialization for SQL Server service. If enabled, Setup will grant Perform Volume Maintenance Task privilege to the Database Engine Service SID. This may lead to information disclosure as it could allow deleted content to be accessed by an unauthorized principal. SQLSVCINSTANTFILEINIT="True" ; Add description of input argument FTSVCACCOUNT FTSVCACCOUNT="NT Service\MSSQLFDLauncher$INST98"
The example command below shows adding a node to a SQL Server 2017 FCI using the configuration file.
setup.exe /ACTION=AddNode /SQLSVCPASSWORD="y0ur$ecUr3PAssw0rd" /AGTSVCPASSWORD="y0ur$ecUr3PAssw0rd" /ConfigurationFile=C:\ConfigurationFile.ini /IACCEPTSQLSERVERLICENSETERMS=1 /INDICATEPROGRESS /Q
Re-using the Commands and Configuration File for Future Installations
You can save the commands with their corresponding parameters and values in a batch file so you can re-use them for future deployments. Same thing with the configuration file. Just remember to replace the parameters with appropriate values for every new deployment. Unlike a standalone instance where you can use the same parameter values, deploying a SQL Server 2017 FCI relies on external components such as Active Directory, DNS, WSFC, and shared disks. Proper planning and preparation of these external dependencies are essential for deploying SQL Server 2017 FCIs via unattended installation.
Next Steps
- Review the previous tips on Step-by-step Installation of SQL Server 2016 on a Windows Server 2016 Failover Cluster Part 1 and Part 2 to install and configure a WSFC in preparation for installing a SQL Server 2017 FCI
- Read more on the following topics:
- Installing, Configuring and Managing Windows Server Failover Cluster using PowerShell Part 1
- Validating a Windows Cluster Prior to Installing SQL Server 2014
- What's new in Failover Clustering in Windows Server 2016
- Standardize SQL Server Installations with Configuration Files
- Installing SQL Server 2012 on Windows Server Core Part 3
About the author
This author pledges the content of this article is based on professional experience and not AI generated.
View all my tips
Article Last Updated: 2020-08-03