This project has moved and is read-only. For the latest updates, please go here.

Previous Configure SQL Server Surface Area Manual Configuration Backup Service Master Key Next

Configure Errorlog Retention

FineBuild can configure SQL Errorlog Retention to optimise manageability.

The SQL Server ERRORLOG file contains a lot of useful diagnostics, but the file can grow very large, making it difficult to view using Management Studio.

In order to keep the file size under some degree of control a job is run every day at midnight to create a new ERRORLOG file.

It is desired to keep about 1 month’s history for ERRORLOG details, so the default value for the number of files to be retained needs to be adjusted. To do this, a change must be made to the SQL Server Registry.

FineBuild Errorlog Retention configuration

The SQL Errorlog Retention configuration relates to Process Id 5BA and is controlled by the parameters below:

Parameter Build SQL2005 SQL2008 SQL2008 R2 SQL2012 SQL2014 SQL2016 SQL2017
SetupSQLServer FULL Yes Yes Yes Yes Yes Yes Yes
SetupSQLServer WORKSTATION Yes Yes Yes Yes Yes Yes Yes

In order to maintain compatibility with older versions of SQL FineBuild, the parameter ConfigSQLServer can also be used.

FineBuild also uses the following parameters to help configure Errorlog Retention:

Parameter Default Value Description
NumErrorLogs 31 Controls maximum number of Errorlog files that are retained


Manual Errorlog Retention configuration

The following steps show what you would have to do for manual SQL Errorlog Retention configuration. FineBuild does all of this work for you automatically.

1) Open the Registry Editor by Start -> Run and type regedit
2) For the default instance navigate to the following entry. For a named instance substitute the instance name in place of .MSSQLSERVER\.
HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQLServer 

3) Ensure a DWORD entry exists called NumErrorLogs.
4) Set NumErrorLogs to decimal 31 as shown.
Copyright FineBuild Team © 2012 - 2017. License and Acknowledgements
Previous Configure SQL Server Surface Area Top Backup Service Master Key Next

Last edited Jan 6 at 3:54 PM by EdVassie, version 7