Просмотр журнала приложений Windows (Windows 10) View the Windows application log (Windows 10)
Применимо к: Applies to: SQL Server SQL Server (все поддерживаемые версии) SQL Server SQL Server (all supported versions) Применимо к: Applies to: SQL Server SQL Server (все поддерживаемые версии) SQL Server SQL Server (all supported versions)
Когда для SQL Server SQL Server настроено использование журнала приложений Windows, каждый сеанс SQL Server SQL Server записывает новые события в этот журнал. SQL Server SQL Server is configured to use the Windows application log, each SQL Server SQL Server session writes new events to that log. В отличие от журнала ошибок SQL Server SQL Server , новый журнал приложений не создается заново каждый раз при запуске экземпляра SQL Server SQL Server . Unlike the SQL Server SQL Server error log, a new application log is not created each time you start an instance of SQL Server SQL Server .
Просмотр журнала приложений Windows View the Windows application log
На панели поиска введите средство просмотра событий, а затем выберите классическое приложение Просмотр событий. On the Search bar, type Event Viewer, and then select the Event Viewer desktop app.
В средстве просмотра событий откройте журналы приложений и служб. In Event Viewer, open the Applications and Services Logs.
События SQL Server SQL Server идентифицируются записью MSSQLSERVER в столбце Источник (именованные экземпляры обозначаются как MSSQL$ ). SQL Server SQL Server events are identified by the entry MSSQLSERVER (named instances are identified with MSSQL$ ) in the Source column. События агента SQL Server идентифицируются записью SQLSERVERAGENT (для именованных экземпляров сервера SQL Server SQL Server события агента SQL Server SQL Server идентифицируются при помощи SQLAgent$ ). SQL Server Agent events are identified by the entry SQLSERVERAGENT (for named instances of SQL Server SQL Server , SQL Server SQL Server Agent events are identified with SQLAgent$ ). События службы Microsoft Search идентифицируются записью Microsoft Search. Microsoft Search service events are identified by the entry Microsoft Search.
Чтобы просмотреть журнал с другого компьютера, щелкните правой кнопкой мыши элемент Просмотр событий (локальных) . To view the log of a different computer, right-click Event Viewer (local). Выберите пункт Подключение к другому компьютеру и заполните поля в диалоговом окне Выбор компьютера. Select Connect to another computer, and fill in the fields to complete the Select Computer dialog box.
Чтобы отображались только события SQL Server SQL Server , в меню Вид выберите пункт Фильтр. Optionally, to display only SQL Server SQL Server events, on the View menu, select Filter. В списке Источник событий выберите MSSQLSERVER. In the Event source list, select MSSQLSERVER. Чтобы просмотреть только события агента SQL Server SQL Server , в списке Источник события вместо этого выберите SQLSERVERAGENT . To view only SQL Server SQL Server Agent events, instead select SQLSERVERAGENT in the Event source list.
Чтобы просмотреть дополнительные сведения о событии, дважды щелкните событие. To view more information about an event, double-click the event.
Event Logging (Windows Installer)
Windows Events provides a standard, centralized way for applications (and the operating system) to record important software and hardware events. The event-logging service stores events from various sources in a single collection called an event log. Prior to WindowsВ Vista, you would use either Event Tracing for Windows (ETW) or Event Logging to log events. WindowsВ Vista introduced a new eventing model that unifies both ETW and the Windows Event Log API.
The installer also writes entries into the event log. These record events such as following:
- Success or failure of the installation; removal or repair of a product.
- Errors that occur during product configuration.
- Detection of corrupted configuration data.
If a large amount of information is written, the Event Log file can become full and the installer displays the message, «The Application log file is full.»
The installer may write the following entries in the event log. All event log messages have a unique event ID. All general errors authored in the Error table that are returned for an installation that fails are logged in the Application Event Log with a message ID equal to the Error + 10,000. For example, the error number in the Error table for an installation completed successfully is 1707. The successful installation is logged in the Application Event Log with a message ID of 11707 (1707 + 10,000).
For information about how to enable verbose logging on a user’s computer when troubleshooting deployment, see Windows Installer Best Practices.
Log files
Applies to
This is a 400 level topic (advanced).
See Resolve Windows 10 upgrade errors for a full list of topics in this article.
Several log files are created during each phase of the upgrade process. These log files are essential for troubleshooting upgrade problems. By default, the folders that contain these log files are hidden on the upgrade target computer. To view the log files, configure Windows Explorer to view hidden items, or use a tool to automatically gather these logs. The most useful log is setupact.log. The log files are located in a different folder depending on the Windows Setup phase. Recall that you can determine the phase from the extend code.
Also see the Windows Error Reporting section in this document for help locating error codes and log files.
The following table describes some log files and how to use them for troubleshooting purposes:
Log file | Phase: Location | Description | When to use |
setupact.log | Down-Level: $Windows. BT\Sources\Panther | Contains information about setup actions during the downlevel phase. | All down-level failures and starting point for rollback investigations. This is the most important log for diagnosing setup issues. |
OOBE: $Windows. BT\Sources\Panther\UnattendGC | Contains information about actions during the OOBE phase. | Investigating rollbacks that failed during OOBE phase and operations – 0x4001C, 0x4001D, 0x4001E, 0x4001F. | |
Rollback: $Windows. BT\Sources\Rollback | Contains information about actions during rollback. | Investigating generic rollbacks — 0xC1900101. | |
Pre-initialization (prior to downlevel): Windows | Contains information about initializing setup. | If setup fails to launch. | |
Post-upgrade (after OOBE): Windows\Panther | Contains information about setup actions during the installation. | Investigate post-upgrade related issues. | |
setuperr.log | Same as setupact.log | Contains information about setup errors during the installation. | Review all errors encountered during the installation phase. |
miglog.xml | Post-upgrade (after OOBE): Windows\Panther | Contains information about what was migrated during the installation. | Identify post upgrade data migration issues. |
BlueBox.log | Down-Level: Windows\Logs\Mosetup | Contains information communication between setup.exe and Windows Update. | Use during WSUS and WU down-level failures or for 0xC1900107. |
Supplemental rollback logs: Setupmem.dmp setupapi.dev.log Event logs (*.evtx) | $Windows. BT\Sources\Rollback | Additional logs collected during rollback. | Setupmem.dmp: If OS bug checks during upgrade, setup will attempt to extract a mini-dump. Setupapi: Device install issues — 0x30018 Event logs: Generic rollbacks (0xC1900101) or unexpected reboots. |
Log entry structure
A setupact.log or setuperr.log entry (files are located at C:\Windows) includes the following elements:
- The date and time — 2016-09-08 09:20:05.
- The log level — Info, Warning, Error, Fatal Error.
- The logging component — CONX, MOUPG, PANTHR, SP, IBSLIB, MIG, DISM, CSI, CBS.
- The logging components SP (setup platform), MIG (migration engine), and CONX (compatibility information) are particularly useful for troubleshooting Windows Setup errors.
- The message — Operation completed successfully.
See the following example:
Date/Time | Log level | Component | Message |
---|---|---|---|
2016-09-08 09:23:50, | Warning | MIG | Could not replace object C:\Users\name\Cookies. Target Object cannot be removed. |
Analyze log files
The following instructions are meant for IT professionals. Also see the Upgrade error codes section in this guide to familiarize yourself with result codes and extend codes.
To analyze Windows Setup log files:
- Determine the Windows Setup error code. This code should be returned by Windows Setup if it is not successful with the upgrade process.
- Based on the extend code portion of the error code, determine the type and location of a log files to investigate.
- Open the log file in a text editor, such as notepad.
- Using the result code portion of the Windows Setup error code, search for the result code in the file and find the last occurrence of the code. Alternatively search for the «abort» and abandoning» text strings described in step 7 below.
- To find the last occurrence of the result code:
- Scroll to the bottom of the file and click after the last character.
- Click Edit .
- Click Find .
- Type the result code.
- Under Direction select Up.
- Click Find Next.
- When you have located the last occurrence of the result code, scroll up a few lines from this location in the file and review the processes that failed just prior to generating the result code.
- Search for the following important text strings:
- Shell application requested abort
- Abandoning apply due to error for object
- Decode Win32 errors that appear in this section.
- Write down the timestamp for the observed errors in this section.
- Search other log files for additional information matching these timestamps or errors.
For example, assume that the error code for an error is 0x8007042B — 0x2000D. Searching for «8007042B» reveals the following content from the setuperr.log file:
Some lines in the text below are shortened to enhance readability. The date and time at the start of each line (ex: 2016-10-05 15:27:08) is shortened to minutes and seconds, and the certificate file name which is a long text string is shortened to just «CN.»
The first line indicates there was an error 0x00000570 with the file C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18 [CN] (shown below):
The error 0x00000570 is a Win32 error code corresponding to: ERROR_FILE_CORRUPT: The file or directory is corrupted and unreadable.
Therefore, Windows Setup failed because it was not able to migrate the corrupt file C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18[CN]. This file is a local system certificate and can be safely deleted. Searching the setupact.log file for additional details, the phrase «Shell application requested abort» is found in a location with the same timestamp as the lines in setuperr.log. This confirms our suspicion that this file is the cause of the upgrade failure:
This analysis indicates that the Windows upgrade error can be resolved by deleting the C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18[CN] file. Note: In this example, the full, unshortened file name is C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18\be8228fb2d3cb6c6b0ccd9ad51b320b4_a43d512c-69f2-42de-aef9-7a88fabdaa3f.
Windows Error Reporting
Applies to
This is a 300 level topic (moderately advanced).
See Resolve Windows 10 upgrade errors for a full list of topics in this article.
When Windows Setup fails, the result and extend code are recorded as an informational event in the Application log by Windows Error Reporting as event 1001. The event name is WinSetupDiag02. You can use Event Viewer to review this event, or you can use Windows PowerShell.
To use Windows PowerShell, type the following commands from an elevated Windows PowerShell prompt:
The following source will be available only if you have updated from a previous version of Windows 10 to a new version. If you installed the current version and have not updated, the source named WinSetupDiag02 will be unavailable.
To use Event Viewer:
- Open Event Viewer and navigate to Windows Logs\Application.
- Click Find, and then search for winsetupdiag02.
- Double-click the event that is highlighted.
Note: For legacy operating systems, the Event Name was WinSetupDiag01.
Ten parameters are listed in the event:
Parameters |
---|
P1: The Setup Scenario (1=Media,5=WindowsUpdate,7=Media Creation Tool) |
P2: Setup Mode (x=default,1=Downlevel,5=Rollback) |
P3: New OS Architecture (x=default,0=X86,9=AMD64) |
P4: Install Result (x=default,0=Success,1=Failure,2=Cancel,3=Blocked) |
P5: Result Error Code (Ex: 0xc1900101) |
P6: Extend Error Code (Ex: 0x20017) |
P7: Source OS build (Ex: 9600) |
P8: Source OS branch (not typically available) |
P9: New OS build (Ex: 16299> |
P10: New OS branch (Ex: rs3_release> |
The event will also contain links to log files that can be used to perform a detailed diagnosis of the error. An example of this event from a successful upgrade is shown below.