SQL Server 2017 Unattended Installation on a Windows Server 2016 Failover Cluster via Command Line Part 2
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?
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.
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.
- 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
View all my tips