How to find SQL Server ErrorLog?

SQL Server maintains its own error logs that contain messages describing informational and error events. This file does not contains only errors, it also contains information messages. This is the reason we have added additional text in information message called “This is an informational message only. No user action is required”.

There are two method to find the location of the error log file:

Method 1: Location of Errorlog when SQL Server is running and you are able to connect:

Run below command in the query window

SQL Server ErrorLog

See the highlighted area “Logging SQL Server messages in file ‘C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG’.” is current ERRORLOG file

If you open the folder C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ here are files.

SQL Server ErrorLog

Method 2: Location of Errorlog when SQL Server is running and you are NOT able to connect:

There could be situations where you are not able to connect to SQL Server because SQL Server service is not getting started. In those situations, sp_readerrorlog can’t help you. Now, we have to find ERRORLOG file using other technique. Here we go.

Open SQL Server Configuration Manager:
Go to Start > All Programs > Microsoft SQL Server 2005 (or 2008) (or 2008 R2) > Configuration Tools > SQL Server Configuration Manager

Once you open Configuration Manager, you would get below screen. There you need to locate your SQL Server Instance, right click and properties.

SQL Server ErrorLog

SQL Server ErrorLog

Here is the Properties window. Come to Advanced tab & Click on drop down for “Startup Parameters” value and you would see three parameters (can be more also). As shown below there would be –d, –e and –l parameters. Value after –e is your SQL Server Error Log location.

<<Click here to see all posts>>

If you found any of the information on this page helpful in anyway then please consider sharing this content with your favorite social network or by leaving your thoughts in the comment section. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

Prove You Are Human Time limit is exhausted. Please reload CAPTCHA.