I am trying to change the value for JobHistoryMaxRows via following command
xp_instance_regwrite
'HKEY_LOCAL_MACHINE', 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\SQLServerAgent', N'JobHistoryMaxRows', 'REG_DWORD', 10000
But when I do a refresh on the agent properties it does not reflect the modification.
When I do
exec master.dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\SQLServerAgent','JobHistoryMaxRows'
it shows the new number
Did anyone run across the same problem?