SQL Server 2012 Unattended Installation

1, mounted by specified parameters strip

 

  1.  
    setup.exe /Q /IACCEPTSQLSERVERLICENSETERMS /ACTION= install /PID=<validpid> /FEAT
  2.  
    URES= SQL,AS,RS,IS,Tools
  3.  
    /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT= "MyDomain\MyAccount"
  4.  
    /SQLSVCPASSWORD= "************" /SQLSYSADMINACCOUNTS="MyDomain\MyAccount "
  5.  
    /AGTSVCACCOUNT= "MyDomain\MyAccount" /AGTSVCPASSWORD="************"
  6.  
    /ASSVCACCOUNT= "MyDomain\MyAccount" /ASSVCPASSWORD="************"
  7.  
    /RSSVCACCOUNT= "MyDomain\MyAccount" /RSSVCPASSWORD="************"
  8.  
    /ISSVCAccount= "MyDomain\MyAccount" /ISSVCPASSWORD="************"
  9.  
    /ASSYSADMINACCOUNTS= "MyDomain\MyAccount"

 

 

  • Method 2, the installation configuration file specifies

 

  1.  
    I:\>Setup.exe /ConfigurationFile="d:\ConfigurationFile.ini"
  2.  
    Microsoft (R) SQL Server 2012 11.00.2100.60
  3.  
    All copyright (c) Microsoft Corporation. All rights reserved.

 


Another method of installation.

 

Here is my profile, to join sql server instance named I01 2012. ; A stare, like

 

 

  1.  
    ; Required to acknowledge acceptance of the license terms.
  2.  
    IACCEPTSQLSERVERLICENSETERMS="True"

note

;UIMODE="False"

 

 

  1.  
    note
  2.  
    Choose one, or else an error
  3.  
    ; Setup will not be displayed regardless of what the user interface.
  4.  
     
  5.  
    QUIET="False"
  6.  
     
  7.  
    ; Setup will only display the progress of the run without user interaction, no matter what the need.

QUIETSIMPLE="True"<

 

 

  1.  
    Note; the default is Windows Authentication. Use "SQL" represents a mixed mode authentication.
  2.  
     
  3.  
    SECURITYMODE="SQL"
  4.  
    SAPWD="1qaz2WSX"

 

 

Here is the complete file,

 

  1.  
    ;SQL Server 2012 Configuration File
  2.  
    [OPTIONS]
  3.  
    ; Required to acknowledge acceptance of the license terms.
  4.  
    IACCEPTSQLSERVERLICENSETERMS="True"
  5.  
    ; Workflow specified installer. As the INSTALL, The UNINSTALL or UPGRADE.

This is a required parameter. ACTION = "Install"; yet there is no specific definition of command line parameters help of ENU. ENU = "False"; a parameter for controlling a user interface behavior.

Valid values ​​for the complete UI for the Normal, as for the simplified UI AutoAdvance, is skipped EnableUIOnServerCore Setup Server Core GUI block.

; UIMODE = "False"; Setup will not be displayed regardless of what the user interface.

QUIET = "False"; Setup will only display the progress of the run. No matter what user interaction without the need to.

QUIETSIMPLE = "True"; specify whether SQL Server Setup should discover and include product updates.

Valid values ​​are True and False and 0 or 1. By default, SQL Server Setup will include updates found.

UpdateEnabled = "False"; Specify where to install, uninstall or upgrade features. Top features list includes SQL, AS, RS, IS, MDS and tools. SQL feature will be installed database engine, replication, full-text and Data Quality Services (DQS) server.

Tools feature will install the management tools, Books Online components, SQL Server Data Tools and other shared components. FEATURES = SQLENGINE, REPLICATION, FULLTEXT, DQ; specify the SQL Server Setup will obtain the location of the product update. Valid values ​​are "MU" (to search for product updates), and effectively folder path. \ MyUpdates relative path or UNC shared folders and the like. By default, SQL Server Setup searches Microsoft Update or Windows Update service by Window Server Update Services. UpdateSource = "MU"; Display command line parameters to use HELP = "False"; specify that a particular setup log to the console.

INDICATEPROGRESS = "False"; to specify the installation program should be installed in WOW64. IA64 or 32-bit systems do not support this command line parameters. X86 = "False"; mount the root file folder of the specified shared components. After the shared components are installed. This folder remains unchanged. INSTALLSHAREDDIR = "C: \ Program Files \ Microsoft SQL Server"; WOW64 installation root file specifies the shared components folder. After WOW64 shared components are installed, the folder remains unchanged.

INSTALLSHAREDWOWDIR = "C: \ Program Files (x86) \ Microsoft SQL Server"; specify a default or named instance. The default instance MSSQLSERVER non-Express version number, SQLExpress is the default instance Express version number.

Installing SQL Server Database Engine (SQL), while Analysis Services (AS) or Reporting Services (RS), this parameter is required. INSTANCENAME = "I01"; as you have specified SQL Server functions specified instance ID. SQL Server folder structure, registry structure, and service names will contain the instance ID of SQL Server.

INSTANCEID = "I01"; able to collect the specified SQL Server feature usage data. And sends the data to Microsoft.

Specify 1 or True to enable this feature. Specify 0 or False to disable this feature.

SQMREPORTING = "False"; Specifies whether error reports to Microsoft in order to improve future SQL Server version number. Specify 1 or True to enable this feature. Specify 0 or False to disable this feature. ERRORREPORTING = "False"; Specifies the installation folder. INSTANCEDIR = "e: \ Program Files \ Microsoft SQL Server"; Acting account name AGTSVCACCOUNT = "NT Service \ SQLAgent $ I01"; after installation to start the service on their own initiative.

AGTSVCSTARTUPTYPE = "Manual"; CM block TCP communication port COMMFABRICPORT = "0"; matrix how to use the private network COMMFABRICNETWORKLEVEL = "0"; how to protect a communication COMMFABRICENCRYPTION = "0" between the blocks; the CM block using TCP port MATRIXCMBRICKCOMMPORT = "0"; startup type SQL Server services. SQLSVCSTARTUPTYPE = "Manual"; Enable level (1, 2 or 3) FILESTREAM feature. FILESTREAMLEVEL = "0"; is set to "1" to enable RANU to SQL Server Express. ENABLERANU = "False"; Specifies the collation for Windows collation or SQL database engine. SQLCOLLATION = "Chinese_PRC_CI_AS"; accounts SQL Server services: domain \ user or system account.

SQLSVCACCOUNT = "NT Service \ MSSQL $ I01"; To set the SQL Server system administrator's Windows account. SQLSYSADMINACCOUNTS = "ADMINISTRATOR"; the default is Windows Authentication. Use "SQL" represents a mixed mode authentication.

SECURITYMODE = "SQL" SAPWD = "1qaz2WSX"; the current user to SQL Server 2012 Express database engine systems administrator. ADDCURRENTUSERASSQLADMIN = "False"; Specify 0 to disable the TCP / IP protocol, specify the protocol is enabled 1. TCPENABLED = "1"; 0 disables the specified Named Pipes protocol, the protocol specifies an enabled. NPENABLED = "0"; Browser startup type of service. BROWSERSVCSTARTUPTYPE = "Manual"; description add input parameters FTSVCACCOUNT narrative FTSVCACCOUNT = "NT Service \ MSSQLFDLauncher $ I01"

1 mount the mirror

 

2 enter the command line:

 

 

3 Do
I: \> Setup.exe /ConfigurationFile="d:\ConfigurationFile.ini "

4 installed

How quickly write the configuration file, the installation process by ui changes wizard, pepole first profile. Path configuration saved in the figure below, for example, open it and change it

Join

 

  1.  
    ; Required to acknowledge acceptance of the license terms.
  2.  
    IACCEPTSQLSERVERLICENSETERMS="True"

Ui do not show

;UIMODE="False"
  1.  
    note
  2.  
    pick one of two. Otherwise error
  3.  
    ; Setup will not be displayed regardless of what the user interface.
  4.  
     
  5.  
    QUIET="False"
  6.  
     
  7.  
    ; Setup will only display the progress of the run. No matter what user interaction without the need to.
  8.  
     
  9.  
    QUIETSIMPLE="True"
  1.  
    注意; 默认值为 Windows 身份验证。使用 "SQL" 表示採用混合模式身份验证。
  2.  
     
  3.  
    SECURITYMODE="SQL"
  4.  
    SAPWD="1qaz2WSX"


 

