Call Us Today! 1.555.555.555|info@yourdomain.com

Error Log Location for SQL Server

Back to Blog

Error Log Location for SQL Server

Each SQL Server Instance in a machine maintains its own error log. This error log file contains errors and informational events .
Choose your BDRShield Management Console - Cloud or On-Premise:
Hybrid Storage (Local & Cloud)30-Day Free TrialFull-Feature Access
Not sure which console fits your needs? Request Demo ?
By Admin | March 21, 2016

Each SQL Server Instance in a machine maintains its own error log. This error log file contains errors and informational events .

We can find error log location using the following ways.

If SQL Server is in running state , we can find the error log location for that particular SQL Server Instance by executing the below query.

In SSMS paste this command:

USE MASTER

GO

EXEC  xp_readerrorlog 0, 1, N’Logging SQL Server messages in file’, NULL, NULL, N’asc’

GO

The parameters we can use with XP_READERRRORLOG are

Value of error log file you want to read: 0 = current, 1 = Archive #1 etc…

Log file type: 1 or NULL = error log, 2 = SQL Agent log

Search string 1: String one you want to search for

Search string 2: String two you want to search for to further refine the results

Search from start time

Search to end time

Sort order for results: N’asc’ = ascending,  N’desc’ = descending.

Using SQL Server Configuration Manager

Open the Configuration Manager of the SQL Server Instance to which you want to find the error log location.

In SQL Server Configuration Manager go to SQL Server Services.

Using SQL Server Configuration Manager

and then right click on the SQL Server instance to which you want to find the error log location. Go to properties, select Startup Parameters. In that, there will be existing Parameter start with -e that will point the error log location.

SQL Server instance

From Registry

In Registry “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\”

After reaching the above key path ,select Name of the SQL Server Instance name and then MSSQLSERVER\Parameters

Name of the SQL Server Instance

for example,

\MSSQL12.SQLSERVER2014\MSSQLServer\Parameters

In SQLArg1 you can find the error log path in the system.

Got questions? Email us at: vembu-support@vembu.com for answers.

Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.

Rate this post
Avatar for Admin

Admin

Go to Top
Chat Icon