0

我已将 Azure SQL 数据库的三个自动调整选项(即强制计划、创建索引、删除索引)的“所需状态”设置为 ON。

数据库兼容级别为150,Query Store操作模式为“读写”。

但是,强制计划设置仍处于关闭状态,并显示消息“已被系统禁用”。这是通过查询确认的sys.database_automatic_tuning_options

我热衷于利用自动计划强制。这可能是什么原因造成的,我能做些什么来解决它?

4

2 回答 2

0

请阅读以下有关该主题的 Microsoft 文章摘录。

请注意,尽管您可能将自动调整选项之一设置为 ON,但如果系统认为有必要保护工作负载性能,可能会决定暂时禁用自动调整。也可能是,如果未在数据库上启用查询存储,或者如果它处于只读状态,这也会导致自动调整暂时禁用。在这种情况下,当前状态的视图将显示“已被系统禁用”,并且 actual_state 列的值为 0。

摘录的第一行提到系统可能决定暂时禁用自动调整选项以保护工作负载性能。在此处阅读完整的文章。

于 2022-02-22T12:55:21.683 回答
0

I could find this documented in the official MS doc here

Automated recommendation management is disabled

In case of error messages that automated recommendation management has been disabled, or simply disabled by system, the most common causes are:

  • Query Store is not enabled, or
  • Query Store is in read-only mode for a specified database, or
  • Query Store stopped running because it used the allocated storage space.

The following steps can be considered to rectify this issue:

  • Clean up the Query Store, or modify the data retention period to "auto" by using T-SQL. See how to configure recommended retention and capture policy for Query Store.
  • Use SQL Server Management Studio (SSMS) and follow these steps:
    • Connect to the Azure SQL Database
    • Right click on the database
    • Go to Properties and click on Query Store
    • Change the Operation Mode to Read-Write
    • Change the Store Capture Mode to Auto
    • Change the Size Based Cleanup Mode to Auto
于 2022-02-22T12:49:14.723 回答