查看和阅读 SQL Server 安装程序日志文件View and Read SQL Server Setup Log Files

适用于:Applies to:是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) -仅限 Windows适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) - Windows only

默认情况下,SQL Server 安装程序会在 %programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log 内带有日期和时间戳的文件夹中创建日志文件,其中 nnn 是与正在安装的 SQL 版本相对应的数字 。SQL Server Setup creates log files in a dated and time-stamped folder within %programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log by default, where nnn are numbers that correspond to the version of SQL that's being installed. 带有时间戳的日志文件夹的名称格式为 YYYYMMDD_hhmmss。The time-stamped log folder name format is YYYYMMDD_hhmmss. 在无人参与模式下执行安装程序时,将在 %temp%\sqlsetup*.log 中创建日志。When Setup is executed in unattended mode, the logs are created within %temp%\sqlsetup*.log. 日志文件夹中的所有文件将归档到各自日志文件夹的 Log*.cab 文件中。All files in the log folder are archived into the Log*.cab file in their respective log folder.

文件File 路径Path
Summary.txtSummary.txt %programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log%programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log
Summary_<MachineName>_Date.txtSummary_<MachineName>_Date.txt %programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log\YYYYMMDD_hhmmss%programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log\YYYYMMDD_hhmmss
Detail.txtDetail.txt %programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log\YYYYMMDD_hhmmss%programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log\YYYYMMDD_hhmmss
数据存储Datastore %programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log\YYYYMMDD_hhmmss\Datastore%programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log\YYYYMMDD_hhmmss\Datastore
MSI 日志文件MSI Log Files %programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log\YYYYMMDD_hhmmss\<Name>.log%programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log\YYYYMMDD_hhmmss\<Name>.log
ConfigurationFile.iniConfigurationFile.ini %programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log\YYYYMMDD_hhmmss%programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log\YYYYMMDD_hhmmss
SystemConfigurationCheck_Report.htmSystemConfigurationCheck_Report.htm %programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log\YYYYMMDD_hhmmss%programfiles%\Microsoft SQL Server\nnn\Setup Bootstrap\Log\YYYYMMDD_hhmmss
对于无人参与的安装For unattended installations %temp%\sqlsetup*.log%temp%\sqlsetup*.log

setup-bootstrap-example.png

备注

路径 nnn 中的数字对应要安装的 SQL 版本。The numbers in the path nnn correspond to the version of SQL being installed. 上图中安装的是 SQL 2017,因此该文件夹为 140。In the above picture, SQL 2017 was installed, so the folder is 140. SQL 2016 对应的文件夹为 130,SQL 2014 对应的文件夹为 120。For SQL 2016, the folder would be 130, and for SQL 2014 the folder would be 120.

SQL Server 安装程序分以下三个基本阶段完成:SQL server setup completes three basic phases:

  1. 全局规则验证:验证基本系统要求Global Rules verification: validates basic system requirements
  2. 组件更新:检查正在安装的媒体是否有可用的更新Component update: checks to see if there are any updates available for the media being installed
  3. 用户请求的操作:允许用户选择和自定义功能User-requested action: allows the user to select and customize features

此工作流会生成单个摘要日志,并且对于基本 SQL Server 安装,单个详细日志将与基本安装一起安装,或者对于更新(例如服务包)时,则有两个详细日志将与基本安装一起安装。This workflow produces a single summary log, and either a single detail log for a base SQL Server installation, or two detail logs for when update, such as a service pack, is installed along with the base installation.

此外,还有数据存储文件包含安装过程正在跟踪的所有配置对象状态的快照,并且可用于故障排除配置错误。Additionally, there are datastore files that contain a snapshot of the state of all the configuration objects that are being tracked by the setup process, and are useful for troubleshooting configuration errors. 系统会为每个执行阶段创建 XML 转储文件,并将其保存在带时间戳的日志文件夹下的数据存储日志子文件夹中。XML dump files are created for each execution phase and are saved in the Datastore log subfolder under the time-stamped log folder.

以下部分介绍 SQL ServerSQL Server 安装程序日志文件。The following sections describe SQL ServerSQL Server Setup log files.

Summary.txt 文件Summary.txt file

概述Overview

此文件显示在安装过程中检测到的 SQL ServerSQL Server 组件、操作系统环境、命令行参数值(如果已指定),以及执行的每个 MSI/MSP 的总体状态。This file shows the SQL ServerSQL Server components that were detected during Setup, the operating system environment, command-line parameter values if they are specified, and the overall status of each MSI/MSP that was executed.

本日志归纳为以下部分:The log is organized into the following sections:

  • 执行的总体摘要An overall summary of the execution
  • 运行 SQL ServerSQL Server 安装程序的计算机的属性和配置Properties and the configuration of the computer where SQL ServerSQL Server Setup was run
  • SQL ServerSQL Server 产品功能product features previously installed on the computer
  • 安装版本和安装包属性的说明Description of the installation version and installation package properties
  • 安装过程中提供的运行时输入设置Runtime input settings that are provided during install
  • 配置文件的位置Location of the configuration file
  • 执行结果的详细信息Details of the execution results
  • 全局规则Global rules
  • 特定于安装方案的规则Rules specific to the installation scenario
  • 失败的规则Failed rules
  • 规则报表文件的位置Location of the rules report file

备注

