Is it possible to change the time when the Fragmented Indexes check is run?

All of our index maintenance is currently scheduled for Sunday afternoon, as it's our lowest load time.

This means the check for fragmented indexes happens about 12 hours before the indexes are rebuilt each week, leaving continuously active alerts.

How can we change the scheduled time that this check runs?
Tagged:

Best Answers

  • Alex BAlex B Posts: 1,153 Diamond 4
    Hi @mikef ,

    Yes it is possible.  You can do this in two ways - 

    The most direct is to open the RedGate.Response.Engine.Alerting.Base.Service.exe.settings.config file located at %ProgramData%\Red Gate\SQL Monitor .  You will want to make sure that you make a backup of this file should your changes cause an issue. To do it, scroll down to the <schedule> tag which should look like this:
    <div>&nbsp; &nbsp; &nbsp; <schedule qualifiedChannelName="[Cluster].[SqlServer].[Database].[Table].[Index]"></div><div>&nbsp; &nbsp; &nbsp; &nbsp; <weeklySchedule dayOfWeek="Sunday" hour="1" minute="00"/></div><div>&nbsp; &nbsp; &nbsp; </schedule></div>
    The Fragmented Index check is the only one that is represented here by default and you can  see from above that it is happening on Sunday at 0100 AM.  If you change the day or the hour and restart the SQL Monitor Base Monitor service that will change it.

    The other way is to use the ConfigurationFileEditor.exe from the install directory C:\Program Files\Red Gate\SQL Monitor\BaseMonitor .  You will want to make a backup of the file above just the same and run the utility as an administrator. Open up the config file listed above and scroll down to the [Cluster].[SqlServer].[Database].[Table].[Index] entry and make the change there and save it.  This should ensure that the file is modified correctly, but takes an extra step essentially.

    The other options in here are the other collections (some of them are headings I think and don't actually represent a collection) so be careful if you modify any others as it will affect all the collections of all the entities you are monitoring.  If you check the box it will show you the default sampling frequency at the right; anything unchecked will use the default.

    I hope that helps.

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
  • mikefmikef Posts: 5 Bronze 2
    Brilliant - thanks for the help :)
Sign In or Register to comment.