This is a mirror of official site: http://jasper-net.blogspot.com/

Where Is The SQL Server ErrorLog File?

| Thursday, October 21, 2010
I seldom lose things; I just cannot find them as quickly as I’d like. This is true for keys, tools, and yes even ErrorLog files on SQL Server.

On the servers that I configure, I have a standard way of doing things. I set them up using some industry best practices and some standards that I’ve developed over the years. On those servers, I can find the ErrorLog file quickly since it is in a predictable place for me.

Using T-SQL To Find The ErrorLog File
In my consulting practice, I regularly work with SQL Servers that I did not configure. For those servers, I must discover where things are. One technique that I use is to ask SQL Server itself where things are. For example, the following T-SQL query will return the location of the ErrorLog file.

SELECT SERVERPROPERTY(‘ErrorLogFileName’);

It will return something like the following:

E:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG

Read more: WebbTech Solutions

Posted via email from .NET Info

0 comments: