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 静默安装的更多相关文章

  1. SQL Server 2012安装图文教程

    解析SQL Server 2012安装中心 当系统打开"SQL Server安装中心",则说明我们可以开始正常的安装SQL Server 2012了. SQL Server安装中心 ...

  2. SQL Server下载安装

    参考下载http://www.orsoon.com/Soft/148976.html 安装教程 解压压缩文件,得到安装程序,运行安装程序(如下图) 2..点击左侧的"安装",选择& ...

  3. SQL Server 2012 安装图解教程

    在安装微软最新数据库SQL Server 2012之前,编者先确定一下安装环境:Windonws 7 SP1,32位操作系统.CPU是2.1GHz赛扬双核T3500,内存2.93GB 安装SQL Se ...

  4. SQL Server 2008 安装过程中遇到“性能计数器注册表配置单元一致性”检查失败 问题的解决方法

    操作步骤: 1. 在 Microsoft Windows 2003 或 Windows XP 桌面上,依次单击"开始"."运行",然后在"打开&quo ...

  5. SQL Server 2008安装过程中的一些问题和心得

    开博客已经好久了,但一直没有用起来,也有很多"老人"劝诫我,好记性不如烂笔头,于是一年后的我重拾博客,打算记录一些我在计算机方面遇到的一些问题和心得. 前几天重装了Win10系统, ...

  6. SQL Server 2012 安装

    SQL Server 2012 安装过程很漫长, 里面很多界面不一一截取了,我分别在win7 企业版 64位 和 win10专业版SP1 64位 装了SQL Server 2012 ,都没有问题. 1 ...

  7. SQL SERVER 2014 安装图解(含 SQL SERVER 2014 安装程序共享)

    开篇介绍 2015年1月1日,新的一年开始之际,本来应该好好做点有意义的事情来跨个年的.结果,老习惯 - 睡觉之前一定要折腾一下电脑,说干就干,给新到的 DELL 电脑装虚机,下载 SQL SERVE ...

  8. SQL Server 2005 安装图解教程(Windows)

    因工作需要,好久未安装SQL Server2005,今天安装了一下,特此写下安装步骤留下笔记. 安装前准备: 先安装IIS,再安装SQL Server2005 一.安装 点击安装,如下图: 选择操作系 ...

  9. win7 MS SQL SERVER 2000安装

    http://blog.chinaunix.net/uid-24398518-id-2156226.html MicrosoftInternetExplorer402DocumentNotSpecif ...

随机推荐

  1. vue-cli脚手架——3.0版本项目案例

    一.[准备工作] node与git部分见vue-cli2.0搭建案例 vue-cli3.0是一个基于 Vue.js 进行快速开发的完整系统.有三个组件: CLI:@vue/cli 全局安装的 npm ...

  2. django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17)

    https://blog.csdn.net/qq_39969226/article/details/92218635

  3. Cephfs 部署 创建 metadata 池 data池

    上一次部署了ceph分布式存储,接下来我们部署ceph的文件系统.Ceph文件系统至少需要两个RADOS池,一个用于数据,一个用于元数据. 创建metadata 池 后面数字表示 PG 和pgp数 c ...

  4. Python——函数&作用域

    我们前面学的都是面向过程式的编程(代码从上到下写,并运行),而函数式编程是将繁杂的代码通过整理特性进行规整.像图书馆一样,将小说.教学.外文等书籍进行分类.让编程人员或看代码人员很容易的查看该段代码的 ...

  5. ISCC之Re1

    IDA打开,调试选ELF,跟踪main函数 发现有一个not_the_flag函数,跟进去 这里判断了一下a1的值是否为42,大致判断引号里面的有可能是flag,直接放到Linux下运行 提交不要有任 ...

  6. 装新的python3.7时ModuleNotFoundError: No module named '_ctypes'

    在编译安装新的python3.7的时候 报错 ModuleNotFoundError: No module named '_ctypes',其实是缺少了一个新需要的开发包libffi-devel,安装 ...

  7. 最新my.cnf可用于5.6&5.7

    [MySQL]prompt = [\\u@\\h][\\d]>\\_  #自定义登录提示信息 [mysqld]#基本设置#user = mysql #用户名sql_mode =“STRICT_T ...

  8. svn: local unversioned, incoming file add upon update

    svn 文件冲突: D C 文件名 > local unversioned, incoming file add upon update svn revert 文件名 提示: 已恢复“文件名” ...

  9. Java - 框架之 SpringMVC

    一. 简单配置 (XML) 1. web.xml <?xml version="1.0" encoding="UTF-8"?> <web-ap ...

  10. JQuery购物车多物品数量的加减+总价计算

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...