SQL Server MSSQL LOG

Hey Guys,
We are running low on space our SQL server. I found a lot of old log files that could free up some space. I was wondering if this would cause any trouble? File path look as follows on server.
C:\Program Files\Microsoft SQL Server\MSSQL15.KINETICSQL\MSSQL\Log

It is full of old maintenance log files, Trace Data files, and extended log files.

There should be no issue with clearing all of those out, but unless there are a ton of them it won’t make a big difference.

1 Like

From what I see, the files look recent, so I would not just delete.
Do a Backup of the DB and Transaction Logs, which will clean them up and also enable Circular logging for just a bit to clear them out and then turn off Circular Logging to create them freshly again.
As Greg mentioned though, they don’t look like they are taking that much space from your screenshot, and if things are that tight, it might be best to also look at moving the LOG files to another disk which you can do so they are not on the same disk as your DB. The logs will grow automatically so they can run you out of space!
Good Luck and good thing you caught it before a total down issue.
See this thread:
How do you clear the SQL Server transaction log? - Stack Overflow

1 Like

There are many utilities, even windows ones that will help diagnose/identify disk usage like windirstat. As mentioned previously if your SQL maintenance is not up to snuff then you will start running short of space…

One culprit can be the tempdb, if you have not restarted SQL server in a while it will grow, restarting will reduce its size back to its original defined value.

I suggested windirstat as an example, it is not an endorsement.

I ended up finding copies of the original database back ups that we used for the initial data migration. Once for live, one for test. Both over 80GB. Deleted them and now we have plenty of space.