Via Tim Radney, here’s a quick and easy way to increase the number of error logs from the default of six.

His blog has a walkthrough in SQL Server Management Studio if you prefer the GUI.

[Note: If you copy and paste this code, please be sure to check the quotation marks. WordPress may change them to non-standard format.]

Using TSQL you can execute the following statement to increase to 99 files, simply change 99 to how ever many files you would like to retain.

USE [master];
GO

EXEC xp_instance_regwrite N’HKEY_LOCAL_MACHINE’, N’Software\Microsoft\MSSQLServer\MSSQLServer’, N’NumErrorLogs’, REG_DWORD, 99;
GO