【问题标题】:SQL Server Silent installation get error during installationSQL Server 静默安装在安装过程中出现错误
【发布时间】:2018-04-10 15:09:05
【问题描述】:

我想使用 Advanced Installer 静默安装 SQL Server Express(最好是 2008 或 2014)。我按照高级安装程序在线创建的两个文档中的说明进行操作:

How to Install SQL Server Expresshere 是一个示例 *.aip 文件,用于显示静默安装 SQL Server Express 所需的设置。

我的场景:

简单安装时出错:

但是,我收到此错误:

我已经在目标系统上手动测试了 SQL Server Express setup.exe。所以文件和目标系统没有任何问题。
我正在尝试在命令行中使用ConfigurationFile.ini 来设置 setup.exe,如下所示:

这是我的ConfigurationFile.ini 代码:

    ;SQLSERVER2008 Configuration File
[OPTIONS]

; Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will reflect the instance ID of the SQL Server instance. 

INSTANCEID="BNSDEV"

; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter. 

ACTION="Install"

; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, and Tools. The SQL feature will install the database engine, replication, and full-text. The Tools feature will install Management Tools, Books online, Business Intelligence Development Studio, and other shared components. 

FEATURES=SQLENGINE,REPLICATION

; Displays the command line parameters usage 

HELP="False"

; Specifies that the detailed Setup log should be piped to the console. 

INDICATEPROGRESS="False"

; Setup will not display any user interface. 

QUIET="False"

; Setup will display progress only without any user interaction. 

QUIETSIMPLE="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"

; Detailed help for command line argument ROLE has not been defined yet. 

ROLE="AllFeatures_WithDefaults"

; 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, and AutoAdvance for a simplied UI. 

UIMODE="Normal"

; 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="True"

; Specify the root installation directory for native shared components. 

INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"

; Specify the installation directory. 

INSTANCEDIR="C:\Program Files\Microsoft SQL Server"

; 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 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="BNSDEV"

; Agent account name 

AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"

; Auto-start service after installation.  

AGTSVCSTARTUPTYPE="Disabled"

; Startup type for Integration Services. 

ISSVCSTARTUPTYPE="Automatic"

; Account for Integration Services: Domain\User or system account. 

ISSVCACCOUNT="NT AUTHORITY\NetworkService"

; Controls the service startup type setting after the service has been created. 

ASSVCSTARTUPTYPE="Automatic"

; The collation to be used by Analysis Services. 

ASCOLLATION="Latin1_General_CI_AS"

; The location for the Analysis Services data files. 

ASDATADIR="Data"

; The location for the Analysis Services log files. 

ASLOGDIR="Log"

; The location for the Analysis Services backup files. 

ASBACKUPDIR="Backup"

; The location for the Analysis Services temporary files. 

ASTEMPDIR="Temp"

; The location for the Analysis Services configuration files. 

ASCONFIGDIR="Config"

; Specifies whether or not the MSOLAP provider is allowed to run in process. 

ASPROVIDERMSOLAP="1"

; A port number used to connect to the SharePoint Central Administration web application. 

FARMADMINPORT="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="True"

; Specifies a Windows collation or an SQL collation to use for the Database Engine. 

SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"

; Account for SQL Server service: Domain\User or system account. 

SQLSVCACCOUNT="NT AUTHORITY\SYSTEM"

; Windows account(s) to provision as SQL Server system administrators. 

SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS"

; Provision current user as a Database Engine system administrator for SQL Server 2008 R2 Express. 

ADDCURRENTUSERASSQLADMIN="True"

; 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"

; Specifies which account the report server NT service should execute under.  When omitted or when the value is empty string, the default built-in account for the current operating system.
; The username part of RSSVCACCOUNT is a maximum of 20 characters long and
; The domain part of RSSVCACCOUNT is a maximum of 254 characters long. 

RSSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"

; Specifies how the startup mode of the report server NT service.  When 
; Manual - Service startup is manual mode (default).
; Automatic - Service startup is automatic mode.
; Disabled - Service is disabled 

RSSVCSTARTUPTYPE="Automatic"

; Specifies which mode report server is installed in.  
; Default value: “FilesOnly”  

RSINSTALLMODE="FilesOnlyMode"


我想PCUSOURCE肯定有问题。因为fig1 我收到一个错误,因为系统找不到指定的文件并且系统正在查找 sqlSupport.msi。 谁能帮我解决这个问题?

