Pages

Tuesday, May 17, 2016

Find the ErrorLog path in SQL Server 2012 through Query


One other way, that we could get the path of the ErrorLog  in SQL Server 2012,when the SQL Server service is running  is through this DMV.  we can find out the Error Log Path.

SELECT is_enabled,[path],max_size,max_files
FROM
Sys.dm_os_server_diagnostics_log_configurations



Executing this DMV will give valuable information about the ErrorLog  like
  •  Path indicating the location of the diagnostic logs.
  •  Maximum size in megabytes to which each of the diagnostic logs can grow.
  •  Maximum number of diagnostic log files that can be stored on the computer before they are recycled for new diagnostic logs.
  •  If logging is enabled or not.
Regards
R.Karthikeyan