请注意,修补时可能会存在多个子文件夹(一个用于每个要修补的实例,一个用于共享功能),其中包含一组类似的文件(即 %programfiles%\MicrosoftSQL Server\130\Setup Bootstrap\Log<YYYYMMDD_HHMM>\MSSQLSERVER)。Note that when patching there can be a number of sub folders (one for each instance being patched, and one for shared features) which contain a similar set of files (i.e. %programfiles%\MicrosoftSQL Server\130\Setup Bootstrap\Log<YYYYMMDD_HHMM>\MSSQLSERVER).

位置Location

Summary.txt 位于 %programfiles%\MicrosoftMicrosoftSQL ServerSQL Server\nnn\Setup Bootstrap\Log\。The summary.txt is located within %programfiles%\MicrosoftMicrosoftSQL ServerSQL Server\nnn\Setup Bootstrap\Log\.

若要找到摘要文本文件中的错误,请使用“error”或“failed”关键字搜索该文件。To find errors in the summary text file, search the file by using the "error" or "failed" keywords.

Summary_<MachineName>YYYYMMDD_HHMMss.txt 文件Summary<MachineName>_YYYYMMDD_HHMMss.txt file

概述Overview

summary_engine 基本文件类似于摘要文件,是在主工作流中生成的。The summary_engine base file is similar to the summary file and is generated during the main workflow.

位置Location

Summary_<MachineName>YYYYMMDD_HHMMss.txt 文件位于 %programfiles%\MicrosoftMicrosoftSQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\。The Summary<MachineName>_YYYYMMDD_HHMMss.txt file is located at %programfiles%\MicrosoftMicrosoftSQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\.

Detail.txt 文件Detail.txt file

概述Overview

Detail.txt 是针对主工作流(如安装或升级)生成的,它提供有关执行的详细信息。Detail.txt is generated for the main workflow such as install or upgrade, and provides the details of the execution. 文件中的日志根据调用安装的每个操作的时间生成。The logs in the file are generated based on the time when each action for the installation was invoked. 文本文件显示操作执行的顺序及其依赖项。The text file shows the order in which the actions were executed, as well as their dependencies.

位置Location

Detail.txt 文件位于 %programfiles%\MicrosoftMicrosoftSQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\Detail.txt。The detail.txt file is located within %programfiles%\MicrosoftMicrosoftSQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\Detail.txt.

如果在安装过程中发生错误,系统会将异常或错误记录在该文件的末尾。If an error occurs during the Setup process, the exception or error is logged at the end of this file. 若要查找该文件中的错误,请首先检查文件末尾,然后在文件中搜索“error”或“exception”关键字To find the errors in this file, first examine the end of the file followed by a search of the file for the "error" or "exception" keywords

MSI 日志文件MSI log files

概述Overview

MSI 日志文件提供安装包进程的详细信息。The MSI log files provide details of the installation package process. 它们是在安装指定的包的过程中由 MSIEXEC 生成的。They are generated by the MSIEXEC during the installation of the specified package.

MSI 日志文件的类型:Types of MSI log files:

  • <Feature><Architecture>_<Interaction>.log<Feature><Architecture>_<Interaction>.log
  • <Feature><Architecture>_<Language>_<Interaction>.log<Feature><Architecture>_<Language>_<Interaction>.log
  • <Feature><Architecture>_<Interaction>_<workflow>.log<Feature><Architecture>_<Interaction>_<workflow>.log

位置Location

MSI 日志文件位于 %programfiles%\MicrosoftMicrosoftSQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\<Name>.log。The MSI log files are located at %programfiles%\MicrosoftMicrosoftSQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\<Name>.log.

该文件的末尾是有关执行的摘要,其中包括成功状态或失败状态以及属性。At the end of the file is a summary of the execution, which includes the success or failure status and properties. 若要查找 MSI 文件中的错误,请搜索“value 3”并查看前后文本。To find the error in the MSI file, search for "value 3" and review the text before and after.

ConfigurationFile.ini 文件ConfigurationFile.ini file

概述Overview

本配置文件包含安装过程中提供的输入设置。The configuration file contains the input settings that are provided during installation. 该文件可用于在无需手动输入设置的情况下重新启动安装。It can be used to restart the installation without having to enter the settings manually. 但是,帐户的密码、PID 和某些参数不保存在该配置文件中。However, passwords for the accounts, PID, and some parameters are not saved in the configuration file. 可以将这些设置添加到该文件中,也可通过使用命令行或安装程序用户界面提供这些设置。The settings can be either added to the file or provided by using the command line or the Setup user interface. 有关详细信息,请参阅 使用配置文件安装 SQL Server 2016For more information, see Install SQL Server 2016 Using a Configuration File.

位置Location

ConfigurationFile.ini 位于 %programfiles%\MicrosoftMicrosoftSQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\。The ConfigurationFile.ini is located at %programfiles%\MicrosoftMicrosoftSQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\.

SystemConfigurationCheck_Report.htm 文件SystemConfigurationCheck_Report.htm file

概述Overview

系统配置检查报表包含有关每个执行规则的简短说明,以及执行状态。The system configuration check report contains a short description for each executed rule, and the execution status.

位置Location

SystemConfigurationCheck_Report.htm 位于 %programfiles%\MicrosoftMicrosoftSQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\。The SystemConfigurationCheck_Report.htm is located at %programfiles%\MicrosoftMicrosoftSQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\.

获取帮助

另请参阅See also

安装 SQL Server 2017Install SQL Server 2017