Find SQL Server error log file

Whenever you sit to troubleshoot any problem, you always need to look at error log file. There are quite a few different way to find out where error log of SQL Server resides but there is one of the simplest and easy way I used to use always is undocumented method serverproperty(‘errorlogfilename’)
All you need to run is, just following one statement and you will find full path of ErrorLogFile, which you can open in standard text editor.

Reference: Ritesh Shah
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of

Leave a Reply

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

You are commenting using your 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

%d bloggers like this: