SQL ERRORLOG file is large

You find that the ERRORLOG file in the SQL folder (typically C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log) is very large

This file is where SQL stores the errors that it encounters. The log file begin large is not the cause of the issue, but rather some issue on the SQL server is causing SQL to log lots of errors.


There are 2 parts to this

1. Look in the error log and see what the messages are. If they are genuine issues, then this will need to be investigated.
You can access the logs via SQL management studio - see attached.


2. If you don't care about the issues in the log, or just want to reset the log and start again to see if the messages continue to be logged, do the following
a. load SQL management studio
b. press Ctrl-n to start a new query window
c. enter the command SP_CYCLE_ERRORLOG
d. you can now safely delete any ERRORLOG.x files, leaving ERRORLOG to be the latest (which cannot be deleted)

Have more questions?

Contact us

Was this article helpful?
0 out of 0 found this helpful

Provide feedback for the Documentation team!

Browse this section