檢視 Windows 應用程式記錄Viewing the Windows Application Log

本主題適用於: 是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 ServerSQL Server 設成使用 Microsoft Windows 應用程式記錄檔時,每個 SQL ServerSQL Server 工作階段都會將新事件寫入該記錄檔。When SQL ServerSQL Server is configured to use the Microsoft Windows application log, each SQL ServerSQL Server session writes new events to that log. 您每次啟動 SQL ServerSQL Server 的執行個體時,並不會建立新的應用程式記錄檔,這和 SQL ServerSQL Server錯誤記錄檔不同。Unlike the SQL ServerSQL Server error log, a new application log is not created each time you start an instance of SQL ServerSQL Server.

使用「Windows 事件檢視器」或 Transact-SQLSQL Server Management Studio中的記錄檢視器,可以檢視和管理 Windows 應用程式記錄檔。View and manage the Windows application log by using Windows Event Viewer or the Log Viewer in Transact-SQLSQL Server Management Studio.

使用「事件檢視器」可以檢視三個記錄檔。There are three logs that can be viewed with Event Viewer.

Windows 記錄類型Windows log type 描述Description
系統記錄檔System log 記錄由 Windows 作業系統元件所記錄的事件。Records events logged by the Windows operating system components. 例如,啟動時無法載入驅動程式或其他系統元件,就會記錄於系統記錄檔內。For example, the failure of a driver or other system component to load during startup is recorded in the system log.
安全性記錄檔Security log 記錄安全性事件,例如失敗的登入嘗試。Records security events, such as failed login attempts. 這有助於追蹤安全性系統的變更,並找出可能破壞安全性的漏洞。This helps track changes to the security system and identify possible breaches to security. 例如,您可設定使用者管理員中的稽核選項,將嘗試登入至系統的事件記錄於安全性記錄檔內。For example, attempts to log on to the system may be recorded in the security log, depending on the audit settings in the User Manager.

只有 系統管理員 (sysadmin) 固定伺服器角色的成員可以檢視安全性記錄檔。Only members of the sysadmin fixed server role can view the security log.
應用程式記錄檔Application log 記錄應用程式所記錄的事件。Records events that are logged by applications. 例如,資料庫應用程式可能會將檔案錯誤記錄於應用程式記錄檔內。For example, a database application might record a file error in the application log.

如需有關使用「事件檢視器」、管理應用程式記錄檔,以及了解它所呈現的資訊,請參閱 Windows 文件。For more information about using Event Viewer, managing the application log, and understanding the information it presents, see the Windows documentation.

若要檢視 Windows 應用程式記錄檔To view the Windows application log

檢視 Windows 應用程式記錄檔 (Windows)View the Windows Application Log (Windows)