SQL Server Script to increase number of ErrorlogsKunal RanpuraJul 28, 20191 min read--Below script will change the number of SQL Server errorslogs to 10USE [master]GOEXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorLogs', REG_DWORD, 10GO
--Below script will change the number of SQL Server errorslogs to 10USE [master]GOEXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorLogs', REG_DWORD, 10GO
SQL Server Agent Job to recycle error logUSE [msdb] GO /****** Object: Job [sp_cycle_errorlog] Script Date: 08/26/2014 10:44:11 ******/ BEGIN TRANSACTION DECLARE @ReturnCode...
Configure SQL Server Agent Job HistoryUSE [msdb] GO EXEC msdb.dbo.sp_set_sqlagent_properties @jobhistory_max_rows=10000, @jobhistory_max_rows_per_job=1000
Comments