Remove Unnecessary SQL Server Transaction Log Files

Question Info

Dont forget to post your results here on superuser please: I recommend keeping them uncheck the box so that they are not removed. Learn how your comment data is processed. You can often use Notepad to open and read them. The transaction log backup truncates the log file there are some exceptions, which are out of scope of this tip.

Video of the Day


Lastly, A PowerShell script is available to run to clean up this without having to go into each folder. Health Manager runs and collects information about the health of the system. If you have ample space this is fine but if you have an 80GB C: If you need to disable this feature you can do so as follows:. These files are generated almost every hour and are about 50MB in size.

The default registry entry for this is to keep files. I will show you how to adjust this value further down. You can change the default value of files to a number you want by changing the following registry key:. To delete them open up the following location:. If you need any file, right-click on the file and select restore. Having checked the files, if you are sure that you longer need those files, tick the Recycle Bin to clean its content so that HDD space is gained.

Windows Temporary files are again files that are left behind by programs even when you close them. For example, when you open a document in MS Word, you might have seen a related file with the same extension. Like, if you open document. Such files are normally deleted by apps when you close them. The remaining ones can be cleaned up using Disk Cleaner to gain hard disk space in Windows Error Reporting Files are basically logs that contain information about events that lead to an improper Windows or related app behavior.

These are helpful when troubleshooting Windows. I recommend keeping them uncheck the box so that they are not removed. You get some other file categories after clicking on System Files — including Old Windows Installation.

Not all of them are safe to delete. As said earlier, Old Windows Installation helps you rollback to the previous version of Windows. So unless you decide to keep going with the current OS, you have to keep those files. Among other categories are:. These logs help in identifying the errors that happened during the upgrade. If you have successfully upgraded, you can remove them.

Device Driver Packages — contains device drivers which you may have to use in future when a device is not functioning properly.

In most cases, these are but pointers that tell Windows where to look for files. Advice is to keep them. Having made your selections in the disk cleanup software, click on OK to delete the files. When you click on Clean up System Files , it will clean up more junk files. In that case, I might start by running a utility like CCleaner.

One of the options that it may give you is to delete all of the log files. If you continue to run into disk space issues then of course it means using additional tools and techniques to diagnose the problem. The bottom line is that the files are typically just fine as they are. Copy the files to a CD or another drive and then delete them on your hard drive.

Notenboom has been playing with computers since he was required to take a programming class in An 18 year career as a programmer at Microsoft soon followed. After "retiring" in , Leo started Ask Leo! I never thought of deleting log files to gain space. Just now I check how much space they take over files. It took me one minute to know they take 21MB. In my view it is no use to delete them. I just need to install a larger hard drive.

I want comments to be valuable for everyone, including those who come later and take the time to read. Your email address will not be published.

Before You Begin

Leave a Reply