檢視與讀取 SQL Server 安裝程式記錄檔View and Read SQL Server Setup Log Files

本主題適用於: 是SQL Server (僅限 Windows)否Azure SQL Database否Azure SQL 資料倉儲否平行處理資料倉儲 THIS TOPIC APPLIES TO: yesSQL Server (Windows only)noAzure SQL DatabasenoAzure SQL Data WarehousenoParallel Data Warehouse

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
DatastoreDatastore %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 安裝單一詳細記錄檔 (如 Service Pack),或更新時為兩個詳細記錄檔。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 similiar set of files (i.e. %programfiles%\MicrosoftSQL Server\130\Setup Bootstrap\Log<YYYYMMDD_HHMM>\MSSQLSERVER).

位置Location

Summary.txt 位在 %programfiles%\ MicrosoftMicrosoft SQL ServerSQL Server\nnn\Setup Bootstrap\Log\ 內。The summary.txt is located within %programfiles%\ MicrosoftMicrosoft SQL 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_<電腦名稱>YYYYMMDD_HHMMss.txt 檔案Summary<MachineName>_YYYYMMDD_HHMMss.txt file

概觀Overview

summary_engine base 檔案與摘要檔案類似,而且是在主要工作流程期間產生的。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%\ MicrosoftMicrosoft SQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\。The Summary<MachineName>_YYYYMMDD_HHMMss.txt file is located at %programfiles%\ MicrosoftMicrosoft SQL 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%\ MicrosoftMicrosoft SQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\Detail.txt。The detail.txt file is located within %programfiles%\ MicrosoftMicrosoft SQL 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:

  • <功能><架構>\<互動>.log<Feature><Architecture>\<Interaction>.log
  • <功能><架構>\<語言>_<互動>.log<Feature><Architecture>\<Language>_<Interaction>.log
  • <功能><架構>\<互動>_<工作流程>.log<Feature><Architecture>\<Interaction>_<workflow>.log

位置Location

MSI 記錄檔位於 %programfiles%\ MicrosoftMicrosoft SQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\<名稱>.log。The MSI log files are located at %programfiles%\ MicrosoftMicrosoft SQL 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%\ MicrosoftMicrosoft SQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\。The ConfigurationFile.ini is located at %programfiles%\ MicrosoftMicrosoft SQL 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%\ MicrosoftMicrosoft SQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\。The SystemConfigurationCheck_Report.htm is located at %programfiles%\ MicrosoftMicrosoft SQL ServerSQL Server\nnn\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\.

info_tip 取得說明Get Help

另請參閱See also

安裝 SQL Server 2017Install SQL Server 2017