0

...plus several ERRORLOG.x files ranging from 200MB to 2.1GB ...

I installed SQL Server 2017 in January for an assignment, but haven't used it since then. Now the logs files are hogging 22.8GB of space, with recent datestamps - how is that possible? What can I do to remove them - just delete them?

2

Log files are created by the SQL Server service, not by SSMS. If you installed with the default settings, you can stop and restart the service multiple times (or just call sp_cycle_errorlog repeatedly), and that should cycle away the big log files that are there. They'll come back, though, over time - even if you don't open SSMS.

If you don't need SQL Server to be running anymore, disable the service or, if you don't need it at all, uninstall it. You can also uninstall full-text search if you aren't using it (or never needed it). Those FT logs might be from that service.

| improve this answer | |
  • 2
    Instead of restarting the service you could also call sp_cycle_errorlog as often as your maximum number of error log files. – sticky bit Jun 3 '18 at 16:19
  • Thanks @Aaron, but if I'm not using SSMS or any other SQL Server service that I know of, why are log files being generated? Have I setup something that is running in the background all the time? How do I shut it down, short of uninstalling? – James Jun 4 '18 at 10:59
  • 1
    @James, look into the log files and read messages inside to figure it out – Denis Rubashkin Jun 4 '18 at 11:20
  • 2
    @James Again, it doesn't matter if you're using SSMS or not; stop thinking about SSMS, as it has nothing to do with the service. This is like saying your shoe soles won't wear down if you walk the same amount but use yellow laces or switch to velcro. If the SQL Server service is running, you don't even have to be logged on. It's a service that generates logs by virtue of running, only part of that is dependent on user input or interaction of any kind (as in that can change the amount of logging that happens, but not whether or not logging happens). – Aaron Bertrand Jun 4 '18 at 16:43
0

You should not be ignoring log files that balloon in size. They are logging critical events that are slamming your running Instance.

  • SQL Server does not normally have large logs.

You point out it has not been used in 4months. Do you have a job that is failing? System level errors that need addressing?

  • Try to peak into the logs before you simply cycle or truncate them.

Perhaps you missed something basic or forgot to provide permissions to that repeating package you setup to run every few minutes

In conclusion: Professionally, build up good practices that will save you down the road.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.