In C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log there are log files created not everyday but may be two or 3 per day. I am guessing the log files were created while building the maintenance plan. Is it possible to delete some of the old logs? Can it also be deleted automatically?
asked Jul 25 at 02:15 PM in Default
If there are no options within the maintenance plan to automatically clean out those logs, then you'll have to build your own. I'd suggest using SQL Agent and PowerShell to run a script that deletes files older than a certain date. You can use a script similar to this one. I would absolutely make sure you only delete the log files that you are generating though. You don't want to delete files that are important.
answered Jul 29 at 11:59 AM
Grant Fritchey ♦♦