SQL Server 安装时,需要在各个安装窗口进行选择和设置,若需要在多台服务器安装相同的数据库,静默安装是比较省事的。
当安装 SQL Server  到最后一步,会有一个安装配置文件 ConfigurationFile.ini
该文件记录了前面步骤的设置,汇总到该配置文件中。如下:(此示例是在域中安装且使用域管理员作为相关账户)
;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"
此配置文件是通过UI操作的,不适于静默安装,需要修改写配置。 
如当前自己用虚拟机测试的集群中独立安装MSSQL,虚拟机不做什么要求,在其他节点都执行相同的配置文件静默安装sql server。
其中修改如下:
; SQL Server 2012 Configuration File
; 参考:https://msdn.microsoft.com/zh-cn/library/ms144259.aspx
[OPTIONS]
; ACTION 可选为 INSTALL(安装), UNINSTALL(卸载), UPGRADE(升级)
ACTION="Install"
; 【新增】必需,用于确认接受许可条款,静默安装用。
IACCEPTSQLSERVERLICENSETERMS
; 【新增】产品密钥。 如果未指定此参数,则使用 Evaluation。
PID="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" 
; 在已本地化的操作系统上安装英文版的 SQL Server。
ENU="True"
; 【注释】UIMODE 可选为Normal,AutoAdvance (UIMode 设置不能与 /Q (QUIET)或 /QS(QUIETSIMPLE)参数结合使用)
; Normal : 非 Express 版本,所选的功能提供其所有安装程序对话框。
; AutoAdvance : 对于 Express 版本是默认值,它跳过不重要的对话框
; UIMODE="Normal"
; 【注释】是否静默安装,静默安装不显示用户交互界面.QUIET 与 QUIETSIMPLE 二选一
; QUIET="True"
; 是否只显示进度(最后一步安装进度),不显示用户交互界面。静默安装还是显示进度吧。
QUIETSIMPLE="True"
; 是否应发现和包含产品更新,不更新。
UpdateEnabled="False"
; 安装的功能,此为 MSSQL存储引擎 和 SSMS管理工具
FEATURES=SQLENGINE,SSMS,ADV_SSMS
; SQL Server 安装程序将获取产品更新的位置( .\MyUpdates)
UpdateSource="MU"
; 显示安装参数的用法选项,不显示
HELP="False"
; 指定是否将详细的安装日志文件传送到控制台。(此禁用或只看进度即可 QUIETSIMPLE="True")
; 安装过程日志信息:C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log
INDICATEPROGRESS="True"
; 是否允许32位程序安装到64位系统上(WOW64)
X86="False"
; 为 64 位共享组件指定一个非默认安装目录。
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
; 为 32 位共享组件指定一个非默认安装目录。 仅在 64 位系统上受支持。
INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"
; 实例名称
INSTANCENAME="MSSQLSERVER"
; 实例ID
INSTANCEID="MSSQLSERVER"
; 是否收集使用数据发送到 Microsoft(是:1 or True;否:0 or False )
SQMREPORTING="False"
; 是否将错误反馈发送到 Microsoft(是:1 or True;否:0 or False )
ERRORREPORTING="False"
; 安装目录
INSTANCEDIR="C:\Program Files\Microsoft SQL Server"
; 【新增】代理服务账户(新增密码项)
AGTSVCACCOUNT="KK\dcadmin"
AGTSVCPASSWORD="dcadmin"
; 代理启动模式,设置自动
AGTSVCSTARTUPTYPE="Automatic"
; CM 程序块 TCP 通信端口(未知)
COMMFABRICPORT="0"
; 矩阵如何使用专用网络(未知)
COMMFABRICNETWORKLEVEL="0"
; 如何保护程序块间的通信(未知)
COMMFABRICENCRYPTION="0"
; CM 程序块使用的 TCP 端口(未知)
MATRIXCMBRICKCOMMPORT="0"
; SQL Server 引擎服务的启动模式
SQLSVCSTARTUPTYPE="Automatic"
; FILESTREAM 是否启用,值为 (0, 1, 2 or 3). 
FILESTREAMLEVEL="0"
; 为 SQL Server Express 安装启用运行身份凭据。
ENABLERANU="False"
; SQL Server 的排序规则设置
SQLCOLLATION="Chinese_PRC_CI_AS"
; 【新增】SQL Server 服务的启动帐户(新增密码项)
SQLSVCACCOUNT="KK\dcadmin"
SQLSVCPASSWORD="dcadmin"
; 指定 Windows 账户作为数据库管理员
SQLSYSADMINACCOUNTS="KK\dcadmin" "Administrator"
; 【新增】SQL授权模式,"SQL"为混合授权,需设置密码(新增密码项)
SECURITYMODE="SQL"
SAPWD="dcadmin"
; 【注释】当前用户作为数据库管理员(对于 SQL Server Express 版本为 True,其他未true)
; ADDCURRENTUSERASSQLADMIN="True"
; 指定 SQL Server 服务的 TCP 协议的状态(0:禁用;1:启用)
TCPENABLED="1"
; 指定 SQL Server 服务的 Named Pipes 协议的状态(0:禁用;1:启用)
NPENABLED="0"
; SQL Server Browser 服务的启动模式,禁用。
BROWSERSVCSTARTUPTYPE="Disabled"
修改完成后,进入 mssql 安装目录, 执行 setup.exe 安装:
.\setup.exe /CONFIGURATIONFILE="C:\PerfLogs\ConfigurationFile.ini"
 
