Cycle error log


Job details

Name: Cycle error log
Platform: Sqlserver
Category: Maintenance
Premium package: Maintenance package
Description: This task cycle MS SQL Server error log and Agent error log files.
Long description: By default, there are seven SQL Server error logs – Errorlog and Errorlog.1 through Errorlog.6. The name of the current, most recent log is Errorlog with no extension. The log is re-created every time that you restart SQL Server. This task cycle error log and Agent error log files.
Version: 1.1
Default schedule: 15 0 * *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version > ‘1999′ & hasengine=‘YES’]/.[engine_edition = ‘Microsoft SQL Server’ & eng_inst_priv = 0]

Parameters

Name Default value Description
Cycle history 30 Number of days to provide information when the Error log and Agent-Error log has been recycled.
number of SQL Server error logs 7 By default, there are 7 SQL Server error logs – Errorlog and Errorlog.1 through Errorlog.6. This parameter can be used to modify the registry value (REG_DWORD type) to the number of logs that you want to maintain.

Job Summary

EXEC sp_cycle_errorlog;
EXEC sp_cycle_agent_errorlog;
GO

Job Execution Details

Job Parameters Description

Dependencies and Operations

Reporting and Monitoring

Log Type Date
error log Date of cycling the error log
agent error log Date of cycling the agent error log

Scope of Operation

This job targets instances of Microsoft SQL Server that are version 2000 or newer, where the server engine is installed and operational. Specific focus is maintained on instances with “Microsoft SQL Server” edition and where the engine instance privilege is standard.

By structuring operations around established needs related to error log management, this dbWatch Control Center job enhances operational efficiency and system performance, while ensuring adherence to best practices in SQL Server maintenance.