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.
SELECT SERVERPROPERTY(‘ErrorLogFileName’)



Reference: Ritesh Shah
http://www.sqlhub.com
Note: Microsoft Books online is a default reference of all articles but examples and explanations prepared by Ritesh Shah, founder of
http://www.SQLHub.com
Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: