xp_instance_regwrite question

  • 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?

  • I believe this setting will take effect after SQL agent restart....so restart the agent and check the value...

     

    MohammedU
    Microsoft SQL Server MVP

  • Restarting SQL Server Agent did not resolve the issue. In reallity the restart should not even occur because the setting does not depend on the restart

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply