SQL Server silent installation

When SQL Server is installed, you need to select and set various installation window, if you need to install the same database across multiple servers, the silent installation is relatively easy.
When installing SQL Server to the last step, there will be an installation configuration file ConfigurationFile.ini
The file record set the previous step, to the aggregated profile. This example is as follows :( mounted domain and domain administrator as a related account)
;SQL Server 2012 Configuration File
[OPTIONS]
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.
ACTION="Install"
; Detailed help for command line argument ENU has not been defined yet.
ENU="True"
; Parameter that controls the user interface behavior. Valid values are Normal for the full UI,AutoAdvance for a simplied UI, and EnableUIOnServerCore for bypassing Server Core setup GUI block.
UIMODE="Normal"
; Setup will not display any user interface.
QUIET="False"
; Setup will display progress only, without any user interaction.
QUIETSIMPLE="False"
; Specify whether SQL Server Setup should discover and include product updates. The valid values are True and False or 1 and 0. By default SQL Server Setup will include updates that are found.
UpdateEnabled="True"
; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, MDS, and Tools. The SQL feature will install the Database Engine, Replication, Full-Text, and Data Quality Services (DQS) server. The Tools feature will install Management Tools, Books online components, SQL Server Data Tools, and other shared components.
FEATURES=SQLENGINE,SSMS,ADV_SSMS
; Specify the location where SQL Server Setup will obtain product updates. The valid values are "MU" to search Microsoft Update, a valid folder path, a relative path such as .\MyUpdates or a UNC share. By default SQL Server Setup will search Microsoft Update or a Windows Update service through the Window Server Update Services.
UpdateSource="MU"
; Displays the command line parameters usage
HELP="False"
; Specifies that the detailed Setup log should be piped to the console.
INDICATEPROGRESS="False"
; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system.
X86="False"
; Specify the root installation directory for shared components.  This directory remains unchanged after shared components are already installed.
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
; Specify the root installation directory for the WOW64 shared components.  This directory remains unchanged after WOW64 shared components are already installed.
INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"
; Specify a default or named instance. MSSQLSERVER is the default instance for non-Express editions and SQLExpress for Express editions. This parameter is required when installing the SQL Server Database Engine (SQL), Analysis Services (AS), or Reporting Services (RS).
INSTANCENAME="MSSQLSERVER"
; Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will incorporate the instance ID of the SQL Server instance.
INSTANCEID="MSSQLSERVER"
; Specify that SQL Server feature usage data can be collected and sent to Microsoft. Specify 1 or True to enable and 0 or False to disable this feature.
SQMREPORTING="False"
; Specify if errors can be reported to Microsoft to improve future SQL Server releases. Specify 1 or True to enable and 0 or False to disable this feature.
ERRORREPORTING="False"
; Specify the installation directory.
INSTANCEDIR="C:\Program Files\Microsoft SQL Server"
; Agent account name
AGTSVCACCOUNT="KK\dcadmin"
; Auto-start service after installation. 
AGTSVCSTARTUPTYPE="Automatic"
; CM brick TCP communication port
COMMFABRICPORT="0"
; How matrix will use private networks
COMMFABRICNETWORKLEVEL="0"
; How inter brick communication will be protected
COMMFABRICENCRYPTION="0"
; TCP port used by the CM brick
MATRIXCMBRICKCOMMPORT="0"
; Startup type for the SQL Server service.
SQLSVCSTARTUPTYPE="Automatic"
; Level to enable FILESTREAM feature at (0, 1, 2 or 3).
FILESTREAMLEVEL="0"
; Set to "1" to enable RANU for SQL Server Express.
ENABLERANU="False"
; Specifies a Windows collation or an SQL collation to use for the Database Engine.
SQLCOLLATION="Chinese_PRC_CI_AS"
; Account for SQL Server service: Domain\User or system account.
SQLSVCACCOUNT="KK\dcadmin"
; Windows account(s) to provision as SQL Server system administrators.
SQLSYSADMINACCOUNTS="KK\dcadmin" "Administrator"
; The default is Windows Authentication. Use "SQL" for Mixed Mode Authentication.
SECURITYMODE="SQL"
; Provision current user as a Database Engine system administrator for SQL Server 2012 Express.
ADDCURRENTUSERASSQLADMIN="False"
; Specify 0 to disable or 1 to enable the TCP/IP protocol.
TCPENABLED="1"
; Specify 0 to disable or 1 to enable the Named Pipes protocol.
NPENABLED="0"
; Startup type for Browser Service.
BROWSERSVCSTARTUPTYPE = "Disabled"
This profile is operated by UI, is not suitable for silent installation, you need to modify write configuration.
If the current test yourself with a virtual machine in the cluster stand-alone installation MSSQL, virtual machines do not do what is required, perform the same configuration file in another node silent install sql server.
Which amended as follows:
; SQL Server 2012 Configuration File
; 参考:https://msdn.microsoft.com/zh-cn/library/ms144259.aspx
[OPTIONS]
; The ACTION optionally the INSTALL (installed), UNINSTALL (unloaded), UPGRADE (upgrade)
ACTION="Install"
; [New] required to confirm acceptance of the license terms, silent installation.
IACCEPTSQLSERVERLICENSETERMS
; [New] product key. If this parameter is not specified, the Evaluation.
PID="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
; Install the English version of SQL Server on a localized operating system.
ENU="True"
; [Note] UIMODE optionally Normal, AutoAdvance (UIMode parameter setting can not be used in conjunction with a / Q (QUIET) or / the QS (QUIETSIMPLE))
; Normal: non-Express version, which provides all the functions selected Setup dialog box.
; AutoAdvance: For the Express version is the default, it skips the unimportant dialog
; UIMODE="Normal"
; [Note] if a silent installation, silent installation does not display the user interface .QUIET QUIETSIMPLE second election
; QUIET="True"
; Show only progress (the last step progress of the installation), do not display the user interface. Silent installation or display a progress bar.
QUIETSIMPLE="True"
; Whether they should discover and include product updates, does not update.
UpdateEnabled="False"
; Install, this storage engine for the MSSQL and SSMS management tools
FEATURES=SQLENGINE,SSMS,ADV_SSMS
; SQL Server Setup will obtain the location of the product update (\ MyUpdates.)
UpdateSource="MU"
; Displays the usage options for installation parameters, do not show
HELP="False"
; Specifies whether detailed installation log files to the console. (This can be disabled or just look at the progress = QUIETSIMPLE "True")
; installation log: C: \ Program Files \ Microsoft SQL Server \ 110 \ Setup Bootstrap \ Log
INDICATEPROGRESS="True"
; Whether to allow 32 to install the system 64 (the WOW64)
X86="False"
; 64-bit shared components specified a non-default installation directory.
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
; 32-bit shared components specified a non-default installation directory. Only on 64-bit systems are supported.
INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"
; Instance name
INSTANCENAME="MSSQLSERVER"
; Instance ID
INSTANCEID="MSSQLSERVER"
; Whether to send usage data collection The Microsoft (a: 1 or True; No: 0 or False)
SQMREPORTING="False"
; Whether the error feedback to Microsoft (is: 1 or True; No: 0 or False)
ERRORREPORTING="False"
; installation manual
INSTANCEDIR="C:\Program Files\Microsoft SQL Server"
; [New] Agent service account (new password entry)
AGTSVCACCOUNT="KK\dcadmin"
AGTSVCPASSWORD="dcadmin"
; Agent startup mode, automatic
AGTSVCSTARTUPTYPE="Automatic"
; TCP port the CM block (unknown)
COMMFABRICPORT="0"
; How matrix private network (Unknown)
COMMFABRICNETWORKLEVEL="0"
; How to protect communications between the block (unknown)
COMMFABRICENCRYPTION="0"
; The CM using TCP port block (unknown)
MATRIXCMBRICKCOMMPORT="0"
; SQL Server engine service startup mode
SQLSVCSTARTUPTYPE="Automatic"
; The FILESTREAM is enabled, a value of (0, 1, 2 or 3).
FILESTREAMLEVEL="0"
; Enable identity credentials for running SQL Server Express installation.
ENABLERANU="False"
; Collation settings for SQL Server
SQLCOLLATION="Chinese_PRC_CI_AS"
; [New] SQL Server service startup account (new password entry)
SQLSVCACCOUNT="KK\dcadmin"
SQLSVCPASSWORD="dcadmin"
; Windows account specified as a database administrator
SQLSYSADMINACCOUNTS="KK\dcadmin" "Administrator"
; [New] SQL authorization mode, "SQL" mixed authorization is required to set a password (new password entry)
SECURITYMODE="SQL"
SAPWD="dcadmin"
; [Note] as the current user database administrator (for SQL Server Express editions True, the other is not true)
; ADDCURRENTUSERASSQLADMIN="True"
; Specify the TCP protocol SQL Server service status (0: Disabled; 1: Enabled)
TCPENABLED="1"
; Specify the Named Pipes protocol SQL Server service status (0: Disabled; 1: Enabled)
NPENABLED="0"
; Startup mode SQL Server Browser service is disabled.
BROWSERSVCSTARTUPTYPE = "Disabled"
After editing, enter mssql installation directory, run setup.exe installation:

.\setup.exe /CONFIGURATIONFILE="C:\PerfLogs\ConfigurationFile.ini"
 
Waiting to complete, if there is an interruption to view the installation log any errors.
C: \ Program Files \ Microsoft SQL Server \ 110 \ Setup Bootstrap \ Log
You can also set up a separate data directory data file (INSTALLSQLDATADIR), etc.
---------------------
Author: DBA Schrodinger
Source: CSDN
Original: https: // blog.csdn.net/kk185800961/article/details/62979524
Disclaimer: This article is a blogger original article, reproduced, please attach Bowen link!

Guess you like

Origin www.cnblogs.com/accumulater/p/11226254.html