已编辑

这是最后一个安装的summery.txt:

Overall summary:
  Final result:                  User cancelled
  Exit code (Decimal):           -2068380094
  Exit facility code:            1207
  Exit error code:               1602
  Exit message:                  User has cancelled.
  Start time:                    2017-10-30 13:27:09
  End time:                      2017-10-30 13:43:48
  Requested action:              Install

Machine Properties:
  Machine name:                  WINDOWS7-PC
  Machine processor count:       2
  OS version:                    Windows 7
  OS service pack:               Service Pack 1
  OS region:                     United States
  OS language:                   English (United States)
  OS architecture:               x86
  Process architecture:          32 Bit
  OS clustered:                  No

Product features discovered:
  Product              Instance             Instance ID                    Feature                                  Language             Edition              Version         Clustered 

Package properties:
  Description:                   SQL Server Database Services 2008 R2
  ProductName:                   SQL Server 2008 R2
  Type:                          RTM
  Version:                       10
  Installation location:         c:\3366571280411213122d3a8c\x86\setup\
  Installation edition:          EXPRESS

  Slipstream:                    True
  SP Level                       2

User Input Settings:
  ACTION:                        Install
  ADDCURRENTUSERASSQLADMIN:      True
  AGTSVCACCOUNT:                 NT AUTHORITY\NETWORK SERVICE
  AGTSVCPASSWORD:                *****
  AGTSVCSTARTUPTYPE:             Disabled
  ASBACKUPDIR:                   Backup
  ASCOLLATION:                   Latin1_General_CI_AS
  ASCONFIGDIR:                   Config
  ASDATADIR:                     Data
  ASDOMAINGROUP:                 <empty>
  ASLOGDIR:                      Log
  ASPROVIDERMSOLAP:              1
  ASSVCACCOUNT:                  <empty>
  ASSVCPASSWORD:                 *****
  ASSVCSTARTUPTYPE:              Automatic
  ASSYSADMINACCOUNTS:            <empty>
  ASTEMPDIR:                     Temp
  BROWSERSVCSTARTUPTYPE:         Disabled
  CONFIGURATIONFILE:             C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20171030_132528\ConfigurationFile.ini
  CUSOURCE:                      
  ENABLERANU:                    True
  ENU:                           True
  ERRORREPORTING:                False
  FARMACCOUNT:                   <empty>
  FARMADMINPORT:                 0
  FARMPASSWORD:                  *****
  FEATURES:                      SQLENGINE,REPLICATION
  FILESTREAMLEVEL:               0
  FILESTREAMSHARENAME:           <empty>
  FTSVCACCOUNT:                  <empty>
  FTSVCPASSWORD:                 *****
  HELP:                          False
  INDICATEPROGRESS:              False
  INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
  INSTALLSHAREDWOWDIR:           C:\Program Files\Microsoft SQL Server\
  INSTALLSQLDATADIR:             <empty>
  INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
  INSTANCEID:                    BNSDEV
  INSTANCENAME:                  BNSDEV
  ISSVCACCOUNT:                  NT AUTHORITY\NetworkService
  ISSVCPASSWORD:                 *****
  ISSVCSTARTUPTYPE:              Automatic
  NPENABLED:                     0
  PASSPHRASE:                    *****
  PCUSOURCE:                     c:\3366571280411213122d3a8c\PCUSOURCE
  PID:                           *****
  QUIET:                         False
  QUIETSIMPLE:                   False
  ROLE:                          AllFeatures_WithDefaults
  RSINSTALLMODE:                 FilesOnlyMode
  RSSVCACCOUNT:                  NT AUTHORITY\NETWORK SERVICE
  RSSVCPASSWORD:                 *****
  RSSVCSTARTUPTYPE:              Automatic
  SAPWD:                         *****
  SECURITYMODE:                  <empty>
  SQLBACKUPDIR:                  <empty>
  SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
  SQLSVCACCOUNT:                 NT AUTHORITY\SYSTEM
  SQLSVCPASSWORD:                *****
  SQLSVCSTARTUPTYPE:             Automatic
  SQLSYSADMINACCOUNTS:           windows7-PC\windows7
  SQLTEMPDBDIR:                  <empty>
  SQLTEMPDBLOGDIR:               <empty>
  SQLUSERDBDIR:                  <empty>
  SQLUSERDBLOGDIR:               <empty>
  SQMREPORTING:                  False
  TCPENABLED:                    0
  UIMODE:                        Normal
  X86:                           False

  Configuration file:            C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20171030_132528\ConfigurationFile.ini

Detailed results:
  Feature:                       Database Engine Services
  Status:                        Failed: see logs for details
  MSI status:                    Passed
  Configuration status:          Passed

  Feature:                       SQL Server Replication
  Status:                        Failed: see logs for details
  MSI status:                    Passed
  Configuration status:          Passed

Rules with failures:

Global rules:

Scenario specific rules:

Rules report file:               C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20171030_132528\SystemConfigurationCheck_Report.htm

Exception summary:
The following is an exception stack listing the exceptions in outermost to innermost order
Inner exceptions are being indented

Exception type: Microsoft.SqlServer.Chainer.Infrastructure.CancelException
    Message: 
        User has cancelled.
    Stack: 
        at Microsoft.SqlServer.Configuration.UIExtension.Request.Wait()
        at Microsoft.SqlServer.Configuration.UIExtension.UserInterfaceProxy.SubmitAndWait(Request request)
        at Microsoft.SqlServer.Configuration.UIExtension.UserInterfaceProxy.NavigateToWaypoint(String moniker)
        at Microsoft.SqlServer.Configuration.UIExtension.UserInterfaceService.Waypoint(String moniker)
        at Microsoft.SqlServer.Configuration.UIExtension.WaypointAction.ExecuteAction(String actionId)
        at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
        at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)

@herman回答之后编辑

作为@herman 的回答,我从文件和文件夹中删除了sqlserverExpr.exe,然后也从Action 中删除了操作命令。之后,我从先决条件中添加 sqlserverExpr.exe,然后在setup File 选项卡上配置值,如@herman 所说。但我得到这样的错误:



这是我在安装文件中的配置:

【问题讨论】:

  • Re: 添加密码:您无法阻止机器管理员将自己添加为 SQL Server 系统管理员并通过这种方式获得访问权限,因此除非您知道您的用户不是管理员,否则没有多大意义. (管理员也可以简单地关闭服务器,获取数据库文件并将它们附加到另一个实例。)
  • 请问您有什么建议?
  • 问题可能不在于安装脚本。我与MS SQL Server 2016 Dev 有非常相似的问题。服务器已安装并正在运行,但未创建 sa 用户。我最终选择了Win 10FreshStart 选项。它会卸载所有内容(但保留用户文件)以模拟 Windows 的全新安装。然后服务器被安装为魅力。 1)尝试在另一台PC上安装。 2) 尝试 FreshStart 或全新安装。
  • 我不这么认为,我在多系统中测试,都无法安装,同样的错误
  • 您在 32 位操作系统上进行安装,您确定您也在安装 x86 版本的 SQL Server 吗?

标签: sql-server sql-server-2008 sql-server-express silent-installer advanced-installer


【解决方案1】:

我认为将 SQL Server 作为先决条件添加到项目中会比使用自定义操作启动它要容易得多。高级安装程序具有 SQL Server Express 的预定义先决条件。只需转到 > 视图进入您的设置项目,然后从那里将所需的先决条件添加到您的项目中。然后从 > 视图中删除当前 setup.exe 和在 > 视图中添加的操作。

【讨论】:

  • 你的方法可以一步一步写吗?
  • 1.从 > view/n 中删除 SQL 安装文件 2. 删除在安装项目的 > 视图中添加的操作 3. 在 > view 中搜索预定义的先决条件列表和选择 SQL 之一;这应该是全部
  • 当我将 SQL setup.exe 添加到先决条件时,我在“文件和文件夹”中找不到它的 setup.exe。
  • 另外,如果我添加 SQL server express 作为先决条件,我无法添加自己的配置。
【解决方案2】:

这是您在>.

中添加的EXE设置

要添加配置文件,只需将 prereq 作为磁盘文件添加,然后将配置文件作为附加文件添加到 prereq。

希望这会有所帮助。

【讨论】:

  • 感谢您的帮助,但我收到“Config.ini”不存在的错误。
  • 我添加了最后一次尝试作为您的方法。请看
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-06-03
  • 1970-01-01
  • 2023-02-26
  • 1970-01-01
  • 2023-03-14
相关资源
最近更新 更多