HELP

 

  1.  
    Microsoft Windows [版本号 6.1.7601]
  2.  
    版权全部 (c) 2009 Microsoft Corporation。保留全部权利。

C:\Users\Patrick>I: I:\>setup.exe /help Microsoft (R) SQL Server 2012 11.00.2100.60 版权全部 (c) Microsoft Corporation。

保留全部权利。 使用方法: setup.exe /[选项]={value} /[选项]={value} ... 选项: ACTION 指定安装程序的工作流。如 INSTALL、UNINSTALL 或 UPG RADE。

这是必需的參数。 ADDCURRENTUSERASSQLADMIN Provision current user as a Database Engine system administrator for SQL Server 2012 Express. AGTDOMAINGROUP Either domain user name or system account AGTSVCACCOUNT Either domain user name or system account AGTSVCPASSWORD Password for domain user name. Not required for system account AGTSVCSTARTUPTYPE Startup type for the SQL Server Agent service. Supported values are Manual, Automatic or Disabled. ALLINSTANCES 指定全部实例都将包含在安装操作中。仅仅有在应用修补程 序时才支持此參数。 ALLOWUPGRADEFORSSRSSHAREPOIN RSInputSettings_AllowUpgradeForSSRSSharePointMode_ Description ASBACKUPDIR The location for the Analysis Services backup files. ASCOLLATION The collation used by Analysis Services. ASCONFIGDIR The location for the Analysis Services configuration files. ASDATADIR The location for the Analysis Services data files. ASLOGDIR The location for the Analysis Services log files. ASPROVIDERMSOLAP Specifies if the MSOLAP provider can run in process. ASSERVERMODE Specifies the server mode of the Analysis Services instance. Valid values are MULTIDIMENSIONAL and TABULAR. The default value is MULTIDIMENSIONAL. ASSVCACCOUNT The account used by the Analysis Services service. ASSVCPASSWORD The password for the Analysis Services service account. ASSVCSTARTUPTYPE Controls the service startup type setting for the service. ASSYSADMINACCOUNTS Specifies the list of administrator accounts to provision. ASTEMPDIR The location for the Analysis Services temporary files. BROWSERSVCSTARTUPTYPE Startup type for Browser Service. CLTCTLRNAME The computer name that the client communicates with for the Distributed Replay Controller service. CLTRESULTDIR The result directory for the Distributed Replay Client service. CLTSTARTUPTYPE The startup type for the Distributed Replay Client service. CLTSVCACCOUNT The account used by the Distributed Replay Client service. CLTSVCPASSWORD The password for the Distributed Replay Client service account. CLTWORKINGDIR The working directory for the Distributed Replay Client service. CLUSTERPASSIVE 指定 SQL Server 安装程序不应管理 SQL Server 服务。

此选项应该仅在非 Microsoft 群集环境中使用。

COMMFABRICENCRYPTION MATRIXCOMMMESSAGEPROTECTION {0,1} COMMFABRICNETWORKLEVEL MATRIXCOMMNETWORKISOLATION {0,1} COMMFABRICPORT MATRIXCOMMPORT <port> CONFIGURATIONFILE 指定将用于安装程序的配置文件。 CONFIRMIPDEPENDENCYCHANGE Indicates that the change in IP address resource dependency type for the SQL Server multi-subnet failover cluster is accepted. CTLRSTARTUPTYPE The startup type for the Distributed Replay Controller service. CTLRSVCACCOUNT The account used by the Distributed Replay Controller service. CTLRSVCPASSWORD The password for the Distributed Replay Controller service account. CTLRUSERS The Windows account(s) used to grant permission to the Distributed Replay Controller service. ENABLERANU Set to "1" to enable RANU for SQL Server Express. ENU 尚没有定义命令行參数 ENU 的具体帮助。

ERRORREPORTING 指定是否可将错误报告给 Microsoft 以便改进以后的 SQ L Server 版本号。指定 1 或 True 将启用此功能。指定 0 或 False 将禁用此功能 。

