Find SQL Server error log file

Saturday, June 20, 2009 |

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