We are running much SQL Servers with different located ErrorLogs. Sometimes its useful to find quick the Location from the Logs. I did a Command that gives me the Errorlog location to the Command prompt, so I can copy them on my Client and open it in my lovely Editor for furtherTroubleshooting.
Find the Location of the SQL Server Errorlog SQL Server 2005
C:\ logparser.exe "select strcat(strcat('\\\\\\\\',strcat(computername,'\\\\')),REPLACE\_CHR(REPLACE\_STR(value,'-e', ''), ':', '\$')) from '\\\\MYServer\\HKLM\\SOFTWARE\\Microsoft\\Microsoft SQL Server' where value like '%errorlog%'" -i:REG -recurse:10
Find the Location of the SQL Server Errorlog SQL Server 2000
C:\logparser.exe "select strcat(strcat('\\\\\\\\',strcat(computername,'\\\\')),REPLACE\_CHR(REPLACE\_STR(value, '-e', ''), ':', '\$')) from '\\\\MYServer\\HKLM\\SOFTWARE\\Microsoft\\MSSQLServer' where value like '%errorlog%'" -i:REG -recurse:10
Comments
comments powered by Disqus