Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
SQL Server - Windows only
Before you run SQL Server Setup, review Plan a SQL Server installation.
Installing a new instance of SQL Server from the command prompt enables you to specify the features to install and how they should be configured. You can also specify silent, basic, or full interaction with the Setup user interface.
To install or configure your SQL Server instance from the command prompt, open an administrative command prompt and navigate to where setup.exe is located within the SQL Server Setup media. Run the setup.exe command, along with the required and optional parameters that accomplish what you're trying to do:
C:\SQLMedia\SQLServer2022> setup.exe /[Option] /[Option] = {value}
The following example installs the SQL Server Database Engine, SQL Server Analysis Services, SQL Server, and Integration Services in quiet mode:
C:\SQLMedia\SQLServer2022> setup.exe /Q /IACCEPTSQLSERVERLICENSETERMS /ACTION="install"
/PID="AAAAA-BBBBB-CCCCC-DDDDD-EEEEE" /FEATURES=SQL,AS,IS
/INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="MyDomain\MyAccount"
/SQLSVCPASSWORD="************" /SQLSYSADMINACCOUNTS="MyDomain\MyAccount "
/AGTSVCACCOUNT="MyDomain\MyAccount" /AGTSVCPASSWORD="************"
/ASSVCACCOUNT="MyDomain\MyAccount" /ASSVCPASSWORD="************"
/ISSVCACCOUNT="MyDomain\MyAccount" /ISSVCPASSWORD="************"
/ASSYSADMINACCOUNTS="MyDomain\MyAccount"
To view a list of all possible commands within the console, run the executable with the /help flag:
C:\SQLMedia\SQLServer2022> setup.exe /help
Important
A new installation parameter, /PRODUCTCOVEREDBYSA, was introduced in SQL Server 2022 (16.x). This parameter indicates whether the provided product key (/PID=) license is covered under a Software Assurance or SQL Server Subscription contract, or just a SQL Server license.
The rest of the article provides a detailed description of the available parameters.
Note
When installing through the command line, SQL Server supports full quiet mode with the /Q parameter, or quiet simple mode with the /QS parameter. The /QS switch only shows progress, doesn't accept any input, and displays no error messages if encountered. The /QS parameter is only supported when /ACTION=INSTALL is specified.
Regardless of the installation method, you're required to confirm acceptance of the software license terms as an individual or on behalf of an entity, unless your use of the software is governed by a separate agreement such as a Microsoft volume licensing agreement or a third-party agreement with an ISV or OEM.
The license terms are displayed for review and acceptance in the Setup user interface. Unattended installations (using the /Q or /QS parameters) must include the /IACCEPTSQLSERVERLICENSETERMS parameter. You can review the license terms separately at Microsoft Software License Terms.
For SQL Server 2022 (16.x) and later versions, read the Microsoft SQL Server Software License Terms at aka.ms/useterms.
Depending on how you received the software (for example, through Microsoft volume licensing), your use of the software can be subject to additional terms and conditions.
Command line installation is supported in the following scenarios:
- Installing, upgrading, or removing an instance and shared components of SQL Server on a local computer by using syntax and parameters specified at the command prompt.
- Installing, upgrading, or removing a failover cluster instance.
- Upgrading from one SQL Server edition to another edition of SQL Server.
- Installing an instance of SQL Server on a local computer by using syntax and parameters specified in a configuration file. You can use this method to copy an installation configuration to multiple computers, or to install multiple nodes of a failover cluster installation.
Note
For local installations, you must run Setup as an administrator. If you install SQL Server from a remote share, you must use a domain account that has read and execute permissions on the remote share. For failover cluster installations, you must be a local administrator with permissions to login as a service, and to act as part of the operating system on all failover cluster nodes.
Proper use of setup parameters
Use the following guidelines to develop installation commands that have correct syntax:
| Parameter | Example |
|---|---|
| /PARAMETER | /INDICATEPROGRESS |
| /PARAMETER=true/false | /SQLSVCINSTANTFILEINIT=True |
| /PARAMETER=1/0 for Boolean types | /TCPENABLED=1 |
| /PARAMETER="value" for all single-value parameters. For a parameter that requires a path: /INSTANCEDIR=C:\Path or /INSTANCEDIR="C:\Path" is supported. |
/PID="PID" /SQLSVCSTARTUPTYPE="Automatic" |
| /PARAMETER="value1" "value2" "value3" for all multiple-value parameters. Exception: /FEATURES, which is a multivalued parameter, but its format is /FEATURES=AS,RS,IS without a space, comma-delimited. |
/SQLSYSADMINACCOUNTS="Contoso\John" "Contoso\Mary" |
Important
When installing SQL Server, if you specify the same directory path for INSTANCEDIR and SQLUSERDBDIR, SQL Server Agent and Full Text Search don't start due to missing permissions.
Note
The relational server values support the additional terminating backslash formats: backslash (\) or two backslash characters (\\) for the path.
Parameter options
The following sections provide parameters to develop command-line installation scripts for install, update, and repair scenarios. Parameters can take different values depending on the chosen scenario.
Parameters that are listed for a SQL Server Database Engine component are specific to that component. SQL Server Agent and SQL Server Browser parameters are applicable when you install the SQL Server Database Engine.
- Installation parameters
- SysPrep parameters
- Upgrade parameters
- Repair parameters
- Rebuild system database parameters
- Uninstall parameters
- Failover cluster parameters
- Service account parameters
- Feature parameters
- Role parameters
- Control failover behavior using the /FAILOVERCLUSTERROLLOWNERSHIP parameter
- Instance ID or InstanceID configuration
Installation parameters
Use the parameters in the following table to develop command-line scripts for installing a new instance of SQL Server.
| SQL Server Database Engine component | Parameter | Description |
|---|---|---|
| Database Engine Setup Control | /ACTIONRequired |
Required to indicate the installation workflow. Supported values: Install. |
| Database Engine Setup Control | /SUPPRESSPRIVACYSTATEMENTNOTICERequired, when the /Q or /QS parameter is specified for unattended installations |
Suppresses the privacy notice statement. By using this flag, you're agreeing with the privacy notice. |
| Database Engine Setup Control | /IACCEPTSQLSERVERLICENSETERMSRequired, when the /Q or /QS parameter is specified for unattended installations |
Required to acknowledge acceptance of the license terms. Beginning with SQL Server 2022 (16.x), read the Microsoft SQL Server Software License Terms at aka.ms/useterms. |
| SQL Server Python Setup Control | /IACCEPTPYTHONLICENSETERMSRequired, when the /Q or /QS parameter is specified for unattended installations that include the Anaconda Python package. |
Required to acknowledge acceptance of the license terms. |
| SQL Server R Setup Control | /IACCEPTROPENLICENSETERMSRequired, when the /Q or /QS parameter is specified for unattended installations that include the Microsoft R Open package. |
Required to acknowledge acceptance of the license terms. |
| Database Engine Setup Control | /ENUOptional |
Use this parameter to install the English version of SQL Server on a localized operating system when the installation media includes language packs for both English and the language corresponding to the operating system. |
| Database Engine Setup Control | /UpdateEnabledOptional |
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 includes updates that are found. |
| Database Engine Setup Control | /UpdateSourceOptional |
Specify the location where SQL Server Setup obtains 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 searches Microsoft Update or a Windows Update Service through the Windows Server Update Services. |
| Database Engine Setup Control | /CONFIGURATIONFILEOptional |
Specifies the configuration file to use. |
| Database Engine Setup Control | /ERRORREPORTINGApplies to: SQL Server 2014 (12.x) and earlier versions Optional |
To manage how error feedback is sent to Microsoft, see Configure usage and diagnostic data collection for SQL Server (CEIP). In older versions, this value specifies the error reporting for SQL Server. For more information, see SQL Server privacy supplement. Supported values: - 1 = enabled- 0 = disabled |
| Database Engine Setup Control | /FEATURES or /ROLERequired |
Specifies the components to install. Choose /FEATURES to specify individual SQL Server components to install. For more information, see Feature Parameters later in this article.Choose /ROLE to specify a setup role. Setup roles install SQL Server in a predetermined configuration. |
| Database Engine Setup Control | /HELP or ?Optional |
Displays usage options for the parameters. |
| Database Engine Setup Control | /INDICATEPROGRESSOptional |
Specifies that the verbose Setup log file is piped to the console. |
| Database Engine Setup Control | /INSTALLSHAREDDIROptional |
Specifies a nondefault installation directory for 64-bit shared components. Default is %Program Files%\Microsoft SQL ServerCan't be set to %Program Files(x86)%\Microsoft SQL Server |
| Database Engine Setup Control | /INSTALLSHAREDWOWDIROptional |
Specifies a nondefault installation directory for 32-bit shared components. Supported only on a 64-bit system. Default is %Program Files(x86)%\Microsoft SQL ServerCan't be set to %Program Files%\Microsoft SQL Server |
| Database Engine Setup Control | /INSTANCEDIROptional |
Specifies a nondefault installation directory for instance-specific components. |
| Database Engine Setup Control | /INSTANCEIDOptional |
Specifies a nondefault value for an InstanceID. |
| Database Engine Setup Control | /INSTANCENAMERequired |
Specifies a SQL Server Database Engine instance name. For more information, see Installation Wizard help. |
| Database Engine Setup Control | /PRODUCTCOVEREDBYSAApplies to: SQL Server 2022 (16.x) and later versions Required, when installing the Azure Extension feature from the command line with AZUREEXTENSION. |
Specifies the license coverage for SQL Server./PRODUCTCOVEREDBYSA=True, or just /PRODUCTCOVEREDBYSA, indicates it's covered under Software Assurance or SQL Server subscription./PRODUCTCOVEREDBYSA=False, or omitting the parameter, indicates it's covered under a SQL Server license. |
| Database Engine Setup Control | /PIDOptional |
Specifies the product key for the edition of SQL Server. If this parameter isn't specified, Evaluation is used. Note: If you're installing SQL Server Express, SQL Server Express with Advanced Services, SQL Server Express with tools, SQL Server Developer, or SQL Server Evaluation, the PID is predefined. |
| Database Engine Setup Control | /Q or /QUIETOptional |
Specifies that Setup runs in a quiet mode without any user interface. This is used for unattended installations. The /Q parameter overrides the input of the /QS parameter. |
| Database Engine Setup Control | /QS or /QUIETSIMPLEOptional |
Specifies that Setup runs and shows progress through the UI, but doesn't accept any input or show any error messages. |
| Database Engine Setup Control | /UIMODEOptional |
Specifies whether to present only the minimum number of dialog boxes during setup./UIMODE can only be used with the /ACTION=INSTALL and UPGRADE parameters.Supported values: - /UIMODE=Normal is the default for non-Express editions and presents all setup dialog boxes for the selected features.- /UIMODE=AutoAdvance is the default for Express editions and skips nonessential dialog boxes.When combined with other parameters, UIMODE is overridden. For example, when /UIMODE=AutoAdvance and /ADDCURRENTUSERASSQLADMIN=FALSE are both provided, the provisioning dialog box isn't auto populated with the current user.The UIMODE setting can't be used with the /Q or /QS parameters. |
| Database Engine Setup Control | /SQMREPORTINGApplies to: SQL Server 2014 (12.x) and earlier versions Optional |
To manage how error feedback is sent to Microsoft, see Configure usage and diagnostic data collection for SQL Server (CEIP). In older versions this specifies feature usage reporting for SQL Server. Supported values: - 1 = enabled- 0 = disabled |
| Database Engine Setup Control | /HIDECONSOLEOptional |
Specifies that the console window is hidden or closed. |
| SQL Server Agent | /AGTSVCACCOUNTRequired |
Specifies the account for the SQL Server Agent service. |
| SQL Server Agent | /AGTSVCPASSWORDRequired |
Specifies the password for SQL Server Agent service account. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| SQL Server Agent | /AGTSVCSTARTUPTYPEOptional |
Specifies the startup mode for the SQL Server Agent service. Supported values: - Automatic- Disabled- Manual |
| PolyBase Engine | /PBENGSVCACCOUNTOptional |
Specifies the account for the engine service. Default value: NT AUTHORITY\NETWORK SERVICE. |
| PolyBase Engine | /PBENGSVCPASSWORDOptional |
Specifies the password for the engine service account. |
| PolyBase Engine | /PBENGSVCSTARTUPTYPEOptional |
Specifies the startup mode for the PolyBase Engine service. Supported values: - Automatic (default)- Disabled- Manual |
| PolyBase Data Movement | /PBDMSSVCACCOUNTOptional |
Specifies the account for the data movement service. Default value: NT AUTHORITY\NETWORK SERVICE. |
| PolyBase Data Movement | /PBDMSSVCPASSWORDOptional |
Specifies the password for the data movement account. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| PolyBase Data Movement | /PBDMSSVCSTARTUPTYPEOptional |
Specifies the startup mode for the data movement service. Supported values: - Automatic (default)- Disabled- Manual |
| PolyBase | /PBPORTRANGEOptional |
Specifies a port range with at least six ports for PolyBase services. Example:/PBPORTRANGE=16450-16460 |
| PolyBase | /PBSCALEOUTOptional |
Specifies if the SQL Server Database Engine instance is used as a part of PolyBase Scale-out computational group. Use this option if you're configuring a PolyBase Scale-out computational group including the head node. Supported values: True, False |
| Analysis Services | /ASBACKUPDIROptional |
Specifies the directory for Analysis Services backup files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\BackupFor all other installations: %Program Files%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\Backup |
| Analysis Services | /ASCOLLATIONOptional |
Specifies the collation setting for Analysis Services. Default value: Latin1_General_CI_ASNote: Only Windows collation is supported. Using SQL collation can result in unexpected behavior. |
| Analysis Services | /ASCONFIGDIROptional |
Specifies the directory for Analysis Services configuration files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\ConfigFor all other installations: %Program Files%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\Config |
| Analysis Services | /ASDATADIROptional |
Specifies the directory for Analysis Services data files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\DataFor all other installations: %Program Files%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\Data |
| Analysis Services | /ASLOGDIROptional |
Specifies the directory for Analysis Services log files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\LogFor all other installations: %Program Files%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\Log |
| Analysis Services | /ASSERVERMODEOptional |
Specifies the server mode of the Analysis Services instance. Valid values in a cluster scenario are MULTIDIMENSIONAL or TABULAR. ASSERVERMODE is case-sensitive. All values must be expressed in uppercase. For more information about valid values, see Install Analysis Services in Tabular Mode. |
| Analysis Services | /ASSVCACCOUNTRequired |
Specifies the account for the Analysis Services service. |
| Analysis Services | /ASSVCPASSWORDRequired |
Specifies the password for the Analysis Services service. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Analysis Services | /ASSVCSTARTUPTYPEOptional |
Specifies the startup mode for the Analysis Services service. Supported values: - Automatic- Disabled- Manual |
| Analysis Services | /ASSYSADMINACCOUNTSRequired |
Specifies the administrator credentials for Analysis Services. |
| Analysis Services | /ASTEMPDIROptional |
Specifies the directory for Analysis Services temporary files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\TempFor all other installations: %Program Files%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\Temp |
| Analysis Services | /ASPROVIDERMSOLAPOptional |
Specifies whether the MSOLAP provider can run in-process. Default value: - 1 = enabled |
| Analysis Services | /FARMACCOUNTRequired, for SPI_AS_NewFarm |
Specifies a domain user account for running SharePoint Central Administration services and other essential services in a farm. This parameter is used only for Analysis Services instances that are installed through /ROLE = SPI_AS_NEWFARM. |
| Analysis Services | /FARMPASSWORDRequired, for SPI_AS_NewFarm |
Specifies a password for the farm account. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Analysis Services | /PASSPHRASERequired, for SPI_AS_NewFarm |
Specifies a passphrase that is used to add additional application servers or Web front-end servers to a SharePoint farm. This parameter is used only for Analysis Services instances that are installed through /ROLE = SPI_AS_NEWFARM. |
| Analysis Services | /FARMADMINIPORTRequired, for SPI_AS_NewFarm |
Specifies a port used to connect to the SharePoint Central Administration web application. This parameter is used only for Analysis Services instances that are installed through /ROLE = SPI_AS_NEWFARM. |
| SQL Server Browser | /BROWSERSVCSTARTUPTYPEOptional |
Specifies the startup mode for SQL Server Browser service. Supported values: - Automatic- Disabled- Manual |
| SQL Server Database Engine | /ENABLERANUOptional |
Enables run-as credentials for SQL Server Express installations. |
| SQL Server Database Engine | /INSTALLSQLDATADIROptional |
Specifies the data directory for SQL Server data files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\For all other installations: %Program Files%\Microsoft SQL Server\ |
| SQL Server Database Engine | /SAPWDRequired, when /SECURITYMODE=SQL |
Specifies the password for the SQL Server SA account. |
| SQL Server Database Engine | /SECURITYMODEOptional |
Specifies the security mode for SQL Server. If this parameter isn't supplied, then Windows-only authentication mode is supported. Supported value: SQL |
| SQL Server Database Engine | /SQLBACKUPDIROptional |
Specifies the directory for backup files. Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Backup |
| SQL Server Database Engine | /SQLCOLLATIONOptional |
Specifies the collation settings for SQL Server. The default installation setting is determined by the operating system (OS) locale. The server-level collation can either be changed during setup, or by changing the OS locale before installation. The default collation is set to the oldest available version that is associated with each specific locale. This is due to backward compatibility reasons. Therefore, this isn't always the recommended collation. To take full advantage of SQL Server features, change the default installation settings to use Windows collations. For example, for the OS locale English (United States) (code page 1252), the default collation during setup is SQL_Latin1_General_CP1_CI_AS and can be changed to its closest Windows collation counterpart Latin1_General_100_CI_AS_SC.For more information, see Collation and Unicode support. |
| SQL Server Database Engine | /ADDCURRENTUSERASSQLADMINOptional |
Adds the current user to the SQL Server sysadmin fixed server role. The /ADDCURRENTUSERASSQLADMIN parameter can be used when installing Express editions or when /ROLE=AllFeatures_WithDefaults is used. For more information, see /ROLE later in this article.Use of /ADDCURRENTUSERASSQLADMIN is optional, but either /ADDCURRENTUSERASSQLADMIN or /SQLSYSADMINACCOUNTS is required.Default values: True for editions of SQL Server ExpressFalse for all other editions |
| SQL Server Database Engine | /SQLSVCACCOUNTRequired |
Specifies the startup account for the SQL Server service. |
| SQL Server Database Engine | /SQLSVCPASSWORDRequired |
Specifies the password for SQLSVCACCOUNT. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| SQL Server Database Engine | /SQLSVCSTARTUPTYPEOptional |
Specifies the startup mode for the SQL Server service. Supported values: - Automatic- Disabled- Manual |
| SQL Server Database Engine | /SQLSYSADMINACCOUNTSRequired |
Use this parameter to provision logins to be members of the sysadmin role. For SQL Server editions other than SQL Server Express, /SQLSYSADMINACCOUNTS is required. For editions of SQL Server Express, use of /SQLSYSADMINACCOUNTS is optional, but either /SQLSYSADMINACCOUNTS or /ADDCURRENTUSERASSQLADMIN is required. |
| SQL Server Database Engine | /SQLTEMPDBDIROptional |
Specifies the directories for tempdb data files. When specifying more than one directory, separate the directories with a blank space. If multiple directories are specified, the tempdb data files are spread across the directories in a round-robin fashion.Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data (System Data Directory)Note: This parameter is added to RebuildDatabase scenario as well. |
| SQL Server Database Engine | /SQLTEMPDBLOGDIROptional |
Specifies the directory for tempdb log file.Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data (System Data Directory)Note: This parameter is added to RebuildDatabase scenario as well. |
| SQL Server Database Engine | /SQLTEMPDBFILECOUNTOptional |
Specifies the number of tempdb data files to be added by setup. This value can be increased up to the number of cores.Default value: 1 for SQL Server Express 8 or the number of cores, whichever is lower for all other editions Important: The primary database file for tempdb is still tempdb.mdf. The additional tempdb files are named as tempdb_mssql_#.ndf where # represents a unique number for each additional tempdb database file created during setup. The purpose of this naming convention is to make them unique. Uninstalling an instance of SQL Server deletes the files with naming convention tempdb_mssql_#.ndf. Don't use tempdb_mssql_\*.ndf naming convention for user database files.Warning: SQL Server Express isn't supported for configuring this parameter. Setup installs only 1 tempdb data file. |
| SQL Server Database Engine | /SQLTEMPDBFILESIZEApplies to: SQL Server 2016 (13.x) and later versions Optional |
Specifies the initial size of each tempdb data file.Default = 4 MB for SQL Server Express, 8 MB for all other editions Min = 4 MB or 8 MB Max = 1024 MB |
| SQL Server Database Engine | /SQLTEMPDBFILEGROWTHOptional |
Specifies the file growth increment of each tempdb data file in MB. A value of 0 indicates that automatic growth is off and no additional space is allowed. Setup allows the size up to 1024.Default value: 64. Allowed range: Min = 0, Max = 1024 |
| SQL Server Database Engine | /SQLTEMPDBLOGFILESIZEApplies to: SQL Server 2016 (13.x) and later versions Optional |
Specifies the initial size of the tempdb log file in MB. Setup allows the size up to 1024.Default value: 4 for SQL Server Express 8 for all other editions Allowed range: Min = default value (4 or 8), Max = 1024 |
| SQL Server Database Engine | /SQLTEMPDBLOGFILEGROWTHApplies to: SQL Server 2016 (13.x) and later versions Optional |
Specifies the file growth increment of the tempdb log file in MB. A value of 0 indicates that automatic growth is off and no additional space is allowed. Setup allows the size up to 1024.Default value: 64. Allowed range: Min = 0, Max = 1024 |
| SQL Server Database Engine | /SQLUSERDBDIROptional |
Specifies the directory for the data files for user databases. Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data |
| SQL Server Database Engine | /SQLSVCINSTANTFILEINITOptional |
Enables instant file initialization for SQL Server service account. For security and performance considerations, see Database instant file initialization. Supported values: - False (default)- True |
| SQL Server Database Engine | /SQLUSERDBLOGDIROptional |
Specifies the directory for the log files for user databases. Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data |
| SQL Server Database Engine | /SQLMAXDOP=parameterApplies to: SQL Server 2019 (15.x) and later versions Optional. If omitted on unattended (silent) installs, MAXDOP aligns with the max degree of parallelism guidelines. |
Specifies the max degree of parallelism, which determines how many processors a single statement can utilize during the execution of a single statement. Default value aligns with the max degree of parallelism guidelines |
| SQL Server Database Engine | /USESQLRECOMMENDEDMEMORYLIMITSApplies to: SQL Server 2019 (15.x) and later versions Optional. If /USESQLRECOMMENDEDMEMORYLIMITS, /SQLMINMEMORY, and /SQLMAXMEMORY are omitted on unattended (silent) installs, the SQL Server Database Engine uses the default SQL Server memory configuration. |
Specifies that the SQL Server Database Engine uses calculated recommended values that align with the server memory configuration guidelines for a standalone SQL Server instance. Note: This parameter can't be used with /SQLMINMEMORY and /SQLMAXMEMORY. |
| SQL Server Database Engine | /SQLMINMEMORYApplies to: SQL Server 2019 (15.x) and later versions Optional. If /USESQLRECOMMENDEDMEMORYLIMITS, /SQLMINMEMORY, and /SQLMAXMEMORY are omitted on unattended (silent) installs, the SQL Server Database Engine uses the default SQL Server memory configuration. |
Specifies the Min Server Memory configuration in MB. Default value: 0. Note: This parameter can't be used with /USESQLRECOMMENDEDMEMORYLIMITS. |
| SQL Server Database Engine | /SQLMAXMEMORYApplies to: SQL Server 2019 (15.x) and later versions Optional. If /USESQLRECOMMENDEDMEMORYLIMITS, /SQLMINMEMORY, and /SQLMAXMEMORY are omitted on unattended (silent) installs, the SQL Server Database Engine uses the default SQL Server memory configuration. |
Specifies the Max Server Memory configuration in MB. Default value: calculated recommended value that aligns with the server memory configuration guidelines for a standalone SQL Server instance. Note: This parameter can't be used with /USESQLRECOMMENDEDMEMORYLIMITS. |
| FILESTREAM | /FILESTREAMLEVELOptional |
Specifies the access level for the FILESTREAM feature. Supported values: - 0 = disable FILESTREAM support for this instance. (Default value)- 1 = enable FILESTREAM for Transact-SQL access.- 2 = enable FILESTREAM for Transact-SQL and file I/O streaming access. (Not valid for Cluster scenarios)- 3 = allow remote clients to have streaming access to FILESTREAM data. |
| FILESTREAM | /FILESTREAMSHARENAMEOptional Required when FILESTREAMLEVEL is greater than 1. |
Specifies the name of the Windows share in which the FILESTREAM data will be stored. |
| SQL Server Full Text | /FTSVCACCOUNTOptional |
Specifies the account for Full-Text filter launcher service. This parameter is ignored in Windows Server 2008 or higher. ServiceSID is used to help secure the communication between SQL Server and Full-text Filter Daemon. If the values aren't provided, the Full-text Filter Launcher Service is disabled. You have to use SQL Server Control Manager to change the service account and enable full-text functionality. Default value: Local Service Account |
| SQL Server Full Text | /FTSVCPASSWORDOptional |
Specifies the password for the Full-Text filter launcher service. This parameter is ignored in Windows Server 2008 or higher. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Integration Services | /ISSVCACCOUNTRequired |
Specifies the account for Integration Services. Default value: NT AUTHORITY\NETWORK SERVICE |
| Integration Services | /ISSVCPASSWORDRequired |
Specifies the Integration Services password. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Integration Services | /ISSVCStartupTypeOptional |
Specifies the startup mode for the Integration Services service. |
| SQL Server Network Configuration | /NPENABLEDOptional |
Specifies the state of the Named Pipes protocol for the SQL Server service. Supported values: - 0 = disable the Named Pipes protocol- 1 = enable the Named Pipes protocol |
| SQL Server Network Configuration | /TCPENABLEDOptional |
Specifies the state of the TCP protocol for the SQL Server service. Supported values: - 0 = disable the TCP protocol- 1 = enable the TCP protocol |
| Reporting Services | /RSINSTALLMODEApplies to: SQL Server 2016 (13.x) and earlier versions Optional Available only on FilesOnlyMode |
Specifies the Install mode for Reporting Services. Supported values: - SharePointFilesOnlyMode- DefaultNativeMode- FilesOnlyModeNote: If the installation includes the SQL Server Database Engine, the default RSINSTALLMODE is DefaultNativeMode.If the installation doesn't include the SQL Server Database Engine, the default RSINSTALLMODE is FilesOnlyMode.If you choose DefaultNativeMode but the installation doesn't include the SQL Server Database Engine, the installation automatically changes the RSINSTALLMODE to FilesOnlyMode. |
| Reporting Services | /RSSVCACCOUNTApplies to: SQL Server 2016 (13.x) and earlier versions Required |
Specifies the startup account for the Reporting Services. |
| Reporting Services | /RSSVCPASSWORDApplies to: SQL Server 2016 (13.x) and earlier versions Required |
Specifies the password for the startup account for the Reporting Services service. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Reporting Services | /RSSVCStartupTypeApplies to: SQL Server 2016 (13.x) and earlier versions Optional |
Specifies the startup mode for Reporting Services. Supported values: - Automatic- Disabled- Manual |
| Python/Machine Learning Services (In-Database) | /MPYCACHEDIRECTORYOptional |
Reserved for future use. Use %TEMP% to store Python .CAB files for installation on a computer that doesn't have an internet connection. |
| R/Machine Learning Services (In-Database) | /MRCACHEDIRECTORYOptional |
Use this parameter to specify the Cache directory for Microsoft R Open, SQL Server 2016 (13.x) R Services, SQL Server 2016 (13.x) R Server (Standalone), or R feature support in SQL Server Machine Learning Services or Machine Learning Server (Standalone). This setting is typically used when installing R components from the command line on a computer without Internet access. |
| Java/Language Extensions | /SQL_INST_JAVA,/SQLJAVADIR = "path"Applies to: SQL Server 2019 (15.x) only Optional |
Specifies installing Java with Language Extensions. If /SQL_INST_JAVA is provided without the /SQLJAVADIR parameter, it's assumed you want to install the Zulu Open JRE that is provided by the installation media.Providing a path for /SQLJAVADIR indicates you would like to use an already-installed JRE or JDK. |
| Azure extension for SQL Server | /FEATURES=AZUREEXTENSIONApplies to: SQL Server 2022 (16.x) and later versions Optional |
For SQL Server 2022 (16.x), connect the instance to Azure Arc. For SQL Server 2025 (17.x) Preview, connect the instance to Azure Arc or SQL Server on Azure VM. |
| Azure extension for SQL Server | /AZURESUBSCRIPTIONIDApplies to: SQL Server 2022 (16.x) and later versions Optional |
Azure subscription where the SQL Server instance resource will be created. |
| Azure extension for SQL Server | /AZURERESOURCEGROUPApplies to: SQL Server 2022 (16.x) and later versions Optional |
Azure resource group where the SQL Server instance resource will be created. |
| Azure extension for SQL Server | /AZUREREGIONApplies to: SQL Server 2022 (16.x) and later versions Optional |
Azure region where the SQL Server instance resource will be created. |
| Azure extension for SQL Server | /AZURETENANTIDApplies to: SQL Server 2022 (16.x) and later versions Optional |
Azure tenant ID in which the service principal exists. |
| Azure extension for SQL Server | /AZURESERVICEPRINCIPALApplies to: SQL Server 2022 (16.x) and later versions Optional |
Service principal to authenticate against given tenant ID, subscription, and resource group. |
| Azure extension for SQL Server | /AZURESERVICEPRINCIPALSECRETApplies to: SQL Server 2022 (16.x) and later versions Optional |
Service principal secret. |
| Azure extension for SQL Server | /AZUREARCPROXYApplies to: SQL Server 2022 (16.x) and later versions Optional |
Name of the proxy server used to connect to Azure Arc. |
Sample syntax
To install a new, stand-alone instance with the SQL Server Database Engine, Replication, and Full-Text Search components and enable instant file initialization for SQL Server Database Engine.
setup.exe /q /ACTION=Install /FEATURES=SQL /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="<DomainName\UserName>" /SQLSVCPASSWORD="<StrongPassword>" /SQLSYSADMINACCOUNTS="<DomainName\UserName>" /AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /SQLSVCINSTANTFILEINIT="True" /IACCEPTSQLSERVERLICENSETERMS
Install and connect to Azure
Beginning with SQL Server 2022 (16.x), you can install the Azure Arc agent with the Azure extension for SQL Server using SQL Server setup. When you install the Azure Arc agent and SQL Server extension, you automatically Arc-enable all the instances on the host, which registers the SQL Server instances as resources in Azure and make them eligible to have additional Azure management services attached.
Beginning with SQL Server 2025 (17.x) Preview, you can install the Azure extension for SQL Server using SQL Server setup on Azure virtual machines. When you install the Azure SQL Server extension, you automatically register with SQL Server on Azure VM service and enable the additional management capabilities that the service provides.
The following example installs a SQL Server instance, the Azure Arc agent (if not on an Azure VM), and the Azure extension for SQL Server so that the SQL Server instance is connected to Azure after installation. Before you run the example, replace the information in angle brackets ( < ... > ) with your information.
setup.exe /qs /ACTION=Install /FEATURES=SQLEngine,AZUREEXTENSION /INSTANCENAME=<instance name> /SQLSYSADMINACCOUNTS="<sysadmin account>" /IACCEPTSQLSERVERLICENSETERMS /AZURESUBSCRIPTIONID="<Azure subscription>" /AZURETENANTID="<Azure tenant ID>" /AZURERESOURCEGROUP="<resource group name>" /AZURESERVICEPRINCIPAL="<service principal>" /AZURESERVICEPRINCIPALSECRET="<secret>" /AZUREREGION=<Azure region>
The following example installs the Azure Arc agent and Azure extension for SQL Server to manage all the existing SQL Server instances that are installed.
setup.exe /qs /ACTION=Install /FEATURES=AZUREEXTENSION /IACCEPTSQLSERVERLICENSETERMS /AZURESUBSCRIPTIONID="<Azure subscription>" /AZURETENANTID="<Azure tenant ID>" /AZURERESOURCEGROUP="<resource group name>" /AZURESERVICEPRINCIPAL="<service principal>" /AZURESERVICEPRINCIPALSECRET="<secret>" /AZUREREGION=<Azure region>
The following example shows how to remove the Azure extension for SQL Server using SQL Server setup:
Note
This command doesn't physically uninstall the Azure extension for SQL Server. Instead, the command marks this feature as not selected in the setup. To remove the Azure resource for this instance, go to Azure portal and delete.
setup.exe /qs /ACTION=Uninstall /FEATURES=AZUREEXTENSION /IACCEPTSQLSERVERLICENSETERMS
For more information about connecting to Azure Arc or SQL Server on Azure VM, see:
- SQL Server enabled by Azure Arc
- Connect your SQL Server to Azure Arc
- What is SQL Server on Azure Windows Virtual Machines?
- Register Windows SQL Server VM with SQL IaaS Agent extension
SysPrep parameters
For more information about SQL Server SysPrep, see Install SQL Server with SysPrep.
Prepare image parameters
Use the parameters in the following table to develop command-line scripts for preparing an instance of SQL Server without configuring it.
| SQL Server Database Engine component | Parameter | Description |
|---|---|---|
| Database Engine Setup Control | /ACTIONRequired |
Required to indicate the installation workflow. Supported values: PrepareImage |
| Database Engine Setup Control | /IACCEPTSQLSERVERLICENSETERMSRequired, when the /Q or /QS parameter is specified for unattended installations |
Required to acknowledge acceptance of the license terms. Beginning with SQL Server 2022 (16.x), read the Microsoft SQL Server Software License Terms at aka.ms/useterms. |
| Database Engine Setup Control | /ENUOptional |
Use this parameter to install the English version of SQL Server on a localized operating system when the installation media includes language packs for both English and the language corresponding to the operating system. |
| Database Engine Setup Control | /UpdateEnabledOptional |
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 includes updates that are found. |
| Database Engine Setup Control | /UpdateSourceOptional |
Specify the location where SQL Server Setup obtains 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 searches Microsoft Update or a Windows Update Service through the Windows Server Update Services. |
| Database Engine Setup Control | /CONFIGURATIONFILEOptional |
Specifies the configuration file to use. |
| Database Engine Setup Control | /FEATURESRequired |
Specifies components to install. Supported values are SQLEngine, Replication, FullText, DQ, AS, AS_SPI, RS, RS_SHP, RS_SHPWFE, DQC, Conn, IS, BC, SDK, DREPLAY_CTLR, DREPLAY_CLT, SNAC_SDK, SQLODBC, SQLODBC_SDK, LocalDB, MDS, POLYBASE 1 |
| Database Engine Setup Control | /HELP or ?Optional |
Displays usage options for the parameters. |
| Database Engine Setup Control | /HIDECONSOLEOptional |
Specifies that the console window is hidden or closed. |
| Database Engine Setup Control | /INDICATEPROGRESSOptional |
Specifies that the verbose Setup log file is piped to the console. |
| Database Engine Setup Control | /INSTALLSHAREDDIROptional |
Specifies a nondefault installation directory for 64-bit shared components. Default is %Program Files%\Microsoft SQL ServerCan't be set to %Program Files(x86)%\Microsoft SQL Server |
| Database Engine Setup Control | /INSTANCEDIROptional |
Specifies a nondefault installation directory for instance-specific components. |
| Database Engine Setup Control | /INSTANCEIDRequired for instance features. |
Specifies an InstanceID for the instance that's being prepared. |
| PolyBase Engine | /PBENGSVCACCOUNTOptional |
Specifies the account for the engine service. Default value: NT AUTHORITY\NETWORK SERVICE. |
| PolyBase Data Movement | /PBDMSSVCPASSWORDOptional |
Specifies the password for the data movement account. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| PolyBase Engine | /PBENGSVCSTARTUPTYPEOptional |
Specifies the startup mode for the PolyBase Engine service. Supported values: - Automatic (default)- Disabled- Manual |
| PolyBase | /PBPORTRANGEOptional |
Specifies a port range with at least six ports for PolyBase services. Example:/PBPORTRANGE=16450-16460 |
| PolyBase | /PBSCALEOUTOptional |
Specifies if the SQL Server Database Engine instance is used as a part of PolyBase Scale-out computational group. Use this option if you're configuring a PolyBase Scale-out computational group including the head node. Supported values: True, False |
| Database Engine Setup Control | /Q or /QUIETOptional |
Specifies that Setup runs in a quiet mode without any user interface. This is used for unattended installations. The /Q parameter overrides the input of the /QS parameter. |
| Database Engine Setup Control | /QS or /QUIETSIMPLEOptional |
Specifies that Setup runs and shows progress through the UI, but doesn't accept any input or show any error messages. |
1 Distributed Replay, SDK, and SNAC aren't available in SQL Server 2022 (16.x).
Sample syntax
To prepare a new, stand-alone instance with the SQL Server Database Engine, Replication, and Full-Text Search components, and Reporting Services.
setup.exe /q /ACTION=PrepareImage /FEATURES=SQL,RS /InstanceID =<MYINST> /IACCEPTSQLSERVERLICENSETERMS
Complete image parameters
Use the parameters in the following table to develop command-line scripts for completing and configuring a prepared instance of SQL Server.
| SQL Server component | Parameter | Description |
|---|---|---|
| Database Engine Setup Control | /ACTIONRequired |
Required to indicate the installation workflow. Supported values: CompleteImage |
| Database Engine Setup Control | /IACCEPTSQLSERVERLICENSETERMSRequired, when the /Q or /QS parameter is specified for unattended installations |
Required to acknowledge acceptance of the license terms. Beginning with SQL Server 2022 (16.x), read the Microsoft SQL Server Software License Terms at aka.ms/useterms. |
| Database Engine Setup Control | /ENUOptional |
Use this parameter to install the English version of SQL Server on a localized operating system when the installation media includes language packs for both English and the language corresponding to the operating system. |
| Database Engine Setup Control | /CONFIGURATIONFILEOptional |
Specifies the configuration file to use. |
| Database Engine Setup Control | /ERRORREPORTINGApplies to: SQL Server 2014 (12.x) and earlier versions Optional |
To manage how error feedback is sent to Microsoft, see Configure usage and diagnostic data collection for SQL Server (CEIP). In older versions this specifies the error reporting for SQL Server. For more information, see SQL Server privacy supplement. Supported values: - 1 = enabled- 0 = disabled |
| Database Engine Setup Control | /HELP or ?Optional |
Displays usage options for the parameters. |
| Database Engine Setup Control | /INDICATEPROGRESSOptional |
Specifies that the verbose Setup log file is piped to the console. |
| Database Engine Setup Control | /INSTANCEIDOptional |
Use the Instance ID specified during the prepare image step. Supported values: InstanceID of a prepared instance. |
| Database Engine Setup Control | /INSTANCENAMEOptional |
Specifies a SQL Server instance name for the instance that's being completed. For more information, see Installation Wizard help. |
| Database Engine Setup Control | /PRODUCTCOVEREDBYSAApplies to: SQL Server 2022 (16.x) and later versions Required, when installing the Azure Extension feature from the command line with AZUREEXTENSION. |
Specifies the license coverage for SQL Server./PRODUCTCOVEREDBYSA=True, or just /PRODUCTCOVEREDBYSA, indicates it's covered under Software Assurance or SQL Server subscription./PRODUCTCOVEREDBYSA=False, or omitting the parameter, indicates it's covered under a SQL Server license. |
| Database Engine Setup Control | /PIDOptional |
Specifies the product key for the edition of SQL Server. If this parameter isn't specified, Evaluation is used. Note: If you're installing SQL Server Express, SQL Server Express with Advanced Services, SQL Server Express with tools, SQL Server Developer, or SQL Server Evaluation, the PID is predefined. |
| Database Engine Setup Control | /Q or /QUIETOptional |
Specifies that Setup runs in a quiet mode without any user interface. This is used for unattended installations. The /Q parameter overrides the input of the /QS parameter. |
| Database Engine Setup Control | /QS or /QUIETSIMPLEOptional |
Specifies that Setup runs and shows progress through the UI, but doesn't accept any input or show any error messages. |
| Database Engine Setup Control | /SQMREPORTINGApplies to: SQL Server 2014 (12.x) and earlier versions Optional |
To manage how error feedback is sent to Microsoft, see Configure usage and diagnostic data collection for SQL Server (CEIP). In older versions this specifies feature usage reporting for SQL Server. Supported values: - 1 = enabled- 0 = disabled |
| Database Engine Setup Control | /HIDECONSOLEOptional |
Specifies that the console window is hidden or closed. |
| SQL Server Agent | /AGTSVCACCOUNTRequired |
Specifies the account for the SQL Server Agent service. |
| SQL Server Agent | /AGTSVCPASSWORDRequired |
Specifies the password for SQL Server Agent service account. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| SQL Server Agent | /AGTSVCSTARTUPTYPEOptional |
Specifies the startup mode for the SQL Server Agent service. Supported values: - Automatic- Disabled- Manual |
| PolyBase Engine | /PBENGSVCACCOUNTOptional |
Specifies the account for the engine service. Default value: NT AUTHORITY\NETWORK SERVICE. |
| PolyBase Data Movement | /PBDMSSVCPASSWORDOptional |
Specifies the password for the data movement account. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| PolyBase Engine | /PBENGSVCSTARTUPTYPEOptional |
Specifies the startup mode for the PolyBase Engine service. Supported values: - Automatic (default)- Disabled- Manual |
| PolyBase | /PBPORTRANGEOptional |
Specifies a port range with at least six ports for PolyBase services. Example:/PBPORTRANGE=16450-16460 |
| PolyBase | /PBSCALEOUTOptional |
Specifies if the SQL Server Database Engine instance is used as a part of PolyBase Scale-out computational group. Use this option if you're configuring a PolyBase Scale-out computational group including the head node. Supported values: True, False |
| SQL Server Browser | /BROWSERSVCSTARTUPTYPEOptional |
Specifies the startup mode for SQL Server Browser service. Supported values: - Automatic- Disabled- Manual |
| SQL Server Database Engine | /ENABLERANUOptional |
Enables run-as credentials for SQL Server Express installations. |
| SQL Server Database Engine | /INSTALLSQLDATADIROptional |
Specifies the data directory for SQL Server data files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\For all other installations: %Program Files%\Microsoft SQL Server\ |
| SQL Server Database Engine | /SAPWDRequired, when /SECURITYMODE=SQL |
Specifies the password for the SQL Server SA account. |
| SQL Server Database Engine | /SECURITYMODEOptional |
Specifies the security mode for SQL Server. If this parameter isn't supplied, then Windows-only authentication mode is supported. Supported value: SQL |
| SQL Server Database Engine | /SQLBACKUPDIROptional |
Specifies the directory for backup files. Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Backup |
| SQL Server Database Engine | /SQLCOLLATIONOptional |
Specifies the collation settings for SQL Server. The default value is based on the locale of your Windows operating system. For more information, see Collation and Unicode support. |
| SQL Server Database Engine | /SQLSVCACCOUNTRequired |
Specifies the startup account for the SQL Server service. |
| SQL Server Database Engine | /SQLSVCPASSWORDRequired |
Specifies the password for SQLSVCACCOUNT. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| SQL Server Database Engine | /SQLSVCSTARTUPTYPEOptional |
Specifies the startup mode for the SQL Server service. Supported values: - Automatic- Disabled- Manual |
| SQL Server Database Engine | /SQLSYSADMINACCOUNTSRequired |
Use this parameter to provision logins to be members of the sysadmin role. For SQL Server editions other than SQL Server Express, /SQLSYSADMINACCOUNTS is required. For editions of SQL Server Express, use of /SQLSYSADMINACCOUNTS is optional, but either /SQLSYSADMINACCOUNTS or /ADDCURRENTUSERASSQLADMIN is required. |
| SQL Server Database Engine | /SQLTEMPDBDIROptional |
Specifies the directories for tempdb data files. When specifying more than one directory, separate the directories with a blank space. If multiple directories are specified, the tempdb data files are spread across the directories in a round-robin fashion.Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data (System Data Directory)Note: This parameter is added to RebuildDatabase scenario as well. |
| SQL Server Database Engine | /SQLTEMPDBLOGDIROptional |
Specifies the directory for tempdb log file.Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data (System Data Directory)Note: This parameter is added to RebuildDatabase scenario as well. |
| SQL Server Database Engine | /SQLTEMPDBFILESIZEApplies to: SQL Server 2016 (13.x) and later versions Optional |
Specifies the initial size of each tempdb data file.Default = 4 MB for SQL Server Express, 8 MB for all other editions Min = 4 MB or 8 MB Max = 1024 MB |
| SQL Server Database Engine | /SQLTEMPDBFILEGROWTHOptional |
Specifies the file growth increment of each tempdb data file in MB. A value of 0 indicates that automatic growth is off and no additional space is allowed. Setup allows the size up to 1024.Default value: 64. Allowed range: Min = 0, Max = 1024 |
| SQL Server Database Engine | /SQLTEMPDBLOGFILESIZEApplies to: SQL Server 2016 (13.x) and later versions Optional |
Specifies the initial size of the tempdb log file in MB. Setup allows the size up to 1024.Default value: 4 for SQL Server Express 8 for all other editions Allowed range: Min = default value (4 or 8), Max = 1024 |
| SQL Server Database Engine | /SQLTEMPDBLOGFILEGROWTHApplies to: SQL Server 2016 (13.x) and later versions Optional |
Specifies the file growth increment of the tempdb log file in MB. A value of 0 indicates that automatic growth is off and no additional space is allowed. Setup allows the size up to 1024.Default value: 64. Allowed range: Min = 0, Max = 1024 |
| SQL Server Database Engine | /SQLTEMPDBFILECOUNTOptional |
Specifies the number of tempdb data files to be added by setup. This value can be increased up to the number of cores.Default value: 1 for SQL Server Express 8 or the number of cores, whichever is lower for all other editions Important: The primary database file for tempdb is still tempdb.mdf. The additional tempdb files are named as tempdb_mssql_#.ndf where # represents a unique number for each additional tempdb database file created during setup. The purpose of this naming convention is to make them unique. Uninstalling an instance of SQL Server deletes the files with naming convention tempdb_mssql_#.ndf. Don't use tempdb_mssql_\*.ndf naming convention for user database files.Warning: SQL Server Express isn't supported for configuring this parameter. Setup installs only 1 tempdb data file. |
| SQL Server Database Engine | /SQLUSERDBDIROptional |
Specifies the directory for the data files for user databases. Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data |
| SQL Server Database Engine | /SQLUSERDBLOGDIROptional |
Specifies the directory for the log files for user databases. Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data |
| FILESTREAM | /FILESTREAMLEVELOptional |
Specifies the access level for the FILESTREAM feature. Supported values: - 0 = disable FILESTREAM support for this instance. (Default value)- 1 = enable FILESTREAM for Transact-SQL access.- 2 = enable FILESTREAM for Transact-SQL and file I/O streaming access. (Not valid for Cluster scenarios)- 3 = allow remote clients to have streaming access to FILESTREAM data. |
| FILESTREAM | /FILESTREAMSHARENAMEOptional Required when FILESTREAMLEVEL is greater than 1. |
Specifies the name of the Windows share in which the FILESTREAM data will be stored. |
| SQL Server Full Text | /FTSVCACCOUNTOptional |
Specifies the account for Full-Text filter launcher service. This parameter is ignored in Windows Server 2008 or higher. ServiceSID is used to help secure the communication between SQL Server and Full-text Filter Daemon. If the values aren't provided, the Full-text Filter Launcher Service is disabled. You have to use SQL Server Control Manager to change the service account and enable full-text functionality. Default value: Local Service Account |
| SQL Server Full Text | /FTSVCPASSWORDOptional |
Specifies the password for the Full-Text filter launcher service. This parameter is ignored in Windows Server 2008 or higher. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| SQL Server Network Configuration | /NPENABLEDOptional |
Specifies the state of the Named Pipes protocol for the SQL Server service. Supported values: - 0 = disable the Named Pipes protocol- 1 = enable the Named Pipes protocol |
| SQL Server Network Configuration | /TCPENABLEDOptional |
Specifies the state of the TCP protocol for the SQL Server service. Supported values: - 0 = disable the TCP protocol- 1 = enable the TCP protocol |
| Reporting Services | /RSINSTALLMODEApplies to: SQL Server 2016 (13.x) and earlier versions Optional Available only on FilesOnlyMode |
Specifies the Install mode for Reporting Services. Supported values: - SharePointFilesOnlyMode- DefaultNativeMode- FilesOnlyModeNote: If the installation includes the SQL Server Database Engine, the default RSINSTALLMODE is DefaultNativeMode.If the installation doesn't include the SQL Server Database Engine, the default RSINSTALLMODE is FilesOnlyMode.If you choose DefaultNativeMode but the installation doesn't include the SQL Server Database Engine, the installation automatically changes the RSINSTALLMODE to FilesOnlyMode. |
| Reporting Services | /RSSVCACCOUNTApplies to: SQL Server 2016 (13.x) and earlier versions Required |
Specifies the startup account for the Reporting Services. |
| Reporting Services | /RSSVCPASSWORDApplies to: SQL Server 2016 (13.x) and earlier versions Required |
Specifies the password for the startup account for the Reporting Services service. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Reporting Services | /RSSVCStartupTypeApplies to: SQL Server 2016 (13.x) and earlier versions Optional |
Specifies the startup mode for Reporting Services. Supported values: - Automatic- Disabled- Manual |
Sample syntax
To complete a prepared, stand-alone instance that includes SQL Server Database Engine, Replication, and Full-Text Search components.
setup.exe /q /ACTION=CompleteImage /INSTANCENAME=MYNEWINST /INSTANCEID=<MYINST> /SQLSVCACCOUNT="<DomainName\UserName>" /SQLSVCPASSWORD="<StrongPassword>" /SQLSYSADMINACCOUNTS="<DomainName\UserName>" /AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /IACCEPTSQLSERVERLICENSETERMS
Upgrade parameters
Use the parameters in the following table to develop command-line scripts for upgrade.
| SQL Server Database Engine component | Parameter | Description |
|---|---|---|
| Database Engine Setup Control | /ACTIONRequired |
Required to indicate the installation workflow. Supported values: - Upgrade- EditionUpgradeThe value EditionUpgrade is used to upgrade an existing edition of SQL Server to a different edition. For more information about the supported version and edition upgrades, see Supported version and edition upgrades (SQL Server 2022). |
| Database Engine Setup Control | /IACCEPTSQLSERVERLICENSETERMSRequired, when the /Q or /QS parameter is specified for unattended installations |
Required to acknowledge acceptance of the license terms. Beginning with SQL Server 2022 (16.x), read the Microsoft SQL Server Software License Terms at aka.ms/useterms. |
| Database Engine Setup Control | /ENUOptional |
Use this parameter to install the English version of SQL Server on a localized operating system when the installation media includes language packs for both English and the language corresponding to the operating system. |
| Database Engine Setup Control | /UpdateEnabledOptional |
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 includes updates that are found. |
| Database Engine Setup Control | /UpdateSourceOptional |
Specify the location where SQL Server Setup obtains 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 searches Microsoft Update or a Windows Update Service through the Windows Server Update Services. |
| Database Engine Setup Control | /CONFIGURATIONFILEOptional |
Specifies the configuration file to use. |
| Database Engine Setup Control | /ERRORREPORTINGApplies to: SQL Server 2014 (12.x) and earlier versions Optional |
To manage how error feedback is sent to Microsoft, see Configure usage and diagnostic data collection for SQL Server (CEIP). In older versions this specifies the error reporting for SQL Server. For more information, see SQL Server privacy supplement. Supported values: - 1 = enabled- 0 = disabled |
| Database Engine Setup Control | /HELP or ?Optional |
Displays usage options for the parameters. |
| Database Engine Setup Control | /INDICATEPROGRESSOptional |
Specifies that the verbose Setup log file is piped to the console. |
| Database Engine Setup Control | / INSTANCEDIROptional |
Specifies a nondefault installation directory for shared components. |
| Database Engine Setup Control | /INSTANCEIDRequired, when you upgrade from SQL Server 2008 (10.0.x) or later versions. Optional, when you upgrade from SQL Server 2005 (9.x). |
Specifies a nondefault value for an InstanceID. |
| Database Engine Setup Control | /INSTANCENAMERequired |
Specifies a SQL Server Database Engine instance name. For more information, see Installation Wizard help. |
| Database Engine Setup Control | /PIDOptional |
Specifies the product key for the edition of SQL Server. If this parameter isn't specified, Evaluation is used. Note: If you're installing SQL Server Express, SQL Server Express with Advanced Services, SQL Server Express with tools, SQL Server Developer, or SQL Server Evaluation, the PID is predefined. |
| Database Engine Setup Control | /Q or /QUIETOptional |
Specifies that Setup runs in a quiet mode without any user interface. This is used for unattended installations. The /Q parameter overrides the input of the /QS parameter. |
| Database Engine Setup Control | /UIMODEOptional |
Specifies whether to present only the minimum number of dialog boxes during setup./UIMODE can only be used with the /ACTION=INSTALL and UPGRADE parameters.Supported values: - /UIMODE=Normal is the default for non-Express editions and presents all setup dialog boxes for the selected features.- /UIMODE=AutoAdvance is the default for Express editions and skips nonessential dialog boxes.When combined with other parameters, UIMODE is overridden. For example, when /UIMODE=AutoAdvance and /ADDCURRENTUSERASSQLADMIN=FALSE are both provided, the provisioning dialog box isn't auto populated with the current user.The UIMODE setting can't be used with the /Q or /QS parameters. |
| Database Engine Setup Control | /SQMREPORTINGApplies to: SQL Server 2014 (12.x) and earlier versions Optional |
To manage how error feedback is sent to Microsoft, see Configure usage and diagnostic data collection for SQL Server (CEIP). In older versions this specifies feature usage reporting for SQL Server. Supported values: - 1 = enabled- 0 = disabled |
| Database Engine Setup Control | /HIDECONSOLEOptional |
Specifies that the console window is hidden or closed. |
| SQL Server Browser | /BROWSERSVCSTARTUPTYPEOptional |
Specifies the startup mode for SQL Server Browser service. Supported values: - Automatic- Disabled- Manual |
| SQL Server Full-Text | /FTUPGRADEOPTIONOptional |
Specifies the Full-Text catalog upgrade option. Supported values: - REBUILD- RESET- IMPORT |
| Integration Services | /ISSVCACCOUNTRequired |
Specifies the account for Integration Services. Default value: NT AUTHORITY\NETWORK SERVICE |
| Integration Services | /ISSVCPASSWORDRequired |
Specifies the Integration Services password. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Integration Services | /ISSVCStartupTypeOptional |
Specifies the startup mode for the Integration Services service. |
| Reporting Services | /RSUPGRADEDATABASEACCOUNTOptional |
The property is only used when upgrading a SharePoint mode Report Server that is version 2008 R2 or earlier. Additional upgrade operations are performed for report servers that use the older SharePoint mode architecture, which was changed in SQL Server 2012 (11.x) Reporting Services. If this option isn't included with the command-line installation, the default service account for the old report server instance is used. If this property is used, supply the password for the account using the /RSUPGRADEPASSWORD property. |
| Reporting Services | /RSUPGRADEPASSWORDOptional |
Password of the existing Report Server service account. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Reporting Services | /ALLOWUPGRADEFORSSRSSHAREPOINTMODE |
The switch is required when upgrading a SharePoint Mode installation that is based on the SharePoint shared service architecture. The switch isn't needed for upgrading non-shared service versions of Reporting Services. |
Sample syntax
To upgrade an existing instance or failover cluster node from a previous SQL Server Database Engine version,
setup.exe /q /ACTION=upgrade /INSTANCEID = <INSTANCEID>/INSTANCENAME=MSSQLSERVER /RSUPGRADEDATABASEACCOUNT="<Provide a SQL Server logon account that can connect to the report server during upgrade>" /RSUPGRADEPASSWORD="<Provide a password for the report server upgrade account>" /ISSVCAccount="NT AUTHORITY\NETWORK SERVICE" /IACCEPTSQLSERVERLICENSETERMS
Repair parameters
Use the parameters in the following table to develop command-line scripts for repair.
| SQL Server Database Engine component | Parameter | Description |
|---|---|---|
| Database Engine Setup Control | /ACTIONRequired |
Required to indicate the repair workflow. Supported values: Repair |
| Database Engine Setup Control | /ENUOptional |
Use this parameter to install the English version of SQL Server on a localized operating system when the installation media includes language packs for both English and the language corresponding to the operating system. |
| Database Engine Setup Control | /FEATURESRequired |
Specifies components to repair. |
| Database Engine Setup Control | /INSTANCENAMERequired |
Specifies a SQL Server Database Engine instance name. For more information, see Installation Wizard help. |
| PolyBase Engine | /PBENGSVCACCOUNTOptional |
Specifies the account for the engine service. Default value: NT AUTHORITY\NETWORK SERVICE. |
| PolyBase Data Movement | /PBDMSSVCPASSWORDOptional |
Specifies the password for the data movement account. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| PolyBase Engine | /PBENGSVCSTARTUPTYPEOptional |
Specifies the startup mode for the PolyBase Engine service. Supported values: - Automatic (default)- Disabled- Manual |
| PolyBase | /PBPORTRANGEOptional |
Specifies a port range with at least six ports for PolyBase services. Example:/PBPORTRANGE=16450-16460 |
| PolyBase | /PBSCALEOUTOptional |
Specifies if the SQL Server Database Engine instance is used as a part of PolyBase Scale-out computational group. Use this option if you're configuring a PolyBase Scale-out computational group including the head node. Supported values: True, False |
| Database Engine Setup Control | /Q or /QUIETOptional |
Specifies that Setup runs in a quiet mode without any user interface. This is used for unattended installations. The /Q parameter overrides the input of the /QS parameter. |
| Database Engine Setup Control | /HIDECONSOLEOptional |
Specifies that the console window is hidden or closed. |
Sample syntax
Repair an instance and shared components.
setup.exe /q /ACTION=Repair /INSTANCENAME=<instancename>
Rebuild system database parameters
Use the parameters in the following table to develop command-line scripts for rebuilding the master, model, msdb, and tempdb system databases. For more information, see Rebuild system databases.
| SQL Server Database Engine component | Parameter | Description |
|---|---|---|
| Database Engine Setup Control | /ACTIONRequired |
Required to indicate the rebuild database workflow. Supported values: RebuildDatabase |
| Database Engine Setup Control | /INSTANCENAMERequired |
Specifies a SQL Server Database Engine instance name. For more information, see Installation Wizard help. |
| Database Engine Setup Control | /Q or /QUIETOptional |
Specifies that Setup runs in a quiet mode without any user interface. This is used for unattended installations. The /Q parameter overrides the input of the /QS parameter. |
| SQL Server Database Engine | /SQLCOLLATIONOptional |
Specifies a new server-level collation. The default value is based on the locale of your Windows operating system. For more information, see Collation and Unicode support. |
| SQL Server Database Engine | /SAPWDRequired, when /SECURITYMODE=SQL was specified during installation of the instance. |
Specifies the password for SQL Server SA account. |
| SQL Server Database Engine | /SQLSYSADMINACCOUNTSRequired |
Use this parameter to provision logins to be members of the sysadmin role. For SQL Server editions other than SQL Server Express, /SQLSYSADMINACCOUNTS is required. For editions of SQL Server Express, use of /SQLSYSADMINACCOUNTS is optional, but either /SQLSYSADMINACCOUNTS or /ADDCURRENTUSERASSQLADMIN is required. |
| SQL Server Database Engine | /SQLTEMPDBDIROptional |
Specifies the directories for tempdb data files. When specifying more than one directory, separate the directories with a blank space. If multiple directories are specified, the tempdb data files are spread across the directories in a round-robin fashion.Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data (System Data Directory)Note: This parameter is added to RebuildDatabase scenario as well. |
| SQL Server Database Engine | /SQLTEMPDBLOGDIROptional |
Specifies the directory for tempdb log file.Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data (System Data Directory)Note: This parameter is added to RebuildDatabase scenario as well. |
| SQL Server Database Engine | /SQLTEMPDBFILECOUNTOptional |
Specifies the number of tempdb data files to be added by setup. This value can be increased up to the number of cores.Default value: 1 for SQL Server Express 8 or the number of cores, whichever is lower for all other editions Important: The primary database file for tempdb is still tempdb.mdf. The additional tempdb files are named as tempdb_mssql_#.ndf where # represents a unique number for each additional tempdb database file created during setup. The purpose of this naming convention is to make them unique. Uninstalling an instance of SQL Server deletes the files with naming convention tempdb_mssql_#.ndf. Don't use tempdb_mssql_\*.ndf naming convention for user database files.Warning: SQL Server Express isn't supported for configuring this parameter. Setup installs only 1 tempdb data file. |
| SQL Server Database Engine | /SQLTEMPDBFILESIZEApplies to: SQL Server 2016 (13.x) and later versions Optional |
Specifies the initial size of each tempdb data file.Default = 4 MB for SQL Server Express, 8 MB for all other editions Min = 4 MB or 8 MB Max = 1024 MB |
| SQL Server Database Engine | /SQLTEMPDBFILEGROWTHOptional |
Specifies the file growth increment of each tempdb data file in MB. A value of 0 indicates that automatic growth is off and no additional space is allowed. Setup allows the size up to 1024.Default value: 64. Allowed range: Min = 0, Max = 1024 |
| SQL Server Database Engine | /SQLTEMPDBLOGFILESIZEApplies to: SQL Server 2016 (13.x) and later versions Optional |
Specifies the initial size of the tempdb log file in MB. Setup allows the size up to 1024.Default value: 4 for SQL Server Express 8 for all other editions Allowed range: Min = default value (4 or 8), Max = 1024 |
| SQL Server Database Engine | /SQLTEMPDBLOGFILEGROWTHApplies to: SQL Server 2016 (13.x) and later versions Optional |
Specifies the file growth increment of the tempdb log file in MB. A value of 0 indicates that automatic growth is off and no additional space is allowed. Setup allows the size up to 1024.Default value: 64. Allowed range: Min = 0, Max = 1024 |
Uninstall parameters
Use the parameters in the following table to develop command-line scripts for uninstallation.
| SQL Server Database Engine component | Parameter | Description |
|---|---|---|
| Database Engine Setup Control | /ACTIONRequired |
Required to indicate the uninstall work flow. Supported values: Uninstall |
| Database Engine Setup Control | /CONFIGURATIONFILEOptional |
Specifies the configuration file to use. |
| Database Engine Setup Control | /FEATURESRequired |
Specifies components to uninstall. |
| Database Engine Setup Control | /HELP or ?Optional |
Displays usage options for the parameters. |
| Database Engine Setup Control | /INDICATEPROGRESSOptional |
Specifies that the verbose Setup log file is piped to the console. |
| Database Engine Setup Control | /INSTANCENAMERequired |
Specifies a SQL Server Database Engine instance name. For more information, see Installation Wizard help. |
| Database Engine Setup Control | /Q or /QUIETOptional |
Specifies that Setup runs in a quiet mode without any user interface. This is used for unattended installations. The /Q parameter overrides the input of the /QS parameter. |
| Database Engine Setup Control | /HIDECONSOLEOptional |
Specifies that the console window is hidden or closed. |
Sample syntax
Use the following command to uninstall an existing instance of SQL Server from the command prompt.
setup.exe /Action=Uninstall /FEATURES=SQL,AS,RS,IS,Tools /INSTANCENAME=MSSQLSERVER
To remove a named instance, specify the name of the instance instead of MSSQLSERVER in the previous example.
To uninstall an existing SQL Server update from command prompt, you can find the complete uninstall command for a specific component in the Windows registry, using the following registry path. Look for the "UninstallString" key.
Warning
Incorrectly editing the registry can severely damage your system. Before making changes to the registry, we recommend that you back up any valued data on the computer.
The following example shows the path for a specific KB update.
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\KB5014356
You can get the uninstall command from "UninstallString" in this registry key. For example:
C:\Program Files\Microsoft SQL Server\150\Setup Bootstrap\Update Cache\KB5014356\GDR\setup.exe" /Action=RemovePatch /AllInstances
Failover cluster parameters
Before you install a SQL Server Database Engine failover cluster instance, review the following articles:
Always On failover cluster instances (SQL Server)
Important
All failover cluster installation commands require an underlying Windows cluster. All the nodes that are part of a SQL Server Database Engine failover cluster must be part of the same Windows cluster.
Test and modify the following failover cluster installation scripts to meet the needs of your organization.
Integrated install failover cluster parameters
Use the parameters in the following table to develop command-line scripts for failover cluster installation.
For more information about Integrated Installation, see Always On failover cluster instances (SQL Server).
Note
To add more nodes after the installation, use Add Node action.
| SQL Server Database Engine component | Parameter | Details |
|---|---|---|
| Database Engine Setup Control | /ACTIONRequired |
Required to indicate the failover cluster installation work flow. Supported value: InstallFailoverCluster |
| Database Engine Setup Control | /IACCEPTSQLSERVERLICENSETERMSRequired, when the /Q or /QS parameter is specified for unattended installations |
Required to acknowledge acceptance of the license terms. Beginning with SQL Server 2022 (16.x), read the Microsoft SQL Server Software License Terms at aka.ms/useterms. |
| Database Engine Setup Control | /ENUOptional |
Use this parameter to install the English version of SQL Server on a localized operating system when the installation media includes language packs for both English and the language corresponding to the operating system. |
| Database Engine Setup Control | /FAILOVERCLUSTERGROUPOptional |
Specifies the name of the resource group to be used for the SQL Server Database Engine failover cluster. It can be the name of an existing cluster group or the name of a new resource group. Default value: SQL Server (<InstanceName>) |
| PolyBase Engine | /PBENGSVCACCOUNTOptional |
Specifies the account for the engine service. Default value: NT AUTHORITY\NETWORK SERVICE. |
| PolyBase Data Movement | /PBDMSSVCPASSWORDOptional |
Specifies the password for the data movement account. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| PolyBase Engine | /PBENGSVCSTARTUPTYPEOptional |
Specifies the startup mode for the PolyBase Engine service. Supported values: - Automatic (default)- Disabled- Manual |
| PolyBase | /PBPORTRANGEOptional |
Specifies a port range with at least six ports for PolyBase services. Example:/PBPORTRANGE=16450-16460 |
| PolyBase | /PBSCALEOUTOptional |
Specifies if the SQL Server Database Engine instance is used as a part of PolyBase Scale-out computational group. Use this option if you're configuring a PolyBase Scale-out computational group including the head node. Supported values: True, False |
| Database Engine Setup Control | /UpdateEnabledOptional |
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 includes updates that are found. |
| Database Engine Setup Control | /UpdateSourceOptional |
Specify the location where SQL Server Setup obtains 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 searches Microsoft Update or a Windows Update Service through the Windows Server Update Services. |
| Database Engine Setup Control | /CONFIGURATIONFILEOptional |
Specifies the configuration file to use. |
| Database Engine Setup Control | /ERRORREPORTINGApplies to: SQL Server 2014 (12.x) and earlier versions Optional |
To manage how error feedback is sent to Microsoft, see Configure usage and diagnostic data collection for SQL Server (CEIP). In older versions this specifies the error reporting for SQL Server. For more information, see SQL Server privacy supplement. Supported values: - 1 = enabled- 0 = disabled |
| Database Engine Setup Control | /FEATURESRequired |
Specifies components to install. |
| Database Engine Setup Control | /HELP or ?Optional |
Displays usage options for the parameters. |
| Database Engine Setup Control | /INDICATEPROGRESSOptional |
Specifies that the verbose Setup log file is piped to the console. |
| Database Engine Setup Control | /INSTALLSHAREDDIROptional |
Specifies a nondefault installation directory for 64-bit shared components. Default is %Program Files%\Microsoft SQL ServerCan't be set to %Program Files(x86)%\Microsoft SQL Server |
| Database Engine Setup Control | /INSTALLSHAREDWOWDIROptional |
Specifies a nondefault installation directory for 32-bit shared components. Supported only on a 64-bit system. Default is %Program Files(x86)%\Microsoft SQL ServerCan't be set to %Program Files%\Microsoft SQL Server |
| Database Engine Setup Control | /INSTANCEDIROptional |
Specifies a nondefault installation directory for instance-specific components. |
| Database Engine Setup Control | /INSTANCEIDOptional |
Specifies a nondefault value for an InstanceID. |
| Database Engine Setup Control | /INSTANCENAMERequired |
Specifies a SQL Server Database Engine instance name. For more information, see Installation Wizard help. |
| Database Engine Setup Control | /PRODUCTCOVEREDBYSAApplies to: SQL Server 2022 (16.x) and later versions Required, when installing the Azure Extension feature from the command line with AZUREEXTENSION. |
Specifies the license coverage for SQL Server./PRODUCTCOVEREDBYSA=True, or just /PRODUCTCOVEREDBYSA, indicates it's covered under Software Assurance or SQL Server subscription./PRODUCTCOVEREDBYSA=False, or omitting the parameter, indicates it's covered under a SQL Server license. |
| Database Engine Setup Control | /PIDOptional |
Specifies the product key for the edition of SQL Server. If this parameter isn't specified, Evaluation is used. Note: If you're installing SQL Server Express, SQL Server Express with Advanced Services, SQL Server Express with tools, SQL Server Developer, or SQL Server Evaluation, the PID is predefined. |
| Database Engine Setup Control | /Q or /QUIETOptional |
Specifies that Setup runs in a quiet mode without any user interface. This is used for unattended installations. The /Q parameter overrides the input of the /QS parameter. |
| Database Engine Setup Control | /QS or /QUIETSIMPLEOptional |
Specifies that Setup runs and shows progress through the UI, but doesn't accept any input or show any error messages. |
| Database Engine Setup Control | /SQMREPORTINGApplies to: SQL Server 2014 (12.x) and earlier versions Optional |
To manage how error feedback is sent to Microsoft, see Configure usage and diagnostic data collection for SQL Server (CEIP). In older versions this specifies feature usage reporting for SQL Server. Supported values: - 1 = enabled- 0 = disabled |
| Database Engine Setup Control | /HIDECONSOLEOptional |
Specifies that the console window is hidden or closed. |
| Database Engine Setup Control | /FAILOVERCLUSTERDISKSOptional |
Specifies the list of shared disks to be included in the SQL Server Database Engine failover cluster resource group. Default value: The first drive is used as the default drive for all databases. |
| Database Engine Setup Control | /FAILOVERCLUSTERIPADDRESSESRequired |
Specifies an encoded IP address. The encodings are semicolon-delimited (;) and follow the format <IP Type>;<address>;<network name>;<subnet mask>. Supported IP types include DHCP, IPv4, and IPv6. You can specify multiple failover cluster IP addresses with a space in between. See the following examples: FAILOVERCLUSTERIPADDRESSES=DEFAULTFAILOVERCLUSTERIPADDRESSES=IPv4;DHCP;ClusterNetwork1FAILOVERCLUSTERIPADDRESSES=IPv6;DHCP;ClusterNetwork1FAILOVERCLUSTERIPADDRESSES=IPv6;2041:0:1a0f::8a5b:131c |
| Database Engine Setup Control | /FAILOVERCLUSTERNETWORKNAMERequired |
Specifies the network name for the new SQL Server Database Engine failover cluster. This name is used to identify the new SQL Server Database Engine failover cluster instance on the network. |
| SQL Server Agent | /AGTSVCACCOUNTRequired |
Specifies the account for the SQL Server Agent service. |
| SQL Server Agent | /AGTSVCPASSWORDRequired |
Specifies the password for SQL Server Agent service account. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Analysis Services | /ASBACKUPDIROptional |
Specifies the directory for Analysis Services backup files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\BackupFor all other installations: %Program Files%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\Backup |
| Analysis Services | /ASCOLLATIONOptional |
Specifies the collation setting for Analysis Services. Default value: Latin1_General_CI_ASNote: Only Windows collation is supported. Using SQL collation can result in unexpected behavior. |
| Analysis Services | /ASCONFIGDIROptional |
Specifies the directory for Analysis Services configuration files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\ConfigFor all other installations: %Program Files%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\Config |
| Analysis Services | /ASDATADIROptional |
Specifies the directory for Analysis Services data files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\DataFor all other installations: %Program Files%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\Data |
| Analysis Services | /ASLOGDIROptional |
Specifies the directory for Analysis Services log files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\LogFor all other installations: %Program Files%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\Log |
| Analysis Services | /ASSYSADMINACCOUNTSRequired |
Specifies the administrator credentials for Analysis Services. |
| Analysis Services | /ASTEMPDIROptional |
Specifies the directory for Analysis Services temporary files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\TempFor all other installations: %Program Files%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\Temp |
| Analysis Services | /ASPROVIDERMSOLAPOptional |
Specifies whether the MSOLAP provider can run in-process. Default value: - 1 = enabled |
| Analysis Services | /ASSERVERMODEOptional |
Specifies the server mode of the Analysis Services instance. Valid values in a cluster scenario are MULTIDIMENSIONAL or TABULAR. ASSERVERMODE is case-sensitive. All values must be expressed in uppercase. For more information about valid values, see Install Analysis Services in Tabular Mode. |
| SQL Server Database Engine | /INSTALLSQLDATADIRRequired |
Specifies the data directory for SQL Server data files. The data directory must be specified and on a shared cluster disk. |
| SQL Server Database Engine | /SAPWDRequired, when /SECURITYMODE=SQL |
Specifies the password for the SQL Server SA account. |
| SQL Server Database Engine | /SECURITYMODEOptional |
Specifies the security mode for SQL Server. If this parameter isn't supplied, then Windows-only authentication mode is supported. Supported value: SQL |
| SQL Server Database Engine | /SQLBACKUPDIROptional |
Specifies the directory for backup files. Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Backup |
| SQL Server Database Engine | /SQLCOLLATIONOptional |
Specifies the collation settings for SQL Server. The default value is based on the locale of your Windows operating system. For more information, see Collation and Unicode support. |
| SQL Server Database Engine | /SQLSVCACCOUNTRequired |
Specifies the startup account for the SQL Server service. |
| SQL Server Database Engine | /SQLSVCPASSWORDRequired |
Specifies the password for SQLSVCACCOUNT. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| SQL Server Database Engine | /SQLSYSADMINACCOUNTSRequired |
Use this parameter to provision logins to be members of the sysadmin role. For SQL Server editions other than SQL Server Express, /SQLSYSADMINACCOUNTS is required. For editions of SQL Server Express, use of /SQLSYSADMINACCOUNTS is optional, but either /SQLSYSADMINACCOUNTS or /ADDCURRENTUSERASSQLADMIN is required. |
| SQL Server Database Engine | /SQLUSERDBDIROptional |
Specifies the directory for the data files for user databases. Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data |
| SQL Server Database Engine | /SQLTEMPDBDIROptional |
Specifies the directories for tempdb data files. When specifying more than one directory, separate the directories with a blank space. If multiple directories are specified, the tempdb data files are spread across the directories in a round-robin fashion.Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data (System Data Directory)Note: This parameter is added to RebuildDatabase scenario as well. |
| SQL Server Database Engine | /SQLTEMPDBLOGDIROptional |
Specifies the directory for tempdb log file.Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data (System Data Directory)Note: This parameter is added to RebuildDatabase scenario as well. |
| SQL Server Database Engine | /SQLTEMPDBFILECOUNTOptional |
Specifies the number of tempdb data files to be added by setup. This value can be increased up to the number of cores.Default value: 1 for SQL Server Express 8 or the number of cores, whichever is lower for all other editions Important: The primary database file for tempdb is still tempdb.mdf. The additional tempdb files are named as tempdb_mssql_#.ndf where # represents a unique number for each additional tempdb database file created during setup. The purpose of this naming convention is to make them unique. Uninstalling an instance of SQL Server deletes the files with naming convention tempdb_mssql_#.ndf. Don't use tempdb_mssql_\*.ndf naming convention for user database files.Warning: SQL Server Express isn't supported for configuring this parameter. Setup installs only 1 tempdb data file. |
| SQL Server Database Engine | /SQLTEMPDBFILESIZEApplies to: SQL Server 2016 (13.x) and later versions Optional |
Specifies the initial size of each tempdb data file.Default = 4 MB for SQL Server Express, 8 MB for all other editions Min = 4 MB or 8 MB Max = 1024 MB |
| SQL Server Database Engine | /SQLTEMPDBFILEGROWTHOptional |
Specifies the file growth increment of each tempdb data file in MB. A value of 0 indicates that automatic growth is off and no additional space is allowed. Setup allows the size up to 1024.Default value: 64. Allowed range: Min = 0, Max = 1024 |
| SQL Server Database Engine | /SQLTEMPDBLOGFILESIZEApplies to: SQL Server 2016 (13.x) and later versions Optional |
Specifies the initial size of the tempdb log file in MB. Setup allows the size up to 1024.Default value: 4 for SQL Server Express 8 for all other editions Allowed range: Min = default value (4 or 8), Max = 1024 |
| SQL Server Database Engine | /SQLTEMPDBLOGFILEGROWTHApplies to: SQL Server 2016 (13.x) and later versions Optional |
Specifies the file growth increment of the tempdb log file in MB. A value of 0 indicates that automatic growth is off and no additional space is allowed. Setup allows the size up to 1024.Default value: 64. Allowed range: Min = 0, Max = 1024 |
| SQL Server Database Engine | /SQLUSERDBLOGDIROptional |
Specifies the directory for the log files for user databases. Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data |
| FILESTREAM | /FILESTREAMLEVELOptional |
Specifies the access level for the FILESTREAM feature. Supported values: - 0 = disable FILESTREAM support for this instance. (Default value)- 1 = enable FILESTREAM for Transact-SQL access.- 2 = enable FILESTREAM for Transact-SQL and file I/O streaming access. (Not valid for Cluster scenarios)- 3 = allow remote clients to have streaming access to FILESTREAM data. |
| FILESTREAM | /FILESTREAMSHARENAMEOptional Required when FILESTREAMLEVEL is greater than 1. |
Specifies the name of the Windows share in which the FILESTREAM data will be stored. |
| SQL Server Full Text | /FTSVCACCOUNTOptional |
Specifies the account for Full-Text filter launcher service. This parameter is ignored in Windows Server 2008 or higher. ServiceSID is used to help secure the communication between SQL Server and Full-text Filter Daemon. If the values aren't provided, the Full-text Filter Launcher Service is disabled. You have to use SQL Server Control Manager to change the service account and enable full-text functionality. Default value: Local Service Account |
| SQL Server Full Text | /FTSVCPASSWORDOptional |
Specifies the password for the Full-Text filter launcher service. This parameter is ignored in Windows Server 2008 or higher. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Integration Services | /ISSVCACCOUNTRequired |
Specifies the account for Integration Services. Default value: NT AUTHORITY\NETWORK SERVICE |
| Integration Services | /ISSVCPASSWORDRequired |
Specifies the Integration Services password. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Integration Services | /ISSVCStartupTypeOptional |
Specifies the startup mode for the Integration Services service. |
| Reporting Services | /RSINSTALLMODEApplies to: SQL Server 2016 (13.x) and earlier versions Optional Available only on FilesOnlyMode |
Specifies the Install mode for Reporting Services. Supported values: - SharePointFilesOnlyMode- DefaultNativeMode- FilesOnlyModeNote: If the installation includes the SQL Server Database Engine, the default RSINSTALLMODE is DefaultNativeMode.If the installation doesn't include the SQL Server Database Engine, the default RSINSTALLMODE is FilesOnlyMode.If you choose DefaultNativeMode but the installation doesn't include the SQL Server Database Engine, the installation automatically changes the RSINSTALLMODE to FilesOnlyMode. |
| Reporting Services | /RSSVCACCOUNTApplies to: SQL Server 2016 (13.x) and earlier versions Required |
Specifies the startup account for the Reporting Services. |
| Reporting Services | /RSSVCPASSWORDApplies to: SQL Server 2016 (13.x) and earlier versions Required |
Specifies the password for the startup account for the Reporting Services service. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Reporting Services | /RSSVCStartupTypeApplies to: SQL Server 2016 (13.x) and earlier versions Optional |
Specifies the startup mode for Reporting Services. Supported values: - Automatic- Disabled- Manual |
We recommend that you use Service SID instead of domain groups.
Additional notes
The Database Engine and Analysis Services are the only components that are cluster-aware. Other features aren't cluster-aware and don't have high availability through failover.
Sample syntax
To install a single-node SQL Server Database Engine failover cluster instance with the Database Engine and Analysis Services, default instance.
setup.exe /q /ACTION=InstallFailoverCluster /InstanceName=MSSQLSERVER /INDICATEPROGRESS /ASSYSADMINACCOUNTS="<DomainName\UserName>" /ASDATADIR=<Drive>:\OLAP\Data /ASLOGDIR=<Drive>:\OLAP\Log /ASBACKUPDIR=<Drive>:\OLAP\Backup /ASCONFIGDIR=<Drive>:\OLAP\Config /ASTEMPDIR=<Drive>:\OLAP\Temp /FAILOVERCLUSTERDISKS="<Cluster Disk Resource Name - for example, 'Disk S:'" /FAILOVERCLUSTERNETWORKNAME="<Insert Network Name>" /FAILOVERCLUSTERIPADDRESSES="IPv4;xx.xxx.xx.xx;Cluster Network;xxx.xxx.xxx.x" /FAILOVERCLUSTERGROUP="MSSQLSERVER" /Features=AS,SQL /ASSVCACCOUNT="<DomainName\UserName>" /ASSVCPASSWORD="xxxxxxxxxxx" /AGTSVCACCOUNT="<DomainName\UserName>" /AGTSVCPASSWORD="xxxxxxxxxxx" /INSTALLSQLDATADIR="<Drive>:\<Path>\MSSQLSERVER" /SQLCOLLATION="SQL_Latin1_General_CP1_CS_AS" /SQLSVCACCOUNT="<DomainName\UserName>" /SQLSVCPASSWORD="xxxxxxxxxxx" /SQLSYSADMINACCOUNTS="<DomainName\UserName> /IACCEPTSQLSERVERLICENSETERMS
Prepare failover cluster parameters
Use the parameters in the following table to develop command-line scripts for failover cluster prepare. This is the first step in advanced cluster installation, where you have to prepare the failover cluster instances on all the nodes of the failover cluster. For more information, see Always On failover cluster instances (SQL Server).
| SQL Server Database Engine component | Parameter | Description |
|---|---|---|
| Database Engine Setup Control | /ACTIONRequired |
Required to indicate the failover cluster prepare work flow. Supported value: PrepareFailoverCluster |
| Database Engine Setup Control | /IACCEPTSQLSERVERLICENSETERMSRequired, when the /Q or /QS parameter is specified for unattended installations |
Required to acknowledge acceptance of the license terms. Beginning with SQL Server 2022 (16.x), read the Microsoft SQL Server Software License Terms at aka.ms/useterms. |
| Database Engine Setup Control | /ENUOptional |
Use this parameter to install the English version of SQL Server on a localized operating system when the installation media includes language packs for both English and the language corresponding to the operating system. |
| Database Engine Setup Control | /UpdateEnabledOptional |
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 includes updates that are found. |
| Database Engine Setup Control | /UpdateSourceOptional |
Specify the location where SQL Server Setup obtains 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 searches Microsoft Update or a Windows Update Service through the Windows Server Update Services. |
| Database Engine Setup Control | /CONFIGURATIONFILEOptional |
Specifies the configuration file to use. |
| Database Engine Setup Control | /ERRORREPORTINGApplies to: SQL Server 2014 (12.x) and earlier versions Optional |
To manage how error feedback is sent to Microsoft, see Configure usage and diagnostic data collection for SQL Server (CEIP). In older versions this specifies the error reporting for SQL Server. For more information, see SQL Server privacy supplement. Supported values: - 1 = enabled- 0 = disabled |
| Database Engine Setup Control | /FEATURESRequired |
Specifies components to install. |
| Database Engine Setup Control | /HELP or ?Optional |
Displays usage options for the parameters. |
| Database Engine Setup Control | /INDICATEPROGRESSOptional |
Specifies that the verbose Setup log file is piped to the console. |
| Database Engine Setup Control | /INSTALLSHAREDDIROptional |
Specifies a nondefault installation directory for 64-bit shared components. Default is %Program Files%\Microsoft SQL ServerCan't be set to %Program Files(x86)%\Microsoft SQL Server |
| Database Engine Setup Control | /INSTALLSHAREDWOWDIROptional |
Specifies a nondefault installation directory for 32-bit shared components. Supported only on a 64-bit system. Default is %Program Files(x86)%\Microsoft SQL ServerCan't be set to %Program Files%\Microsoft SQL Server |
| Database Engine Setup Control | /INSTANCEDIROptional |
Specifies a nondefault installation directory for instance-specific components. |
| Database Engine Setup Control | /INSTANCEIDOptional |
Specifies a nondefault value for an InstanceID. |
| Database Engine Setup Control | /INSTANCENAMERequired |
Specifies a SQL Server Database Engine instance name. For more information, see Installation Wizard help. |
| Database Engine Setup Control | /PIDOptional |
Specifies the product key for the edition of SQL Server. If this parameter isn't specified, Evaluation is used. Note: If you're installing SQL Server Express, SQL Server Express with Advanced Services, SQL Server Express with tools, SQL Server Developer, or SQL Server Evaluation, the PID is predefined. |
| Database Engine Setup Control | /Q or /QUIETOptional |
Specifies that Setup runs in a quiet mode without any user interface. This is used for unattended installations. The /Q parameter overrides the input of the /QS parameter. |
| Database Engine Setup Control | /QS or /QUIETSIMPLEOptional |
Specifies that Setup runs and shows progress through the UI, but doesn't accept any input or show any error messages. |
| Database Engine Setup Control | /SQMREPORTINGApplies to: SQL Server 2014 (12.x) and earlier versions Optional |
To manage how error feedback is sent to Microsoft, see Configure usage and diagnostic data collection for SQL Server (CEIP). In older versions this specifies feature usage reporting for SQL Server. Supported values: - 1 = enabled- 0 = disabled |
| Database Engine Setup Control | /HIDECONSOLEOptional |
Specifies that the console window is hidden or closed. |
| SQL Server Agent | /AGTSVCACCOUNTRequired |
Specifies the account for the SQL Server Agent service. |
| SQL Server Agent | /AGTSVCPASSWORDRequired |
Specifies the password for SQL Server Agent service account. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| PolyBase Engine | /PBENGSVCACCOUNTOptional |
Specifies the account for the engine service. Default value: NT AUTHORITY\NETWORK SERVICE. |
| PolyBase Data Movement | /PBDMSSVCPASSWORDOptional |
Specifies the password for the data movement account. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| PolyBase Engine | /PBENGSVCSTARTUPTYPEOptional |
Specifies the startup mode for the PolyBase Engine service. Supported values: - Automatic (default)- Disabled- Manual |
| PolyBase | /PBPORTRANGEOptional |
Specifies a port range with at least six ports for PolyBase services. Example:/PBPORTRANGE=16450-16460 |
| PolyBase | /PBSCALEOUTOptional |
Specifies if the SQL Server Database Engine instance is used as a part of PolyBase Scale-out computational group. Use this option if you're configuring a PolyBase Scale-out computational group including the head node. Supported values: True, False |
| Analysis Services | /ASSVCACCOUNTRequired |
Specifies the account for the Analysis Services service. |
| Analysis Services | /ASSVCPASSWORDRequired |
Specifies the password for the Analysis Services service. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| SQL Server Database Engine | /SQLSVCACCOUNTRequired |
Specifies the startup account for the SQL Server service. |
| SQL Server Database Engine | /SQLSVCPASSWORDRequired |
Specifies the password for SQLSVCACCOUNT. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| FILESTREAM | /FILESTREAMLEVELOptional |
Specifies the access level for the FILESTREAM feature. Supported values: - 0 = disable FILESTREAM support for this instance. (Default value)- 1 = enable FILESTREAM for Transact-SQL access.- 2 = enable FILESTREAM for Transact-SQL and file I/O streaming access. (Not valid for Cluster scenarios)- 3 = allow remote clients to have streaming access to FILESTREAM data. |
| FILESTREAM | /FILESTREAMSHARENAMEOptional Required when FILESTREAMLEVEL is greater than 1. |
Specifies the name of the Windows share in which the FILESTREAM data will be stored. |
| SQL Server Full Text | /FTSVCACCOUNTOptional |
Specifies the account for Full-Text filter launcher service. This parameter is ignored in Windows Server 2008 or higher. ServiceSID is used to help secure the communication between SQL Server and Full-text Filter Daemon. If the values aren't provided, the Full-text Filter Launcher Service is disabled. You have to use SQL Server Control Manager to change the service account and enable full-text functionality. Default value: Local Service Account |
| SQL Server Full Text | /FTSVCPASSWORDOptional |
Specifies the password for the Full-Text filter launcher service. This parameter is ignored in Windows Server 2008 or higher. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Integration Services | /ISSVCACCOUNTRequired |
Specifies the account for Integration Services. Default value: NT AUTHORITY\NETWORK SERVICE |
| Integration Services | /ISSVCPASSWORDRequired |
Specifies the Integration Services password. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Integration Services | /ISSVCStartupTypeOptional |
Specifies the startup mode for the Integration Services service. |
| Reporting Services | /RSINSTALLMODEApplies to: SQL Server 2016 (13.x) and earlier versions Optional Available only on FilesOnlyMode |
Specifies the Install mode for Reporting Services. Supported values: - SharePointFilesOnlyMode- DefaultNativeMode- FilesOnlyModeNote: If the installation includes the SQL Server Database Engine, the default RSINSTALLMODE is DefaultNativeMode.If the installation doesn't include the SQL Server Database Engine, the default RSINSTALLMODE is FilesOnlyMode.If you choose DefaultNativeMode but the installation doesn't include the SQL Server Database Engine, the installation automatically changes the RSINSTALLMODE to FilesOnlyMode. |
| Reporting Services | /RSSVCACCOUNTApplies to: SQL Server 2016 (13.x) and earlier versions Required |
Specifies the startup account for the Reporting Services. |
| Reporting Services | /RSSVCPASSWORDApplies to: SQL Server 2016 (13.x) and earlier versions Required |
Specifies the password for the startup account for the Reporting Services service. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Reporting Services | /RSSVCStartupTypeApplies to: SQL Server 2016 (13.x) and earlier versions Optional |
Specifies the startup mode for Reporting Services. Supported values: - Automatic- Disabled- Manual |
We recommend that you use Service SID instead of domain groups.
Sample syntax
To perform the "Preparation" step of a failover cluster advanced installation scenario for the Database Engine and Analysis Services.
Run the following command at the command prompt to prepare a default instance:
setup.exe /q /ACTION=PrepareFailoverCluster /InstanceName=MSSQLSERVER /Features=AS,SQL /INDICATEPROGRESS /ASSVCACCOUNT="<DomainName\UserName>" /ASSVCPASSWORD="xxxxxxxxxxx" /SQLSVCACCOUNT="<DomainName\UserName>" /SQLSVCPASSWORD="xxxxxxxxxxx" /AGTSVCACCOUNT="<DomainName\UserName>" /AGTSVCPASSWORD="xxxxxxxxxxx" /IACCEPTSQLSERVERLICENSETERMS
Run the following command at the command prompt to prepare a named instance:
setup.exe /q /ACTION=PrepareFailoverCluster /InstanceName="<Insert Instance name>" /Features=AS,SQL /INDICATEPROGRESS /ASSVCACCOUNT="<DomainName\UserName>" /ASSVCPASSWORD="xxxxxxxxxxx" /SQLSVCACCOUNT="<DomainName\UserName>" /SQLSVCPASSWORD="xxxxxxxxxxx" /AGTSVCACCOUNT="<DomainName\UserName>" /AGTSVCPASSWORD="xxxxxxxxxxx" /IACCEPTSQLSERVERLICENSETERMS
For SQL Server 2022 (16.x) and later versions, read the Microsoft SQL Server Software License Terms at aka.ms/useterms.
Complete failover cluster parameters
Use the parameters in the following table to develop command-line scripts for failover cluster complete. This is the second step in the advanced failover cluster install option. After you have run prepare on all the failover cluster nodes, you run this command on the node that owns the shared disks. For more information, see Always On failover cluster instances (SQL Server).
| SQL Server Database Engine component | Parameter | Description |
|---|---|---|
| Database Engine Setup Control | /ACTIONRequired |
Required to indicate the failover cluster complete work flow. Supported value: CompleteFailoverCluster |
| Database Engine Setup Control | /ENUOptional |
Use this parameter to install the English version of SQL Server on a localized operating system when the installation media includes language packs for both English and the language corresponding to the operating system. |
| Database Engine Setup Control | /FAILOVERCLUSTERGROUPOptional |
Specifies the name of the resource group to be used for the SQL Server Database Engine failover cluster. It can be the name of an existing cluster group or the name of a new resource group. Default value: SQL Server (<InstanceName>) |
| Database Engine Setup Control | /CONFIGURATIONFILEOptional |
Specifies the configuration file to use. |
| Database Engine Setup Control | /ERRORREPORTINGApplies to: SQL Server 2014 (12.x) and earlier versions Optional |
To manage how error feedback is sent to Microsoft, see Configure usage and diagnostic data collection for SQL Server (CEIP). In older versions this specifies the error reporting for SQL Server. For more information, see SQL Server privacy supplement. Supported values: - 1 = enabled- 0 = disabled |
| Database Engine Setup Control | /HELP or ?Optional |
Displays usage options for the parameters. |
| Database Engine Setup Control | /INDICATEPROGRESSOptional |
Specifies that the verbose Setup log file is piped to the console. |
| Database Engine Setup Control | /INSTANCENAMERequired |
Specifies a SQL Server Database Engine instance name. For more information, see Installation Wizard help. |
| Database Engine Setup Control | /PIDOptional |
Specifies the product key for the edition of SQL Server. If this parameter isn't specified, Evaluation is used. Note: If you're installing SQL Server Express, SQL Server Express with Advanced Services, SQL Server Express with tools, SQL Server Developer, or SQL Server Evaluation, the PID is predefined. |
| Database Engine Setup Control | /Q or /QUIETOptional |
Specifies that Setup runs in a quiet mode without any user interface. This is used for unattended installations. The /Q parameter overrides the input of the /QS parameter. |
| Database Engine Setup Control | /QS or /QUIETSIMPLEOptional |
Specifies that Setup runs and shows progress through the UI, but doesn't accept any input or show any error messages. |
| Database Engine Setup Control | /SQMREPORTINGApplies to: SQL Server 2014 (12.x) and earlier versions Optional |
To manage how error feedback is sent to Microsoft, see Configure usage and diagnostic data collection for SQL Server (CEIP). In older versions this specifies feature usage reporting for SQL Server. Supported values: - 1 = enabled- 0 = disabled |
| Database Engine Setup Control | /HIDECONSOLEOptional |
Specifies that the console window is hidden or closed. |
| Database Engine Setup Control | /FAILOVERCLUSTERDISKSOptional |
Specifies the list of shared disks to be included in the SQL Server Database Engine failover cluster resource group. Default value: The first drive is used as the default drive for all databases. |
| Database Engine Setup Control | /FAILOVERCLUSTERIPADDRESSESRequired |
Specifies an encoded IP address. The encodings are semicolon-delimited (;) and follow the format <IP Type>;<address>;<network name>;<subnet mask>. Supported IP types include DHCP, IPv4, and IPv6. You can specify multiple failover cluster IP addresses with a space in between. See the following examples: FAILOVERCLUSTERIPADDRESSES=DEFAULTFAILOVERCLUSTERIPADDRESSES=IPv4;DHCP;ClusterNetwork1FAILOVERCLUSTERIPADDRESSES=IPv6;DHCP;ClusterNetwork1FAILOVERCLUSTERIPADDRESSES=IPv6;2041:0:1a0f::8a5b:131c |
| Database Engine Setup Control | /FAILOVERCLUSTERNETWORKNAMERequired |
Specifies the network name for the new SQL Server Database Engine failover cluster. This name is used to identify the new SQL Server Database Engine failover cluster instance on the network. |
| Database Engine Setup Control | /CONFIRMIPDEPENDENCYCHANGERequired |
Indicates the consent to set the IP address resource dependency from OR to AND for multi-subnet failover clusters. For more information, see Add or remove nodes in a failover cluster instance (Setup). Supported values: - 0 = False (default)- 1 = True |
| Analysis Services | /ASBACKUPDIROptional |
Specifies the directory for Analysis Services backup files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\BackupFor all other installations: %Program Files%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\Backup |
| Analysis Services | /ASCOLLATIONOptional |
Specifies the collation setting for Analysis Services. Default value: Latin1_General_CI_ASNote: Only Windows collation is supported. Using SQL collation can result in unexpected behavior. |
| Analysis Services | /ASCONFIGDIROptional |
Specifies the directory for Analysis Services configuration files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\ConfigFor all other installations: %Program Files%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\Config |
| Analysis Services | /ASDATADIROptional |
Specifies the directory for Analysis Services data files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\DataFor all other installations: %Program Files%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\Data |
| Analysis Services | /ASLOGDIROptional |
Specifies the directory for Analysis Services log files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\LogFor all other installations: %Program Files%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\Log |
| Analysis Services | /ASSERVERMODEOptional |
Specifies the server mode of the Analysis Services instance. Valid values in a cluster scenario are MULTIDIMENSIONAL or TABULAR. ASSERVERMODE is case-sensitive. All values must be expressed in uppercase. For more information about valid values, see Install Analysis Services in Tabular Mode. |
| Analysis Services | /ASSYSADMINACCOUNTSRequired |
Specifies the administrator credentials for Analysis Services. |
| Analysis Services | /ASTEMPDIROptional |
Specifies the directory for Analysis Services temporary files. Default values: For WOW mode on 64-bit: %Program Files(x86)%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\TempFor all other installations: %Program Files%\Microsoft SQL Server\<INSTANCEDIR>\<ASInstanceID>\OLAP\Temp |
| Analysis Services | /ASPROVIDERMSOLAPOptional |
Specifies whether the MSOLAP provider can run in-process. Default value: - 1 = enabled |
| SQL Server Database Engine | /INSTALLSQLDATADIRRequired |
Specifies the data directory for SQL Server data files. The data directory must be specified and on a shared cluster disk. |
| SQL Server Database Engine | /SAPWDRequired, when /SECURITYMODE=SQL |
Specifies the password for the SQL Server SA account. |
| SQL Server Database Engine | /SECURITYMODEOptional |
Specifies the security mode for SQL Server. If this parameter isn't supplied, then Windows-only authentication mode is supported. Supported value: SQL |
| SQL Server Database Engine | /SQLBACKUPDIROptional |
Specifies the directory for backup files. Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Backup |
| SQL Server Database Engine | /SQLCOLLATIONOptional |
Specifies the collation settings for SQL Server. The default value is based on the locale of your Windows operating system. For more information, see Collation and Unicode support. |
| SQL Server Database Engine | /SQLSYSADMINACCOUNTSRequired |
Use this parameter to provision logins to be members of the sysadmin role. For SQL Server editions other than SQL Server Express, /SQLSYSADMINACCOUNTS is required. For editions of SQL Server Express, use of /SQLSYSADMINACCOUNTS is optional, but either /SQLSYSADMINACCOUNTS or /ADDCURRENTUSERASSQLADMIN is required. |
| SQL Server Database Engine | /SQLUSERDBDIROptional |
Specifies the directory for the data files for user databases. Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data |
| SQL Server Database Engine | /SQLUSERDBLOGDIROptional |
Specifies the directory for the log files for user databases. Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data |
| Reporting Services | /RSINSTALLMODEApplies to: SQL Server 2016 (13.x) and earlier versions Optional Available only on FilesOnlyMode |
Specifies the Install mode for Reporting Services. Supported values: - SharePointFilesOnlyMode- DefaultNativeMode- FilesOnlyModeNote: If the installation includes the SQL Server Database Engine, the default RSINSTALLMODE is DefaultNativeMode.If the installation doesn't include the SQL Server Database Engine, the default RSINSTALLMODE is FilesOnlyMode.If you choose DefaultNativeMode but the installation doesn't include the SQL Server Database Engine, the installation automatically changes the RSINSTALLMODE to FilesOnlyMode. |
| SQL Server Database Engine | /SQLTEMPDBDIROptional |
Specifies the directories for tempdb data files. When specifying more than one directory, separate the directories with a blank space. If multiple directories are specified, the tempdb data files are spread across the directories in a round-robin fashion.Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data (System Data Directory)Note: This parameter is added to RebuildDatabase scenario as well. |
| SQL Server Database Engine | /SQLTEMPDBLOGDIROptional |
Specifies the directory for tempdb log file.Default value: <InstallSQLDataDir>\<SQLInstanceID>\MSSQL\Data (System Data Directory)Note: This parameter is added to RebuildDatabase scenario as well. |
| SQL Server Database Engine | /SQLTEMPDBFILECOUNTOptional |
Specifies the number of tempdb data files to be added by setup. This value can be increased up to the number of cores.Default value: 1 for SQL Server Express 8 or the number of cores, whichever is lower for all other editions Important: The primary database file for tempdb is still tempdb.mdf. The additional tempdb files are named as tempdb_mssql_#.ndf where # represents a unique number for each additional tempdb database file created during setup. The purpose of this naming convention is to make them unique. Uninstalling an instance of SQL Server deletes the files with naming convention tempdb_mssql_#.ndf. Don't use tempdb_mssql_\*.ndf naming convention for user database files.Warning: SQL Server Express isn't supported for configuring this parameter. Setup installs only 1 tempdb data file. |
| SQL Server Database Engine | /SQLTEMPDBFILESIZEApplies to: SQL Server 2016 (13.x) and later versions Optional |
Specifies the initial size of each tempdb data file.Default = 4 MB for SQL Server Express, 8 MB for all other editions Min = 4 MB or 8 MB Max = 1024 MB |
| SQL Server Database Engine | /SQLTEMPDBFILEGROWTHOptional |
Specifies the file growth increment of each tempdb data file in MB. A value of 0 indicates that automatic growth is off and no additional space is allowed. Setup allows the size up to 1024.Default value: 64. Allowed range: Min = 0, Max = 1024 |
| SQL Server Database Engine | /SQLTEMPDBLOGFILESIZEApplies to: SQL Server 2016 (13.x) and later versions Optional |
Specifies the initial size of the tempdb log file in MB. Setup allows the size up to 1024.Default value: 4 for SQL Server Express 8 for all other editions Allowed range: Min = default value (4 or 8), Max = 1024 |
| SQL Server Database Engine | /SQLTEMPDBLOGFILEGROWTHApplies to: SQL Server 2016 (13.x) and later versions Optional |
Specifies the file growth increment of the tempdb log file in MB. A value of 0 indicates that automatic growth is off and no additional space is allowed. Setup allows the size up to 1024.Default value: 64. Allowed range: Min = 0, Max = 1024 |
Sample syntax
To perform the "Completion" step of a failover cluster advanced installation scenario for the Database Engine and Analysis Services. Run the following command on the computer that is the active node in the failover cluster to make it usable. You must run the "CompleteFailoverCluster" action on the node that owns the shared disk in the Analysis Services failover cluster.
Run the following command at the command prompt to complete failover cluster installation for a default instance:
setup.exe /q /ACTION=CompleteFailoverCluster /InstanceName=MSSQLSERVER /INDICATEPROGRESS /ASSYSADMINACCOUNTS="<DomainName\Username>" /ASDATADIR=<Drive>:\OLAP\Data /ASLOGDIR=<Drive>:\OLAP\Log /ASBACKUPDIR=<Drive>:\OLAP\Backup /ASCONFIGDIR=<Drive>:\OLAP\Config /ASTEMPDIR=<Drive>:\OLAP\Temp /FAILOVERCLUSTERDISKS="<Cluster Disk Resource Name - for example, 'Disk S:'>:" /FAILOVERCLUSTERNETWORKNAME="<Insert FOI Network Name>" /FAILOVERCLUSTERIPADDRESSES="IPv4;xx.xxx.xx.xx;Cluster Network;xxx.xxx.xxx.x" /FAILOVERCLUSTERGROUP="MSSQLSERVER" /INSTALLSQLDATADIR="<Drive>:\<Path>\MSSQLSERVER" /SQLCOLLATION="SQL_Latin1_General_CP1_CS_AS" /SQLSYSADMINACCOUNTS="<DomainName\UserName>"
Run the following command at the command prompt to complete failover cluster installation for a named instance:
setup.exe /q /ACTION=CompleteFailoverCluster /InstanceName="<Insert Instance Name>" /INDICATEPROGRESS /ASSYSADMINACCOUNTS="<DomainName\UserName>" /ASDATADIR=<Drive>:\INSTANCE\Data /ASLOGDIR=<drive>:\INSTANCE\Log /ASBACKUPDIR=<Drive>:\INSTANCE\Backup /ASCONFIGDIR=<Drive>:\INSTANCE\Config /ASTEMPDIR=<Drive>:\INSTANCE\Temp /FAILOVERCLUSTERDISKS="<Cluster Disk Resource Name - for example, 'Disk S:'>" /FAILOVERCLUSTERNETWORKNAME="CompNamedFOI" /FAILOVERCLUSTERIPADDRESSES="IPv4;xx.xxx.xx.xx;ClusterNetwork1;xxx.xxx.xxx.x" /FAILOVERCLUSTERGROUP="<Insert New Group Name>" /INSTALLSQLDATADIR="<Drive>:\<Path>\MSSQLSERVER_INSTANCE" /SQLCOLLATION="SQL_Latin1_General_CP1_CS_AS" /SQLSYSADMINACCOUNTS="<DomainName\Username>"
Upgrade failover cluster parameters
Use the parameters in the following table to develop command-line scripts for failover cluster upgrade. For more information, see Upgrade a SQL Server Database Engine failover Cluster Instance (Setup) and Always On failover cluster instances (SQL Server).
| SQL Server Database Engine component | Parameter | Description |
|---|---|---|
| Database Engine Setup Control | /ACTIONRequired |
Required to indicate the installation workflow. Supported value: Upgrade |
| Database Engine Setup Control | /IACCEPTSQLSERVERLICENSETERMSRequired, when the /Q or /QS parameter is specified for unattended installations |
Required to acknowledge acceptance of the license terms. Beginning with SQL Server 2022 (16.x), read the Microsoft SQL Server Software License Terms at aka.ms/useterms. |
| Database Engine Setup Control | /ENUOptional |
Use this parameter to install the English version of SQL Server on a localized operating system when the installation media includes language packs for both English and the language corresponding to the operating system. |
| Database Engine Setup Control | /UpdateEnabledOptional |
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 includes updates that are found. |
| Database Engine Setup Control | /UpdateSourceOptional |
Specify the location where SQL Server Setup obtains 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 searches Microsoft Update or a Windows Update Service through the Windows Server Update Services. |
| Database Engine Setup Control | /CONFIGURATIONFILEOptional |
Specifies the configuration file to use. |
| Database Engine Setup Control | /ERRORREPORTINGApplies to: SQL Server 2014 (12.x) and earlier versions Optional |
To manage how error feedback is sent to Microsoft, see Configure usage and diagnostic data collection for SQL Server (CEIP). In older versions this specifies the error reporting for SQL Server. For more information, see SQL Server privacy supplement. Supported values: - 1 = enabled- 0 = disabled |
| Database Engine Setup Control | /HELP or ?Optional |
Displays usage options for the parameters. |
| Database Engine Setup Control | /INDICATEPROGRESSOptional |
Specifies that the verbose Setup log file is piped to the console. |
| Database Engine Setup Control | / INSTANCEDIROptional |
Specifies a nondefault installation directory for shared components. |
| Database Engine Setup Control | /INSTANCEIDRequired, when you upgrade from SQL Server 2008 (10.0.x) or later versions. Optional, when you upgrade from SQL Server 2005 (9.x). |
Specifies a nondefault value for an InstanceID. |
| Database Engine Setup Control | /INSTANCENAMERequired |
Specifies a SQL Server Database Engine instance name. For more information, see Installation Wizard help. |
| Database Engine Setup Control | /PIDOptional |
Specifies the product key for the edition of SQL Server. If this parameter isn't specified, Evaluation is used. Note: If you're installing SQL Server Express, SQL Server Express with Advanced Services, SQL Server Express with tools, SQL Server Developer, or SQL Server Evaluation, the PID is predefined. |
| Database Engine Setup Control | /Q or /QUIETOptional |
Specifies that Setup runs in a quiet mode without any user interface. This is used for unattended installations. The /Q parameter overrides the input of the /QS parameter. |
| Database Engine Setup Control | /SQMREPORTINGApplies to: SQL Server 2014 (12.x) and earlier versions Optional |
To manage how error feedback is sent to Microsoft, see Configure usage and diagnostic data collection for SQL Server (CEIP). In older versions this specifies feature usage reporting for SQL Server. Supported values: - 1 = enabled- 0 = disabled |
| Database Engine Setup Control | /HIDECONSOLEOptional |
Specifies that the console window is hidden or closed. |
| Database Engine Setup Control | /FAILOVERCLUSTERROLLOWNERSHIPRequired |
Specifies the failover behavior during upgrade. |
| SQL Server Browser | /BROWSERSVCSTARTUPTYPEOptional |
Specifies the startup mode for SQL Server Browser service. Supported values: - Automatic- Disabled- Manual |
| SQL Server Full-Text | /FTUPGRADEOPTIONOptional |
Specifies the Full-Text catalog upgrade option. Supported values: - REBUILD- RESET- IMPORT |
| Integration Services | /ISSVCACCOUNTRequired |
Specifies the account for Integration Services. Default value: NT AUTHORITY\NETWORK SERVICE |
| Integration Services | /ISSVCPASSWORDRequired |
Specifies the Integration Services password. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Integration Services | /ISSVCStartupTypeOptional |
Specifies the startup mode for the Integration Services service. |
| Reporting Services | /RSUPGRADEDATABASEACCOUNTOptional |
The property is only used when upgrading a SharePoint mode Report Server that is version 2008 R2 or earlier. Additional upgrade operations are performed for report servers that use the older SharePoint mode architecture, which was changed in SQL Server 2012 (11.x) Reporting Services. If this option isn't included with the command-line installation, the default service account for the old report server instance is used. If this property is used, supply the password for the account using the /RSUPGRADEPASSWORD property. |
| Reporting Services | /RSUPGRADEPASSWORDOptional |
Password of the existing Report Server service account. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
Add node parameters
Use the parameters in the following table to develop command-line scripts for AddNode.
| SQL Server Database Engine component | Parameter | Description |
|---|---|---|
| Database Engine Setup Control | /ACTIONRequired |
Required to indicate AddNode work flow. Supported value: AddNode |
| Database Engine Setup Control | /IACCEPTSQLSERVERLICENSETERMSRequired, when the /Q or /QS parameter is specified for unattended installations |
Required to acknowledge acceptance of the license terms. Beginning with SQL Server 2022 (16.x), read the Microsoft SQL Server Software License Terms at aka.ms/useterms. |
| Database Engine Setup Control | /ENUOptional |
Use this parameter to install the English version of SQL Server on a localized operating system when the installation media includes language packs for both English and the language corresponding to the operating system. |
| Database Engine Setup Control | /UpdateEnabledOptional |
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 includes updates that are found. |
| Database Engine Setup Control | /UpdateSourceOptional |
Specify the location where SQL Server Setup obtains 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 searches Microsoft Update or a Windows Update Service through the Windows Server Update Services. |
| Database Engine Setup Control | /CONFIGURATIONFILEOptional |
Specifies the configuration file to use. |
| Database Engine Setup Control | /HELP or ?Optional |
Displays usage options for the parameters. |
| Database Engine Setup Control | /INDICATEPROGRESSOptional |
Specifies that the verbose Setup log file is piped to the console. |
| Database Engine Setup Control | /INSTANCENAMERequired |
Specifies a SQL Server Database Engine instance name. For more information, see Installation Wizard help. |
| Database Engine Setup Control | /PIDOptional |
Specifies the product key for the edition of SQL Server. If this parameter isn't specified, Evaluation is used. Note: If you're installing SQL Server Express, SQL Server Express with Advanced Services, SQL Server Express with tools, SQL Server Developer, or SQL Server Evaluation, the PID is predefined. |
| Database Engine Setup Control | /Q or /QUIETOptional |
Specifies that Setup runs in a quiet mode without any user interface. This is used for unattended installations. The /Q parameter overrides the input of the /QS parameter. |
| Database Engine Setup Control | /QS or /QUIETSIMPLEOptional |
Specifies that Setup runs and shows progress through the UI, but doesn't accept any input or show any error messages. |
| Database Engine Setup Control | /HIDECONSOLEOptional |
Specifies that the console window is hidden or closed. |
| Database Engine Setup Control | /FAILOVERCLUSTERIPADDRESSESRequired |
Specifies an encoded IP address. The encodings are semicolon-delimited (;) and follow the format <IP Type>;<address>;<network name>;<subnet mask>. Supported IP types include DHCP, IPv4, and IPv6. You can specify multiple failover cluster IP addresses with a space in between. See the following examples: FAILOVERCLUSTERIPADDRESSES=DEFAULTFAILOVERCLUSTERIPADDRESSES=IPv4;DHCP;ClusterNetwork1FAILOVERCLUSTERIPADDRESSES=IPv6;DHCP;ClusterNetwork1FAILOVERCLUSTERIPADDRESSES=IPv6;2041:0:1a0f::8a5b:131cFor more information, see Add or remove nodes in a failover cluster instance (Setup). |
| Database Engine Setup Control | /CONFIRMIPDEPENDENCYCHANGERequired |
Indicates the consent to set the IP address resource dependency from OR to AND for multi-subnet failover clusters. For more information, see Add or remove nodes in a failover cluster instance (Setup). Supported values: - 0 = False (default)- 1 = True |
| SQL Server Agent | /AGTSVCACCOUNTRequired |
Specifies the account for the SQL Server Agent service. |
| SQL Server Agent | /AGTSVCPASSWORDRequired |
Specifies the password for SQL Server Agent service account. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| PolyBase Engine | /PBENGSVCACCOUNTOptional |
Specifies the account for the engine service. Default value: NT AUTHORITY\NETWORK SERVICE. |
| PolyBase Data Movement | /PBDMSSVCPASSWORDOptional |
Specifies the password for the data movement account. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| PolyBase Engine | /PBENGSVCSTARTUPTYPEOptional |
Specifies the startup mode for the PolyBase Engine service. Supported values: - Automatic (default)- Disabled- Manual |
| PolyBase | /PBPORTRANGEOptional |
Specifies a port range with at least six ports for PolyBase services. Example:/PBPORTRANGE=16450-16460 |
| PolyBase | /PBSCALEOUTOptional |
Specifies if the SQL Server Database Engine instance is used as a part of PolyBase Scale-out computational group. Use this option if you're configuring a PolyBase Scale-out computational group including the head node. Supported values: True, False |
| Analysis Services | /ASSVCACCOUNTRequired |
Specifies the account for the Analysis Services service. |
| Analysis Services | /ASSVCPASSWORDRequired |
Specifies the password for the Analysis Services service. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| SQL Server Database Engine | /SQLSVCACCOUNTRequired |
Specifies the startup account for the SQL Server service. |
| SQL Server Database Engine | /SQLSVCPASSWORDRequired |
Specifies the password for SQLSVCACCOUNT. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Integration Services | /ISSVCPASSWORDRequired |
Specifies the Integration Services password. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
| Reporting Services | /RSINSTALLMODEApplies to: SQL Server 2016 (13.x) and earlier versions Optional Available only on FilesOnlyMode |
Specifies the Install mode for Reporting Services. Supported values: - SharePointFilesOnlyMode- DefaultNativeMode- FilesOnlyModeNote: If the installation includes the SQL Server Database Engine, the default RSINSTALLMODE is DefaultNativeMode.If the installation doesn't include the SQL Server Database Engine, the default RSINSTALLMODE is FilesOnlyMode.If you choose DefaultNativeMode but the installation doesn't include the SQL Server Database Engine, the installation automatically changes the RSINSTALLMODE to FilesOnlyMode. |
| Reporting Services | /RSSVCPASSWORDApplies to: SQL Server 2016 (13.x) and earlier versions Required |
Specifies the password for the startup account for the Reporting Services service. This parameter can be omitted when using a managed service account, virtual account, or built-in account. |
Additional notes
The Database Engine and Analysis Services are the only components that are cluster-aware. Other features aren't cluster-aware and don't have high availability through failover.
Sample syntax
To add a node to an existing failover cluster instance with the Database Engine and Analysis Services.
setup.exe /q /ACTION=AddNode /INSTANCENAME="<Insert Instance Name>" /SQLSVCACCOUNT="<SQL account that is used on other nodes>" /SQLSVCPASSWORD="<password for SQL account>" /AGTSVCACCOUNT="<SQL Server Agent account that is used on other nodes>", /AGTSVCPASSWORD="<SQL Server Agent account password>" /ASSVCACCOUNT="<AS account that is used on other nodes>" /ASSVCPASSWORD="<password for AS account>" /INDICATEPROGRESS /IACCEPTSQLSERVERLICENSETERMS /FAILOVERCLUSTERIPADDRESSES="IPv4;xx.xxx.xx.xx;ClusterNetwork1;xxx.xxx.xxx.x" /CONFIRMIPDEPENDENCYCHANGE=0
Remove node parameters
Use the parameters in the following table to develop command-line scripts for RemoveNode. To uninstall a failover cluster, you must run RemoveNode on each failover cluster node. For more information, see Always On failover cluster instances (SQL Server).
| SQL Server Database Engine component | Parameter | Description |
|---|---|---|
| Database Engine Setup Control | /ACTIONRequired |
Required to indicate RemoveNode work flow. Supported value: RemoveNode |
| Database Engine Setup Control | /CONFIGURATIONFILEOptional |
Specifies the configuration file to use. |
| Database Engine Setup Control | /HELP or ?Optional |
Displays usage options for the parameters. |
| Database Engine Setup Control | /INDICATEPROGRESSOptional |
Specifies that the verbose Setup log file is piped to the console. |
| Database Engine Setup Control | /INSTANCENAMERequired |
Specifies a SQL Server Database Engine instance name. For more information, see Installation Wizard help. |
| Database Engine Setup Control | /Q or /QUIETOptional |
Specifies that Setup runs in a quiet mode without any user interface. This is used for unattended installations. The /Q parameter overrides the input of the /QS parameter. |
| Database Engine Setup Control | /QS or /QUIETSIMPLEOptional |
Specifies that Setup runs and shows progress through the UI, but doesn't accept any input or show any error messages. |
| Database Engine Setup Control | /HIDECONSOLEOptional |
Specifies that the console window is hidden or closed. |
| Database Engine Setup Control | /CONFIRMIPDEPENDENCYCHANGERequired |
Indicates the consent to set the IP address resource dependency from OR to AND for multi-subnet failover clusters. For more information, see Add or remove nodes in a failover cluster instance (Setup). Supported values: - 0 = False (default)- 1 = True |
Sample syntax
To remove a node from an existing failover cluster instance with the Database Engine and Analysis Services.
setup.exe /q /ACTION=RemoveNode /INSTANCENAME="<Insert Instance Name>" [/INDICATEPROGRESS] /CONFIRMIPDEPENDENCYCHANGE=0
Service account parameters
You can configure the SQL Server services by using a built-in account, local account, or domain account.
Note
When you use a managed service account, virtual account, or a built-in account, you shouldn't specify the corresponding password parameters. For more information about these service accounts, see Managed service accounts, group-managed service accounts, and virtual accounts.
For more information about service account configuration, see Configure Windows service accounts and permissions.
| SQL Server Database Engine component | Account parameter | Password parameter | Startup type |
|---|---|---|---|
| SQL Server Agent | /AGTSVCACCOUNT |
/AGTSVCPASSWORD |
/AGTSVCSTARTUPTYPE |
| Analysis Services | /ASSVCACCOUNT |
/ASSVCPASSWORD |
/ASSVCSTARTUPTYPE |
| SQL Server Database Engine | /SQLSVCACCOUNT |
/SQLSVCPASSWORD |
/SQLSVCSTARTUPTYPE |
| Integration Services | /ISSVCACCOUNT |
/ISSVCPASSWORD |
/ISSVCSTARTUPTYPE |
| Reporting Services | /RSSVCACCOUNT |
/RSSVCPASSWORD |
/RSSVCSTARTUPTYPE |
Note
Reporting Services features were removed from SQL Server 2017 (14.x). The account parameters for SQL Server Reporting Services are only applicable to versions prior to SQL Server 2017 (14.x).
Feature parameters
To install specific features, use the /FEATURES parameter and specify the parent feature or feature values in the following table.
For a list of features supported by the editions of SQL Server on Windows, see:
- Editions and supported features of SQL Server 2025 Preview
- Editions and supported features of SQL Server 2022
- Editions and supported features of SQL Server 2019
- Editions and supported features of SQL Server 2017
- Editions and supported features of SQL Server 2016
| Parent feature parameter | Feature parameter | Description |
|---|---|---|
| SQL | Installs the SQL Server Database Engine, Replication, Fulltext, and Data Quality Server. | |
| SQLEngine | Installs just the SQL Server Database Engine. | |
| Replication | Installs the Replication component along with SQL Server Database Engine. | |
| FullText | Installs the FullText component along with SQL Server Database Engine. | |
| DQ | Copies the files required for completing the Data Quality Server installation. After completing SQL Server installation, you must run the DQSInstaller.exe file to complete the Data Quality Server installation. For more information, see Run DQSInstaller.exe to Complete Data Quality Server Installation. This also installs SQL Server Database Engine. | |
| PolyBase | Installs PolyBase components. | |
| PolyBaseCore | Pair with PolyBase to install PolyBase technology that enables truly integrated querying across Oracle, Teradata, SQL Server and other relational and non-relational data using standard T-SQL statements.Applies to: SQL Server 2019 (15.x) and later versions |
|
| PolyBaseJava | In SQL Server 2019 (15.x) only, pair with PolyBase to install PolyBase Java Connector that enables truly integrated querying across HDFS data using standard T-SQL statements. |
|
| AdvancedAnalytics | Installs SQL Server Machine Learning Services or SQL Server 2016 R Services. | |
| SQL_INST_MR | Pair with AdvancedAnalytics to install R Open and proprietary R packages.Applies to: SQL Server Machine Learning Services (2017 and 2019) and SQL Server 2016 R Services |
|
| SQL_INST_MPY | Pair with AdvancedAnalytics to install Anaconda and proprietary Python packages.Applies to: SQL Server Machine Learning Services (2017 and 2019) |
|
| SQL_INST_JAVA | Pair with AdvancedAnalytics to install extensions that enable integration with Java using standard T-SQL statements.Applies to: SQL Server Java Language Extension (2019 only) |
|
| AS | Installs all Analysis Services components. | |
| RS | Installs all Reporting Services components. Applies to: SQL Server 2016 (13.x) and earlier versions |
|
| RS_SHP | Installs Reporting Services components for SharePoint. Applies to: SQL Server 2016 (13.x) and earlier versions |
|
| RS_SHPWFE | Installs Reporting Services Add-In for SharePoint products. Applies to: SQL Server 2016 (13.x) and earlier versions |
|
| DQC | Installs Data Quality Client. | |
| IS | Installs all Integration Services components. | |
| IS_Master | Includes Scale Out Master for Integration Services Scale Out. | |
| IS_Worker | Includes Scale Out Worker for Integration Services Scale Out. | |
| MDS | Installs Master Data Services. | |
| SQL_SHARED_MPY | Installs Python packages for Machine Learning Server (Standalone) or R Server (Standalone) | |
| SQL_SHARED_MR | Installs R packages for Machine Learning Server (Standalone) or R Server (Standalone) or Machine Learning Server (Standalone) or R Server (Standalone) | |
| Tools 1 | Installs client tools and SQL Server Books Online components. Applies to: SQL Server 2019 (15.x) and earlier versions |
|
| BC | Installs backward compatibility components. Applies to: SQL Server 2019 (15.x) and earlier versions |
|
| Conn | Installs connectivity components. Applies to: SQL Server 2019 (15.x) and earlier versions |
|
| DREPLAY_CTLR | Installs Distributed Replay controller. Applies to: SQL Server 2019 (15.x) and earlier versions |
|
| DREPLAY_CLT | Installs Distributed Replay client. Applies to: SQL Server 2019 (15.x) and earlier versions |
|
| SNAC_SDK | Installs SDK for SQL Server Native Client. Applies to: SQL Server 2019 (15.x) and earlier versions |
|
| SDK | Installs the software development kit. Applies to: SQL Server 2019 (15.x) and earlier versions |
|
| LocalDB** | Installs LocalDB, an execution mode of SQL Server Express targeted to program developers. |
1 SQL Server Management Studio (SSMS) is now in a standalone installer that is separate from the SQL Server installer. For details, see Install SQL Server Management Studio.
Feature parameter examples
| Parameter and values | Description |
|---|---|
/FEATURES=SQLEngine |
Installs the Database Engine without replication and full-text. |
/FEATURES=SQLEngine,FullText |
Installs the Database Engine and full-text. |
/FEATURES=SQL |
Installs the Database Engine, replication, and full-text. |
/FEATURES=SQLEngine,PolyBase |
Installs the Database Engine and the PolyBase engine. |
Role parameters
The setup role or /ROLE parameter is used to install a preconfigured selection of features. The SSAS roles install an SSAS instance in either an existing SharePoint farm, or a new unconfigured farm. Two setup roles are provided to support each scenario. You can only choose one setup role to install at a time. If you choose a setup role, Setup installs the features and components that belong to the role. You can't vary the features and components that are designated for that role. For more information about how to use the feature role parameter, see Install Power Pivot from the Command Prompt.
The AllFeatures_WithDefaults role is the default behavior for editions of SQL Server Express and reduces the number of dialog boxes presented to the user. It can be specified from the command line when installing a SQL Server edition that isn't SQL Server Express.
| Role | Description | Installs... |
|---|---|---|
SPI_AS_ExistingFarm |
Installs Analysis Services as a Power Pivot named instance on an existing SharePoint Server 2010 farm or standalone server. | Analysis Services calculation engine, preconfigured for in-memory data storage and processing. Power Pivot solution packages Installer program for the Power Pivot for Excel SQL Server Books Online |
SPI_AS_NewFarm |
Installs Analysis Services and Database Engine as a Power Pivot named instance on a new, unconfigured Office SharePoint Server 2010 farm or standalone server. SQL Server Setup configures the farm during feature role installation. | Analysis Services calculation engine, preconfigured for in-memory data storage and processing. Power Pivot solution packages SQL Server Books Online Database Engine Configuration Tools SQL Server Management Studio |
AllFeatures_WithDefaults |
Installs all features that are available with the current edition. Adds the current user to the SQL Server sysadmin fixed server role. On Windows Server 2008 or higher and when the operating system isn't a domain controller, the Database Engine, and Reporting Services are defaulted to use the NT AUTHORITY\NETWORK SERVICE account, and Integration Services is defaulted to use the NT AUTHORITY\NETWORK SERVICE account.This role is enabled by default in editions of SQL Server Express. For all other editions, this role isn't enabled but can be specified through the UI or with command-line parameters. |
For editions of SQL Server Express, installs only those features available in the edition. For other editions, installs all SQL Server features. The AllFeatures_WithDefaults parameter can be combined with other parameters that override the AllFeatures_WithDefaults parameter settings. For example, using the AllFeatures_WithDefaults parameter and the /Features=RS parameter overrides the command to install all features and only installs Reporting Services, but honors the AllFeatures_WithDefaults parameter to use the default service account for Reporting Services.When using the AllFeatures_WithDefaults parameter along with the /ADDCURRENTUSERASSQLADMIN=FALSE the provisioning dialog isn't auto populated with the current user. Add /AGTSVCACCOUNT and /AGTSVCPASSWORD to specify a service account and password for the SQL Server Agent. |
Control failover behavior using the /FAILOVERCLUSTERROLLOWNERSHIP parameter
To upgrade a SQL Server Database Engine failover cluster, you must run the Setup on one failover cluster node at a time, starting with the passive nodes. Setup determines when to fail over to the upgraded node, depending on the total number of nodes in the failover cluster instance, and the number of nodes that have already been upgraded. When half of the nodes or more have already been upgraded, Setup by default causes a failover to an upgraded node.
To control the failover behavior of cluster nodes during the upgrade process, run the upgrade operation at the command line and use the /FAILOVERCLUSTERROLLOWNERSHIP parameter to control the failover behavior before the upgrade operation takes the node offline. Use of this parameter is as follows:
/FAILOVERCLUSTERROLLOWNERSHIP=0doesn't roll cluster ownership (move group) to upgraded nodes, and doesn't add this node to the list of possible owners of the SQL Server cluster at the end of upgrade./FAILOVERCLUSTERROLLOWNERSHIP=1rolls cluster ownership (move group) to upgraded nodes, and adds this node to the list of possible owners of the SQL Server cluster at the end of upgrade./FAILOVERCLUSTERROLLOWNERSHIP=2is the default setting. It's used if this parameter isn't specified. This setting indicates that SQL Server Setup manages cluster ownership (move group) as needed.
Instance ID or InstanceID configuration
The Instance ID or /InstanceID parameter is used for specifying where you can install the instance components and the registry path of the instance. The value of INSTANCEID is a string and should be unique.
- SQL Instance ID:
MSSQLxx.<INSTANCEID> - AS Instance ID:
MSASxx.<INSTANCEID> - RS Instance ID:
MSRSxx.<INSTANCEID>
The instance-aware components are installed to the following locations:
%Program Files%\Microsoft SQL Server\<SQLInstanceID>%Program Files%\Microsoft SQL Server\<ASInstanceID>%Program Files%\Microsoft SQL Server\<RSInstanceID>
Note
If INSTANCEID isn't specified on the command line, then by default Setup substitutes <INSTANCEID> with the <INSTANCENAME>.