-
Notifications
You must be signed in to change notification settings - Fork 10
Configure Errorlog Retention
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.
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 |
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 |
---|
Key SQL FineBuild Links:
SQL FineBuild supports:
- All SQL Server versions from SQL 2019 through to SQL 2005
- Clustered, Non-Clustered and Core implementations of server operating systems
- Availability and Distributed Availability Groups
- 64-bit and (where relevant) 32-bit versions of Windows
The following Windows versions are supported:
- Windows 2022
- Windows 11
- Windows 2019
- Windows 2016
- Windows 10
- Windows 2012 R2
- Windows 8.1
- Windows 2012
- Windows 8
- Windows 2008 R2
- Windows 7
- Windows 2008
- Windows Vista
- Windows 2003
- Windows XP