Filter to select date is grayed out when optimizing indexes for Spotlight Statistic Repository
説明
In the Optimize Indexes tab, when a Spotlight Statistics Repository is chosen for a source, after filling in the database of the source, the database, and the monitored instance, it will not allow a date to be selected for the collection date. That filter is grayed out and has a little warning symbol after it that says "There isn't date collcted in current selected criteria" when hovered over. However, that selected criteria has been collecting.
原因
The procedures that SQL Optimizer runs to gather the date for the specified criteria looks for Top SQL Statements. If these are not being collected, then it will not see a date to chose from. By default, Top SQL Statements which is controlled by Query Execution Statistics collection are not collected in Spotlight.
対策
Adjust the Spotlight collection configuration:
In Spotlight, select Configure | Schedule option
Select a monitored SQL Server connection from the top drop down list
Scroll down the list of collections and select Query Execution Statistics collection. Edit the collection.
Uncheck Factory Settings optoin and Check Store Data option
Adjust the interval collection if needed and click OK and OK to save
Wait at least an hour or two and try Optimize Indexes option again