How to Find SQL Server Logs on the Windows Server? Print

  • 0

When you install SQL Server, you are given options for storing the log files. You can either keep them on disk or create a directory named 'Log' and put them under that folder. 

If you choose to have them on disk, they are stored in C:\Program Files\Microsoft SQL Server\MSSQL.SQLEXPRESS\MSSQL\DATA\LOG

The SQL Server error log contains user-defined events and system events that you can use to troubleshoot problems.

To check the log file location, follow the below steps – 

1. Open SQL Server Management Studio and connect to your SQL Server.

Get the best Windows VPS Hosting.

2. Right-click on the SQL Server hostname and select Properties.

3. Go to the Database Setting tab.
    Here you should see the log file location.

Get the best Windows VPS Hosting


View the logs from SQL Server Management Studio.

1. Log in to the SQL Server Management Studio.

2. Find and expand the Management section under Object Explorer

3. Right-click on SQL Server Logs, select View, and then choose SQL Server Log.

4. Once you click on the SQL Server Logs, you can view the MSSQL Logs.

You can read the current SQL Server error log without specifying any parameter by executing the xp_ReadErrorLog command.

1. Log in to the SQL Server Management Studio.

2. Click on New Query.

3. Enter 'EXEC xp_ReadErrorLog' in the query window.

4. Click on the Execute button or press F5.

That's it.

Get the best Windows VPS Hosting.

Was this answer helpful?

« Back