Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 2.65 KB

viewing-the-sql-server-error-log.md

File metadata and controls

29 lines (24 loc) · 2.65 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords monikerRange
Viewing the SQL Server Error Log
Get help detecting problems in SQL Server by viewing the current error log, or backups of previous logs, to check whether processes have finished successfully.
markingmyname
maghan
03/14/2017
sql
tools-other
conceptual
cycling SQL Server error log
viewing SQL Server error log
errors [SQL Server], logs
SQL Server error log
displaying SQL Server error log
logs [SQL Server], SQL Server error logs
>=sql-server-2016

Viewing the SQL Server Error Log

[!INCLUDE SQL Server Windows Only] View the [!INCLUDEssNoVersion] error log to ensure that processes have completed successfully (for example, backup and restore operations, batch commands, or other scripts and processes). This can be helpful to detect any current or potential problem areas, including automatic recovery messages (particularly if an instance of [!INCLUDEssNoVersion] has been stopped and restarted), kernel messages, or other server-level error messages.

View the [!INCLUDEssNoVersion] error log by using [!INCLUDEssManStudioFull] or any text editor. For more information about how to view the error log, see Open Log File Viewer. By default, the error log is located at Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\LOG\ERRORLOG and ERRORLOG.n files.

A new error log is created each time an instance of [!INCLUDEssNoVersion] is started, although the sp_cycle_errorlog system stored procedure can be used to cycle the error log files without having to restart the instance of [!INCLUDEssNoVersion]. Typically, [!INCLUDEssNoVersion] retains backups of the previous six logs and gives the most recent log backup the extension .1, the second most recent the extension .2, and so on. The current error log has no extension.

Be aware that you can also view the [!INCLUDEssNoVersion] error log on instances of [!INCLUDEssNoVersion] that are offline or cannot start. For more information, see View Offline Log Files.