Configure Errorlog Retention - SQL-FineBuild/Common GitHub Wiki
Previous Configure SQL Server Surface Area | Manual Configuration | Backup Service Master Key Next |
---|
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 5AF and is controlled by the parameters below:
SQL Version | Parameter | FULL Build | WORKSTATION Build | CLIENT Build |
---|---|---|---|---|
SQL2019 | /SetupParam: | Yes | Yes | N/A |
SQL2017 | /SetupParam: | Yes | Yes | N/A |
SQL2016 | /SetupParam: | Yes | Yes | N/A |
SQL2014 | /SetupParam: | Yes | Yes | N/A |
SQL2012 | /SetupParam: | Yes | Yes | N/A |
SQL2008R2 | /SetupParam: | Yes | Yes | N/A |
SQL2008 | /SetupParam: | Yes | Yes | N/A |
SQL2005 | /SetupParam: | Yes | Yes | N/A |
In order to maintain compatibility with older versions of SQL FineBuild, the parameter ConfigParam 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.
-
Open the Registry Editor by Start -> Run and type regedit
-
For the default instance navigate to the key below
Substitute the version code of SQL Server you are installing in place of MSSQL10
For a named instance substitute the instance name in place of _.MSSQLSERVER_.
HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQLServer
-
Ensure a DWORD entry exists called NumErrorLogs.
-
Set NumErrorLogs to decimal 31 as shown.
Copyright FineBuild Team © 2012 - 2019. License and Acknowledgements
Previous Configure SQL Server Surface Area | Top | Backup Service Master Key Next |
---|