How do I look at my error log if SQL won’t open?

1

October 22, 2018 by Kenneth Fisher

Quick and easy post today. Hopefully you’ve opened the error log on a SQL instance. However, what happens if you don’t have the log viewer in SSMS? In fact, the instance won’t come up at all so you really need to see what went wrong.

Fortunately, the error logs in SQL are just text files, even though they don’t actually have that extension. The trick is knowing where they are.

If you need to you can generally look up the location in the startup parameters in SQL Server Configuration Manager.

Parameter -e

-eC:\Program Files\Microsoft SQL Server\MSSQL13.SQL2016CS\MSSQL\Log\ERRORLOG

This means that the log files will be in the log directory with the pattern ERRORLOG.[number]. Now, this is the directory for my log files. Yours should follow this pattern:

-e[InstallDrive]:\Program Files\Microsoft SQL Server\MSSQL[VersionNumber].[InstanceName]\MSSQL\Log\ERRORLOG

The current log file is ERRORLOG with the most recent one ERRORLOG.1. For each older one add 1 to the file extension. Note, that means that when you recycle the log (start a new log file) every file gets renamed, and the oldest one is deleted.

Anyway, once you’ve navigated to the path you can open any of the error log files up with notepad and easily read them. The most recent information will be at the bottom of the file.

One thought on “How do I look at my error log if SQL won’t open?

  1. […] Kenneth Fisher shows us where error logs are located and how to read them outside of SQL Server: […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 2,465 other followers

Follow me on Twitter

ToadWorld Pro of the Month November 2013
%d bloggers like this: