Thursday, January 28, 2010

How to increase the number of SQL Server log files

When ever SQL Server restart or we add a new log file using sp_cycle_errorlog, a new log file is created. SQL Server by default allows 6 log files. After that when a new file is added the oldest is deleted to maintain the total number of files to 6. But what if we want to keep old log files also. For this SQL server provides us an option to set maximum number of allowed log files.  To reset this number go to Management folder > right click SQL Server Logs > Configure > check the check box “Limit the number of error log files before they are recycled” > enter the number of files that you want to retain.


clip_image002

No comments: