Where is my SQL Error log?
Today I found a new (for me), undocumented method for identifying the location of the SQL Error log. I knew you could either check the registry or use SQL Server Configuration Manager and the "startup parameters" option. I ran SQL Profiler while opening up a SQL Error log in SQL Server Management Studio and found that SERVERPROPERTY has an option called 'ErrorLogFileName', as demonstrated here:
SELECT SERVERPROPERTY('ErrorLogFileName')
Again - you won't find it in Books Online, so it is officially undocumented with all the risks that implies - but useful for large environments where you're not always sure where the error logs reside and need to collect them directly for root cause analysis.