檢視 SQL Server 錯誤記錄檔 (SQL Server Management Studio)View the SQL Server error log (SQL Server Management Studio)

適用於: 是SQL Server 否Azure SQL Database 否Azure SQL 資料倉儲 否平行處理資料倉儲 APPLIES TO: yesSQL Server noAzure SQL Database noAzure SQL Data Warehouse noParallel Data Warehouse

SQL ServerSQL Server 錯誤記錄檔包含使用者定義事件和特定系統事件,以用於進行疑難排解。The SQL ServerSQL Server error log contains user-defined events and certain system events you can use for troubleshooting.

檢視記錄檔View the logs

  1. 在 SQL Server Management Studio 中,選取 [物件總管] 。In SQL Server Management Studio, select Object Explorer. 若要開啟 [物件總管] ,請選取 F8。To open Object Explorer, select F8. 或者,在上層功能表上,選取 [檢視] ,然後選取 [物件總管] :Or on the top menu, select View, and then select Object Explorer:

    物件總管

  2. 在 [物件總管] 中,連線到 SQL Server 的執行個體,然後展開該執行個體。In Object Explorer, connect to an instance of SQL Server, and then expand that instance.

  3. 尋找並展開 [管理] 區段 (假設您有權限可以看到它)。Find and expand the Management section (assuming you have permissions to see it).

  4. 以滑鼠右鍵按一下 [SQL Server 記錄檔] ,選取 [檢視] ,然後選擇 [SQL Server 記錄檔] 。Right-click SQL Server Logs, select View, and then choose SQL Server Log.

    View_SQLServer_Log_SSMS

  5. [記錄檔檢視器] 會隨即顯示 (可能需要一點時間),內含可供您檢視的記錄檔清單。The Log File Viewer appears (it might take a moment) with a list of logs for you to view.

我們會持續聽取您的意見: 如果您發現本文中有過時或不正確的內容 (例如步驟或程式碼範例),請告訴我們。We are listening: If you find something outdated or incorrect in this article, such as a step or a code example, please tell us. 您可以按一下此頁面底部 [意見反應] 區段中的 [本頁] 按鈕。You can click the This page button in the Feedback section at the bottom of this page. 我們通常會在隔天閱讀有關 SQL 的每一個意見反應。We read every item of feedback about SQL, typically the next day. 謝謝。Thanks.

另請參閱See also

如需詳細資訊,請參閱 MSSQLTips.com 的實用文章:Identify location of the SQL Server Error Log file (識別 SQL Server 錯誤記錄檔的位置)。For more information, see MSSQLTips.com's helpful post Identify location of the SQL Server Error Log file.