Problem Description: Open SQL Server automatic backup, backup files more and more, there is no timely cleanup, resulting in insufficient server space, backup error, so that a few g of errorlog files, affecting the system login management.
Workaround: Periodically clean up SQL Server errorlog files.
Log file: SQL Server saves 7 errorlog files by default, named: errorlog errorlog.1 errorlog.2 errorlog.3 errorlog.4 errorlog.5 Errorlog.6
Cleanup method: As soon as we execute the sp_cycle_errorlog stored procedure, the errorlog.6 is deleted, the other log number is automatically added 1, and a new errorlog is created, that is, as long as 7 sp_cycle_errorlog is executed, will be able to delete all previously generated error logs.
Automatic cleanup: How do I process logs on a regular basis? The answer is to use SQL Server Agent, add the job, execute once a day sp_cycle_errorlog!
Automatic cleanup of Sqlservererrorlog error logs to avoid too much