FAILOVERCLUSTERDISKS Specifies a cluster shared disk to associate with the SQL Server failover cluster instance. FAILOVERCLUSTERGROUP Specifies the name of the cluster group for the SQL Server failover cluster instance. FAILOVERCLUSTERIPADDRESSES 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. FAILOVERCLUSTERNETWORKNAME Specifies the name of the SQ LServer failover cluster instance. This name is the network name that is used to connect to SQL Server services. FAILOVERCLUSTERROLLOWNERSHIP Specifies whether the upgraded nodes should take ownership of the failover instance group or not. Use 0 to retain ownership in the legacy nodes, 1 to make the upgraded nodes take ownership, or 2 to let SQL Server Setup decide when to move ownership. FEATURES 指定要安装、卸载或升级的功能。顶级功能列表包含 SQL 、AS、RS、IS、MDS 和工具。SQL 功能将安装数据库引擎、复制、全文和 Data Quality Se rvices (DQS)服务器。工具功能将安装管理工具、联机丛书组件 、SQL Server Data Tools 和其它共享组件。 FILESTREAMLEVEL Level to enable FILESTREAM feature at (0, 1, 2 or 3). FILESTREAMSHARENAME Name of Windows share to be created for FILESTREAM File I/O. FTSVCACCOUNT User account for Full-text Filter Daemon Host. FTSVCPASSWORD User password for Full-text Filter Daemon Host account. FTUPGRADEOPTION Full-text catalog upgrade option. HELP 显示命令行參数使用方法 IACCEPTSQLSERVERLICENSETERMS 通过指定此參数并接受 SQL Server 许可条款,您确认已 阅读并理解使用条款的内容。 INDICATEPROGRESS 指定应将具体的安装程序日志传送到控制台。

INSTALLSHAREDDIR 指定共享组件的安装根文件夹。在已安装共享组件后,此目 录保持不变。 INSTALLSHAREDWOWDIR 指定 WOW64 共享组件的安装根文件夹。

在已安装 WOW64 共 享组件后,此文件夹保持不变。 INSTALLSQLDATADIR The Database Engine root data directory. INSTANCEDIR 指定实例根文件夹。 INSTANCEID 为您已指定的 SQL Server 功能指定实例 ID。SQL Serve r 文件夹结构、注冊表结构和服务名称将包含 SQL Server 实 例的实例 ID。 INSTANCENAME 指定默认实例或命名实例。MSSQLSERVER 是非 Express 版本号的默认实例,SQLExpress 则是 Express 版本号的默认 实例。

在安装 SQL Server 数据库引擎(SQL)、Analysis Services (AS)或 Reporting Services (RS)时,此參数是必需的。 ISSVCACCOUNT Either domain user name or system account. ISSVCPASSWORD Password for domain user. ISSVCSTARTUPTYPE Automatic, Manual or Disabled. MATRIXCMBRICKCOMMPORT MATRIXCMBRICKCOMMPORT portNumber MATRIXCMSERVERNAME MATRIXCMSERVERNAME hostName\instanceName MATRIXNAME MATRIXNAME=<name> NPENABLED Specify 0 to disable or 1 to enable the Named Pipes protocol. PID 指定 SQL Server 产品密钥以配置您要使用哪个版本号。 QUIET 安装程序将不会显示不论什么用户界面。 QUIETSIMPLE 安装程序将仅仅显示运行进度,而不须要不论什么用户交互。

ROLE 尚没有定义命令行參数 ROLE 的具体帮助。 RSCATALOGSERVERINSTANCENAME The SQL Server server for the report server catalog database. RSINSTALLMODE RSInputSettings_RSInstallMode_Description RSSHPINSTALLMODE RSInputSettings_RSInstallMode_Description RSSVCACCOUNT Specify the service account of the report server. This value is required. If you omit this value, Setup will use the default built-in account for the current operating system (either NetworkService or LocalSystem). If you specify a domain user account, the domain must be under 254 characters and the user name must be under 20 characters. The account name cannot contain the following characters: " / \ [ ] : ; | = , + * ? < > RSSVCPASSWORD Specify a strong password for the account. A strong password is at least 8 characters and includes a combination of upper and lower case alphanumeric characters and at least one symbol character. Avoid spelling an actual word or name that might be listed in a dictionary. RSSVCSTARTUPTYPE Specifies the startup mode for the Report Server service. Valid values include Manual, Automatic, and Disabled. The default value for StartupType is Manual, where the server is started when a request is received. RSUPGRADEDATABASEACCOUNT RSInputSettings_RSInstallMode_Description RSUPGRADEPASSWORD RSInputSettings_RSInstallMode_Description RULES 指定要执行的规则 ID 或规则组 ID 的列表。

SAPWD Password for SQL Server sa account. SECURITYMODE The default is Windows Authentication. Use "SQL" for Mixed Mode Authentication. SQLBACKUPDIR Default directory for the Database Engine backup files. SQLCOLLATION Specifies a Windows collation or an SQL collation to use for the Database Engine. SQLSVCACCOUNT Account for SQL Server service: Domain\User or system account. SQLSVCPASSWORD A SQL Server service password is required only for a domain account. SQLSVCSTARTUPTYPE Startup type for the SQL Server service. SQLSYSADMINACCOUNTS Windows account(s) to provision as SQL Server system administrators. SQLTEMPDBDIR Directory for Database Engine TempDB files. SQLTEMPDBLOGDIR Directory for the Database Engine TempDB log files. SQLUSERDBDIR Default directory for the Database Engine user databases. SQLUSERDBLOGDIR Default directory for the Database Engine user database logs. SQMREPORTING 指定能够收集 SQL Server 功能使用情况数据,并将数据 发送到 Microsoft。

指定 1 或 True 将启用此功能,指定 0 或 False 将禁用此功能 。

TCPENABLED Specify 0 to disable or 1 to enable the TCP/IP protocol. UIMODE 用于控制用户界面行为的參数。

有效值对于完整 UI 为 N ormal,对于简化的 UI 为 AutoAdvance,为 EnableUIOnServerCore 则跳过 Server Core 安装程序 GUI 块。 UpdateEnabled 指定 SQL Server 安装程序是否应发现和包含产品更新。 有效值是 True 和 False 或者 1 和 0。默认情况下,SQL Server 安装程序将包含 找到的更新。 UpdateSource 指定 SQL Server 安装程序将获取产品更新的位置。有效 值为 "MU" (以便搜索产品更新)、有效文件夹路径以及 .\MyUpdates 或 UNC 共享文件夹之类的相对路径。

默认情况下,SQL Server 安 装程序将通过 Window Server Update Services 搜索 Microsoft Update 或 Windows Update 服务。 X86 指定安装程序应该安装到 WOW64 中。IA64 或 32 位系统 不支持此命令行參数。 完整的无人參与安装演示样例,显示全部必需的參数: setup.exe /Q /IACCEPTSQLSERVERLICENSETERMS /ACTION=install /PID=<validpid> /FEAT URES=SQL,AS,RS,IS,Tools /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="MyDomain\MyAccount" /SQLSVCPASSWORD="************" /SQLSYSADMINACCOUNTS="MyDomain\MyAccount " /AGTSVCACCOUNT="MyDomain\MyAccount" /AGTSVCPASSWORD="************" /ASSVCACCOUNT="MyDomain\MyAccount" /ASSVCPASSWORD="************" /RSSVCACCOUNT="MyDomain\MyAccount" /RSSVCPASSWORD="************" /ISSVCAccount="MyDomain\MyAccount" /ISSVCPASSWORD="************" /ASSYSADMINACCOUNTS="MyDomain\MyAccount" 按随意键退出... ^C I:\>

 

PowerShell 批量启动关闭实例:

start test instances .bat

 

  1.  
    @powershell -command "Get-Service |Where-Object {$_.Name -like 'MSSQL$I*'}| Start-Service -ErrorAction SilentlyContinue"
  2.  
    @pause
  3.  
     



stop test instances .bat

 

  1.  
    @powershell -Command " Get-Service |Where-Object {$_.Name -like 'MSSQL$I*'}| Stop-Service -ErrorAction SilentlyContinue"
  2.  
     
  3.  
    @pause
  4.  
     



效果图

Guess you like

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