等待完成即可,若出现中断,查看安装日志什么错误。
C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log
此外,还可以单独设置数据文件的数据目录(INSTALLSQLDATADIR)等
--------------------- 
作者:薛定谔的DBA 
来源:CSDN 
原文:https://blog.csdn.net/kk185800961/article/details/62979524 
版权声明:本文为博主原创文章,转载请附上博文链接!
												
												
								- SQL Server  2012安装图文教程
		解析SQL Server 2012安装中心 当系统打开"SQL Server安装中心",则说明我们可以开始正常的安装SQL Server 2012了. SQL Server安装中心 ... 
- SQL Server下载安装
		参考下载http://www.orsoon.com/Soft/148976.html 安装教程 解压压缩文件,得到安装程序,运行安装程序(如下图) 2..点击左侧的"安装",选择& ... 
- SQL Server 2012 安装图解教程
		在安装微软最新数据库SQL Server 2012之前,编者先确定一下安装环境:Windonws 7 SP1,32位操作系统.CPU是2.1GHz赛扬双核T3500,内存2.93GB 安装SQL Se ... 
- SQL Server 2008 安装过程中遇到“性能计数器注册表配置单元一致性”检查失败 问题的解决方法
		操作步骤: 1. 在 Microsoft Windows 2003 或 Windows XP 桌面上,依次单击"开始"."运行",然后在"打开&quo ... 
- SQL Server 2008安装过程中的一些问题和心得
		开博客已经好久了,但一直没有用起来,也有很多"老人"劝诫我,好记性不如烂笔头,于是一年后的我重拾博客,打算记录一些我在计算机方面遇到的一些问题和心得. 前几天重装了Win10系统, ... 
- SQL Server 2012 安装
		SQL Server 2012 安装过程很漫长, 里面很多界面不一一截取了,我分别在win7 企业版 64位 和 win10专业版SP1 64位 装了SQL Server 2012 ,都没有问题. 1 ... 
- SQL SERVER 2014 安装图解(含 SQL SERVER 2014 安装程序共享)
		开篇介绍 2015年1月1日,新的一年开始之际,本来应该好好做点有意义的事情来跨个年的.结果,老习惯 - 睡觉之前一定要折腾一下电脑,说干就干,给新到的 DELL 电脑装虚机,下载 SQL SERVE ... 
- SQL Server 2005 安装图解教程(Windows)
		因工作需要,好久未安装SQL Server2005,今天安装了一下,特此写下安装步骤留下笔记. 安装前准备: 先安装IIS,再安装SQL Server2005 一.安装 点击安装,如下图: 选择操作系 ... 
- win7 MS SQL SERVER 2000安装
		http://blog.chinaunix.net/uid-24398518-id-2156226.html MicrosoftInternetExplorer402DocumentNotSpecif ... 
随机推荐
	
									- 【转】DSP动态内存分配函数的使用
			DSP里的动态内存分配,其分配的内存区域在在堆(heap)中.同时DSP里动态分配内存的函数还有calloc以及reclloc.这些动态分配的内存放置在.system段的全局池或堆(heap)中.因此 ... 
- hive 外部表和内部表的区别和相互转换
			Hive内部表和外部表区别 1.创建内部表时,内部表的数据文件是保存在指定的路径的:如若创建外部表,则只记录数据所在的路径,不会对数据位置做改变. 2.删除表的时候,内部表元数据和数据会跟着一起删除. ... 
- request-html 登陆百度
			import asyncio from requests_html import HTMLSession url = 'https://passport.baidu.com/v2/?login& ... 
- Bash基础——工作管理(Job control)
			注:1.这里说的Bash不单纯的指Bash,泛指shell 2.这里的后台指的是Bash下面避免任务(Jobs)被Ctrl+C中断的一种场景,与我们说的deamon那种后台工作的进程不是一个概念,注意 ... 
- C++(三十六) — 等号操作符重载、&&,||不可重载
			1.等号操作符重载,实现深拷贝 //等号运算符重载 // obj3=obj1;//原始的是浅拷贝,现在要重载为深拷贝 Name& operator=(Name &obj1) { //1 ... 
- VueCli3 使用 NutUI (按需加载、定制化主题)
			创建vue.config.js module.exports = { css: { loaderOptions: { // 给 sass-loader 传递选项 scss: { // @/ 是 src ... 
- 【独家】K8S漏洞报告 | CVE-2019-1002101解读
			kubectl cp漏洞CVE-2019-1002101分析 Kube-proxy IPVS添加flag ipvs-strict-arp 近期bug fix数据分析 ——本期更新内容 kubectl  ... 
- jquery复杂节点获取
			jquery.find方法 1 $("div").find(".1").css({"color":"red"," ... 
- [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.
			使用idea连接数据库的时候,报错为 [08001] Could not create connection to database server. Attempted reconnect 3 tim ... 
- Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range value for column 'phone' at row 1
			Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range value for column 'phone ...