你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Database Advisors - List By Database

获取数据库顾问的列表。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors?api-version=2020-11-01-preview
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors?$expand={$expand}&api-version=2020-11-01-preview

URI 参数

Name In Required Type Description
databaseName
path True
  • string

数据库的名称。

resourceGroupName
path True
  • string

包含该资源的资源组名称。 可以从 Azure 资源管理器 API 或门户获取此值。

serverName
path True
  • string

服务器的名称。

subscriptionId
path True
  • string

用于标识 Azure 订阅的订阅 ID。

api-version
query True
  • string

要用于请求的 API 版本。

$expand
query
  • string

要包括在响应中的子资源。

响应

Name Type Description
200 OK

已成功检索数据库顾问列表。

Other Status Codes

错误响应: ***

  • 400 FeatureDisabledOnSelectedEdition - 用户尝试使用当前数据库版本上禁用的功能。

  • 400 InvalidIdentifier - 标识符包含 NULL 或无效 unicode 字符。

  • 400 DataWarehouseNotSupported - SQL Data Warehouse不支持自动优化。

  • 404 DatabaseDoesNotExist - 找不到请求的数据库

  • 404 SubscriptionDoesNotHaveServer - 找不到请求的服务器

  • 404 SubscriptionDoesNotHaveElasticPool - 找不到请求的弹性池

  • 404 AdvisorNotFound - 找不到请求的顾问。

  • 405 NotSupported - 此功能不受支持。

  • 409 冲突 - 由于请求中的冲突,无法处理请求。

  • 503 ServiceTemporarilyUnavailable - 功能暂时不可用。

示例

List of database advisors
List of database recommended actions for all advisors

List of database advisors

Sample Request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors?api-version=2020-11-01-preview

Sample Response

[
  {
    "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex",
    "name": "CreateIndex",
    "type": "Microsoft.Sql/servers/databases/advisors",
    "location": "East Asia",
    "kind": "",
    "properties": {
      "advisorStatus": "GA",
      "autoExecuteStatus": "Disabled",
      "autoExecuteStatusInheritedFrom": "Database",
      "recommendationsStatus": "Ok",
      "lastChecked": "2017-06-20T00:24:39Z"
    }
  },
  {
    "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex",
    "name": "DropIndex",
    "type": "Microsoft.Sql/servers/databases/advisors",
    "location": "East Asia",
    "kind": "",
    "properties": {
      "advisorStatus": "GA",
      "autoExecuteStatus": "Disabled",
      "autoExecuteStatusInheritedFrom": "Database",
      "recommendationsStatus": "DbSeemsTuned",
      "lastChecked": "2017-06-19T20:42:43Z"
    }
  },
  {
    "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DbParameterization",
    "name": "DbParameterization",
    "type": "Microsoft.Sql/servers/databases/advisors",
    "location": "East Asia",
    "kind": "",
    "properties": {
      "advisorStatus": "GA",
      "autoExecuteStatus": "Enabled",
      "autoExecuteStatusInheritedFrom": "Database",
      "recommendationsStatus": "DbParameterizationIssue",
      "lastChecked": "2017-06-19T19:13:03Z"
    }
  },
  {
    "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/SchemaIssue",
    "name": "SchemaIssue",
    "type": "Microsoft.Sql/servers/databases/advisors",
    "location": "East Asia",
    "kind": "",
    "properties": {
      "advisorStatus": "PublicPreview",
      "autoExecuteStatus": "Disabled",
      "autoExecuteStatusInheritedFrom": "Default",
      "recommendationsStatus": "SchemaIsNotConsistent",
      "lastChecked": "2017-06-20T14:00:32Z"
    }
  },
  {
    "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/ForceLastGoodPlan",
    "name": "ForceLastGoodPlan",
    "type": "Microsoft.Sql/servers/databases/advisors",
    "location": "East Asia",
    "kind": "",
    "properties": {
      "advisorStatus": "PrivatePreview",
      "autoExecuteStatus": "Disabled",
      "autoExecuteStatusInheritedFrom": "Default"
    }
  }
]

Sample Request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors?$expand=recommendedActions&api-version=2020-11-01-preview

Sample Response

[
  {
    "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex",
    "name": "CreateIndex",
    "type": "Microsoft.Sql/servers/databases/advisors",
    "location": "East Asia",
    "kind": "",
    "properties": {
      "advisorStatus": "GA",
      "autoExecuteStatus": "Disabled",
      "autoExecuteStatusInheritedFrom": "Database",
      "recommendationsStatus": "Ok",
      "lastChecked": "2017-06-20T16:39:16Z",
      "recommendedActions": [
        {
          "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB",
          "name": "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB",
          "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions",
          "location": "East Asia",
          "kind": "",
          "properties": {
            "recommendationReason": "",
            "validSince": "2017-03-01T14:38:04Z",
            "lastRefresh": "2017-03-01T14:38:04Z",
            "state": {
              "currentValue": "Active",
              "lastModified": "2017-06-20T15:15:40Z"
            },
            "isExecutableAction": true,
            "isRevertableAction": true,
            "isArchivedAction": false,
            "score": 1,
            "implementationDetails": {
              "method": "TSql",
              "script": "CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)"
            },
            "errorDetails": {},
            "estimatedImpact": [
              {
                "dimensionName": "ActionDuration",
                "unit": "Seconds",
                "absoluteValue": 1440
              },
              {
                "dimensionName": "SpaceChange",
                "unit": "Megabytes",
                "absoluteValue": 209.3125
              }
            ],
            "observedImpact": [],
            "timeSeries": [],
            "details": {
              "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B",
              "indexType": "NONCLUSTERED",
              "schema": "[CRM]",
              "table": "[DataPoints]",
              "indexColumns": "[Name],[Money],[Power]",
              "includedColumns": "[Hour], [System], [LastChanged]"
            }
          }
        },
        {
          "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC",
          "name": "IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC",
          "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions",
          "location": "East Asia",
          "kind": "",
          "properties": {
            "recommendationReason": "",
            "validSince": "2017-03-01T14:38:05Z",
            "lastRefresh": "2017-03-01T14:38:05Z",
            "state": {
              "currentValue": "Success",
              "actionInitiatedBy": "User",
              "lastModified": "2017-03-01T14:38:05Z"
            },
            "isExecutableAction": true,
            "isRevertableAction": true,
            "isArchivedAction": false,
            "executeActionStartTime": "2017-03-01T14:38:05Z",
            "executeActionDuration": "PT1M",
            "executeActionInitiatedBy": "User",
            "executeActionInitiatedTime": "2017-03-01T14:38:05Z",
            "score": 3,
            "implementationDetails": {
              "method": "TSql",
              "script": "DROP INDEX [nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC] ON [dbo].[DataPoints]"
            },
            "errorDetails": {},
            "estimatedImpact": [
              {
                "dimensionName": "ActionDuration",
                "unit": "Seconds",
                "absoluteValue": 5040
              },
              {
                "dimensionName": "SpaceChange",
                "unit": "Megabytes",
                "absoluteValue": 120
              }
            ],
            "observedImpact": [
              {
                "dimensionName": "AffectedQueriesCpuUtilization",
                "unit": "CpuCores",
                "changeValueAbsolute": -12.7,
                "changeValueRelative": -0.9
              },
              {
                "dimensionName": "CpuUtilization",
                "unit": "CpuCores",
                "changeValueAbsolute": -12.7,
                "changeValueRelative": -0.3175
              },
              {
                "dimensionName": "QueriesWithImprovedPerformance",
                "unit": "Count",
                "absoluteValue": 12
              },
              {
                "dimensionName": "QueriesWithRegressedPerformance",
                "unit": "Count",
                "absoluteValue": 1
              },
              {
                "dimensionName": "SpaceChange",
                "unit": "Megabytes",
                "absoluteValue": 130.742187
              },
              {
                "dimensionName": "VerificationProgress",
                "unit": "Percent",
                "absoluteValue": 0
              }
            ],
            "timeSeries": [],
            "details": {
              "indexName": "nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC",
              "indexType": "NONCLUSTERED",
              "schema": "[dbo]",
              "table": "[DataPoints]",
              "indexColumns": "[Name],[Money]",
              "includedColumns": "[Power],[Pineapple]",
              "indexActionStartTime": "2017-03-01T14:38:05.337",
              "indexActionDuration": "00:01:00"
            }
          }
        },
        {
          "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[dbo]_[Employees]_560E15A98D14CA09BDFB",
          "name": "IR_[dbo]_[Employees]_560E15A98D14CA09BDFB",
          "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions",
          "location": "East Asia",
          "kind": "",
          "properties": {
            "recommendationReason": "",
            "validSince": "2017-03-01T14:38:05Z",
            "lastRefresh": "2017-03-01T14:38:05Z",
            "state": {
              "currentValue": "Active",
              "lastModified": "2017-03-01T14:38:05Z"
            },
            "isExecutableAction": true,
            "isRevertableAction": true,
            "isArchivedAction": false,
            "score": 3,
            "implementationDetails": {
              "method": "TSql",
              "script": "CREATE NONCLUSTERED INDEX [nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE] ON [dbo].[Employees] ([City], [State]) INCLUDE ([Postal]) WITH (ONLINE = ON)"
            },
            "errorDetails": {},
            "estimatedImpact": [
              {
                "dimensionName": "ActionDuration",
                "unit": "Seconds",
                "absoluteValue": 17
              },
              {
                "dimensionName": "SpaceChange",
                "unit": "Megabytes",
                "absoluteValue": 128
              }
            ],
            "observedImpact": [],
            "timeSeries": [],
            "details": {
              "indexName": "nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE",
              "indexType": "NONCLUSTERED",
              "schema": "[dbo]",
              "table": "[Employees]",
              "indexColumns": "[City], [State]",
              "includedColumns": "[Postal]"
            }
          }
        }
      ]
    }
  },
  {
    "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex",
    "name": "DropIndex",
    "type": "Microsoft.Sql/servers/databases/advisors",
    "location": "East Asia",
    "kind": "",
    "properties": {
      "advisorStatus": "GA",
      "autoExecuteStatus": "Disabled",
      "autoExecuteStatusInheritedFrom": "Database",
      "recommendationsStatus": "DbSeemsTuned",
      "lastChecked": "2017-06-19T20:42:43Z",
      "recommendedActions": [
        {
          "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints1]_13ADA5F354E9E14A983B",
          "name": "IR_[CRM]_[DataPoints1]_13ADA5F354E9E14A983B",
          "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions",
          "location": "East Asia",
          "kind": "",
          "properties": {
            "recommendationReason": "Unused",
            "validSince": "2017-03-01T14:38:05Z",
            "lastRefresh": "2017-03-01T14:38:05Z",
            "state": {
              "currentValue": "Pending",
              "actionInitiatedBy": "System",
              "lastModified": "2017-03-23T14:14:35Z"
            },
            "isExecutableAction": true,
            "isRevertableAction": true,
            "isArchivedAction": false,
            "executeActionInitiatedBy": "System",
            "executeActionInitiatedTime": "2017-03-23T14:14:35Z",
            "score": 1,
            "implementationDetails": {
              "method": "TSql",
              "script": "DROP INDEX [IX_FF] ON [CRM].[DataPoints1]"
            },
            "errorDetails": {},
            "estimatedImpact": [
              {
                "dimensionName": "ActionDuration",
                "unit": "Seconds",
                "absoluteValue": 645
              },
              {
                "dimensionName": "SpaceChange",
                "unit": "Megabytes",
                "absoluteValue": 342
              }
            ],
            "observedImpact": [],
            "timeSeries": [],
            "details": {
              "indexName": "IX_FF",
              "originalIndexName": "IX_COM_SKU_SKUDepartmentID",
              "indexType": "NONCLUSTERED",
              "schema": "[CRM]",
              "table": "[DataPoints1]",
              "indexColumns": "[Protocol],[SessionId]",
              "includedColumns": "[Apple]"
            }
          }
        },
        {
          "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints1]_29AEA82685D24704DE1A",
          "name": "IR_[CRM]_[DataPoints1]_29AEA82685D24704DE1A",
          "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions",
          "location": "East Asia",
          "kind": "",
          "properties": {
            "recommendationReason": "Duplicate",
            "validSince": "2017-03-01T14:38:05Z",
            "lastRefresh": "2017-03-01T14:38:05Z",
            "state": {
              "currentValue": "Pending",
              "actionInitiatedBy": "System",
              "lastModified": "2017-03-01T14:38:05Z"
            },
            "isExecutableAction": true,
            "isRevertableAction": true,
            "isArchivedAction": false,
            "executeActionInitiatedBy": "System",
            "executeActionInitiatedTime": "2017-03-01T14:38:05Z",
            "score": 1,
            "implementationDetails": {
              "method": "TSql",
              "script": "DROP INDEX [MyIndex123] ON [CRM].[DataPoints1]"
            },
            "errorDetails": {},
            "estimatedImpact": [
              {
                "dimensionName": "ActionDuration",
                "unit": "Seconds",
                "absoluteValue": 803
              },
              {
                "dimensionName": "SpaceChange",
                "unit": "Megabytes",
                "absoluteValue": 144.6875
              }
            ],
            "observedImpact": [],
            "timeSeries": [],
            "details": {
              "indexName": "MyIndex123",
              "originalIndexName": "IX_COM_SKU_SKUDepartmentID",
              "indexType": "NONCLUSTERED",
              "schema": "[CRM]",
              "table": "[DataPoints1]",
              "indexColumns": "[Cookies],[SessionId]",
              "includedColumns": "[Apple]"
            }
          }
        },
        {
          "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints2]_E4B21F229379807E531A",
          "name": "IR_[CRM]_[DataPoints2]_E4B21F229379807E531A",
          "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions",
          "location": "East Asia",
          "kind": "",
          "properties": {
            "recommendationReason": "Duplicate",
            "validSince": "2017-03-01T14:38:05Z",
            "lastRefresh": "2017-03-01T14:38:05Z",
            "state": {
              "currentValue": "Success",
              "actionInitiatedBy": "User",
              "lastModified": "2017-03-01T14:38:05Z"
            },
            "isExecutableAction": true,
            "isRevertableAction": true,
            "isArchivedAction": false,
            "executeActionStartTime": "2017-03-01T14:38:05Z",
            "executeActionDuration": "PT1M",
            "executeActionInitiatedBy": "User",
            "executeActionInitiatedTime": "2017-03-01T14:38:05Z",
            "score": 1,
            "implementationDetails": {
              "method": "TSql",
              "script": "CREATE NONCLUSTERED INDEX [MyIndex321] ON [CRM].[DataPoints2] ([Cookies],[SessionId],[Protocol]) INCLUDE ([Apple]) WITH (ONLINE = ON)"
            },
            "errorDetails": {},
            "estimatedImpact": [
              {
                "dimensionName": "ActionDuration",
                "unit": "Seconds",
                "absoluteValue": 705
              },
              {
                "dimensionName": "SpaceChange",
                "unit": "Megabytes",
                "absoluteValue": 342
              }
            ],
            "observedImpact": [
              {
                "dimensionName": "AffectedQueriesCpuUtilization",
                "unit": "CpuCores",
                "changeValueAbsolute": 0,
                "changeValueRelative": 0
              },
              {
                "dimensionName": "CpuUtilization",
                "unit": "CpuCores",
                "changeValueAbsolute": 0,
                "changeValueRelative": 0
              },
              {
                "dimensionName": "QueriesWithImprovedPerformance",
                "unit": "Count",
                "absoluteValue": 0
              },
              {
                "dimensionName": "QueriesWithRegressedPerformance",
                "unit": "Count",
                "absoluteValue": 0
              },
              {
                "dimensionName": "SpaceChange",
                "unit": "Megabytes",
                "absoluteValue": -342
              },
              {
                "dimensionName": "VerificationProgress",
                "unit": "Percent",
                "absoluteValue": 0
              }
            ],
            "timeSeries": [],
            "details": {
              "indexName": "MyIndex321",
              "originalIndexName": "IX_COM_SKU_SKUDepartmentID",
              "indexType": "NONCLUSTERED",
              "schema": "[CRM]",
              "table": "[DataPoints2]",
              "indexColumns": "[Cookies],[SessionId],[Protocol]",
              "includedColumns": "[Apple]",
              "indexActionStartTime": "2017-03-01T14:38:05.697",
              "indexActionDuration": "00:01:00"
            }
          }
        },
        {
          "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[dbo]_[FactFinance]_13ADA5F354E9E14A983B",
          "name": "IR_[dbo]_[FactFinance]_13ADA5F354E9E14A983B",
          "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions",
          "location": "East Asia",
          "kind": "",
          "properties": {
            "recommendationReason": "Duplicate",
            "validSince": "2017-03-01T14:38:05Z",
            "lastRefresh": "2017-03-01T14:38:05Z",
            "state": {
              "currentValue": "Success",
              "actionInitiatedBy": "System",
              "lastModified": "2017-02-28T14:38:05Z"
            },
            "isExecutableAction": true,
            "isRevertableAction": true,
            "isArchivedAction": false,
            "executeActionStartTime": "2017-03-01T14:38:05Z",
            "executeActionDuration": "PT1M",
            "executeActionInitiatedBy": "System",
            "executeActionInitiatedTime": "2017-03-01T14:38:05Z",
            "score": 1,
            "implementationDetails": {
              "method": "TSql",
              "script": "CREATE NONCLUSTERED INDEX [IX_FF] ON [dbo].[FactFinance] ([FinanceKey],[DateKey]) INCLUDE ([OrganizationKey]) WITH (ONLINE = ON)"
            },
            "errorDetails": {},
            "estimatedImpact": [
              {
                "dimensionName": "ActionDuration",
                "unit": "Seconds",
                "absoluteValue": 705
              },
              {
                "dimensionName": "SpaceChange",
                "unit": "Megabytes",
                "absoluteValue": 342
              }
            ],
            "observedImpact": [
              {
                "dimensionName": "AffectedQueriesCpuUtilization",
                "unit": "CpuCores",
                "changeValueAbsolute": 0,
                "changeValueRelative": 0
              },
              {
                "dimensionName": "CpuUtilization",
                "unit": "CpuCores",
                "changeValueAbsolute": 0,
                "changeValueRelative": 0
              },
              {
                "dimensionName": "QueriesWithImprovedPerformance",
                "unit": "Count",
                "absoluteValue": 0
              },
              {
                "dimensionName": "QueriesWithRegressedPerformance",
                "unit": "Count",
                "absoluteValue": 0
              },
              {
                "dimensionName": "SpaceChange",
                "unit": "Megabytes",
                "absoluteValue": -342
              },
              {
                "dimensionName": "VerificationProgress",
                "unit": "Percent",
                "absoluteValue": 0
              }
            ],
            "timeSeries": [],
            "details": {
              "indexName": "IX_FF",
              "originalIndexName": "IX_COM_SKU_SKUDepartmentID",
              "indexType": "NONCLUSTERED",
              "schema": "[dbo]",
              "table": "[FactFinance]",
              "indexColumns": "[FinanceKey],[DateKey]",
              "includedColumns": "[OrganizationKey]",
              "indexActionStartTime": "2017-03-01T14:38:05.837",
              "indexActionDuration": "00:01:00"
            }
          }
        }
      ]
    }
  },
  {
    "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DbParameterization",
    "name": "DbParameterization",
    "type": "Microsoft.Sql/servers/databases/advisors",
    "location": "East Asia",
    "kind": "",
    "properties": {
      "advisorStatus": "GA",
      "autoExecuteStatus": "Enabled",
      "autoExecuteStatusInheritedFrom": "Database",
      "recommendationsStatus": "DbParameterizationIssue",
      "lastChecked": "2017-06-19T19:13:03Z",
      "recommendedActions": [
        {
          "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DbParameterization/recommendedActions/ForceDbParameterization",
          "name": "ForceDbParameterization",
          "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions",
          "location": "East Asia",
          "kind": "",
          "properties": {
            "recommendationReason": "",
            "validSince": "2017-03-01T14:37:44Z",
            "lastRefresh": "2017-03-01T14:37:44Z",
            "state": {
              "currentValue": "Pending",
              "actionInitiatedBy": "System",
              "lastModified": "2017-05-11T15:08:31Z"
            },
            "isExecutableAction": true,
            "isRevertableAction": true,
            "isArchivedAction": false,
            "executeActionInitiatedBy": "System",
            "executeActionInitiatedTime": "2017-05-11T15:08:31Z",
            "score": 3,
            "implementationDetails": {
              "method": "TSql",
              "script": "ALTER DATABASE [IndexAdvisor_test_3] SET PARAMETERIZATION FORCED"
            },
            "errorDetails": {},
            "estimatedImpact": [
              {
                "dimensionName": "CpuSavings",
                "unit": "Percent",
                "changeValueAbsolute": 22.5613696939135
              },
              {
                "dimensionName": "QueryDurationDecrease",
                "unit": "secs",
                "changeValueAbsolute": 0.701823681806341
              }
            ],
            "observedImpact": [],
            "timeSeries": []
          }
        }
      ]
    }
  },
  {
    "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/SchemaIssue",
    "name": "SchemaIssue",
    "type": "Microsoft.Sql/servers/databases/advisors",
    "location": "East Asia",
    "kind": "",
    "properties": {
      "advisorStatus": "PublicPreview",
      "autoExecuteStatus": "Disabled",
      "autoExecuteStatusInheritedFrom": "Default",
      "recommendationsStatus": "SchemaIsNotConsistent",
      "lastChecked": "2017-06-20T18:50:21Z",
      "recommendedActions": [
        {
          "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/SchemaIssue/recommendedActions/SchemaProblem_1A258C5714A7410C9D23",
          "name": "SchemaProblem_1A258C5714A7410C9D23",
          "type": "Microsoft.Sql/servers/databases/advisors/recommendedActions",
          "location": "East Asia",
          "kind": "",
          "properties": {
            "recommendationReason": "SchemaProblem",
            "validSince": "2017-03-01T14:37:48Z",
            "lastRefresh": "2017-06-07T22:19:53Z",
            "state": {
              "currentValue": "Active",
              "lastModified": "2017-03-01T14:37:48Z"
            },
            "isExecutableAction": false,
            "isRevertableAction": false,
            "isArchivedAction": false,
            "score": 3,
            "implementationDetails": {},
            "errorDetails": {},
            "estimatedImpact": [],
            "observedImpact": [],
            "timeSeries": [],
            "details": {
              "sqlErrorNumber": 208,
              "sqlErrorMessage": "Invalid object name 'dbo.Companies'.",
              "sqlErrorCount": 342482
            }
          }
        }
      ]
    }
  },
  {
    "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/ForceLastGoodPlan",
    "name": "ForceLastGoodPlan",
    "type": "Microsoft.Sql/servers/databases/advisors",
    "location": "East Asia",
    "kind": "",
    "properties": {
      "advisorStatus": "PrivatePreview",
      "autoExecuteStatus": "Disabled",
      "autoExecuteStatusInheritedFrom": "Default",
      "recommendedActions": []
    }
  }
]

定义

Advisor

数据库、服务器或弹性池顾问。

AdvisorStatus

获取此顾问对客户的可用性状态。 可能的值为“GA”、“PublicPreview”、“LimitedPublicPreview”和“PrivatePreview”。

AutoExecuteStatus

获取自动执行状态 (是否让系统执行此顾问的建议) 。 可能的值为“Enabled”和“Disabled”

AutoExecuteStatusInheritedFrom

获取从中继承自动执行状态的当前值的资源。 可以在 (上设置自动执行状态,并从资源层次结构中的) 不同级别继承。 在未在任何级别) 上显式设置状态时,可能的值为“Subscription”、“Server”、“ElasticPool”、“Database”和“Default”。 (。

ImplementationMethod

获取可手动实现此建议操作的方法。 例如,TSql、AzurePowerShell。

IsRetryable

获取是否可以忽略错误,并重试建议的操作。 可能的值为:是/否

RecommendedAction

数据库、服务器或弹性池建议的操作。

RecommendedActionCurrentState

建议的操作处于当前状态。 一些常用的状态是:活动 -> 建议的操作处于活动状态,尚未执行任何操作。 挂起 -> 建议的操作已批准并等待执行。 正在执行 -> 在用户数据库上应用建议的操作。 验证 -> 已应用建议的操作,并正在由系统验证其有用性。 成功 -> 在验证期间应用建议的操作并改进。 挂起还原 -> 验证发现很少或没有改进,因此建议的操作排队进行还原,或者用户已手动还原。 还原 -> 在用户数据库上还原应用建议操作时所做的更改。 还原 -> 已成功还原用户数据库的建议操作所做的更改。 已忽略 -> 用户显式忽略/放弃建议的操作。

RecommendedActionErrorInfo

包含Azure SQL 数据库、服务器或弹性池建议操作的错误信息。

RecommendedActionImpactRecord

包含Azure SQL 数据库、服务器或弹性池建议操作对各种指标的估计或观察到影响的信息。

RecommendedActionImplementationInfo

包含有关Azure SQL 数据库、服务器或弹性池推荐操作的手动实现的信息。

RecommendedActionInitiatedBy

获取启动执行此建议操作的人员。 可能的值是:用户 -> 当用户显式通知系统应用建议的操作时。 系统 -> 当此顾问的自动执行状态设置为“已启用”时,在这种情况下,系统会应用它。

RecommendedActionMetricInfo

包含Azure SQL 数据库、服务器或弹性池建议操作的各种受影响的指标的时序。

RecommendedActionStateInfo

包含Azure SQL 数据库、服务器或弹性池推荐操作的当前状态信息。

Advisor

数据库、服务器或弹性池顾问。

Name Type Description
id
  • string

资源 ID。

kind
  • string

资源类型。

location
  • string

资源位置。

name
  • string

资源名称。

properties.advisorStatus

获取此顾问对客户的可用性状态。 可能的值为“GA”、“PublicPreview”、“LimitedPublicPreview”和“PrivatePreview”。

properties.autoExecuteStatus

获取自动执行状态 (是否让系统执行此顾问的建议) 。 可能的值为“Enabled”和“Disabled”

properties.autoExecuteStatusInheritedFrom

获取从中继承自动执行状态的当前值的资源。 可以在 (上设置自动执行状态,并从资源层次结构中的) 不同级别继承。 在未在任何级别) 上显式设置状态时,可能的值为“Subscription”、“Server”、“ElasticPool”、“Database”和“Default”。 (。

properties.lastChecked
  • string

获取针对此顾问的建议分析当前资源的时间。

properties.recommendationsStatus
  • string

获取此顾问的建议的状态,以及没有任何建议的原因。 可能的值包括但不限于“确定” (推荐可用) ,LowActivity (没有足够的工作负荷来分析) ,“DbSeemsTuned” (数据库) 表现良好等。

properties.recommendedActions

获取此顾问的建议操作。

type
  • string

资源类型。

AdvisorStatus

获取此顾问对客户的可用性状态。 可能的值为“GA”、“PublicPreview”、“LimitedPublicPreview”和“PrivatePreview”。

Name Type Description
GA
  • string
LimitedPublicPreview
  • string
PrivatePreview
  • string
PublicPreview
  • string

AutoExecuteStatus

获取自动执行状态 (是否让系统执行此顾问的建议) 。 可能的值为“Enabled”和“Disabled”

Name Type Description
Default
  • string
Disabled
  • string
Enabled
  • string

AutoExecuteStatusInheritedFrom

获取从中继承自动执行状态的当前值的资源。 可以在 (上设置自动执行状态,并从资源层次结构中的) 不同级别继承。 在未在任何级别) 上显式设置状态时,可能的值为“Subscription”、“Server”、“ElasticPool”、“Database”和“Default”。 (。

Name Type Description
Database
  • string
Default
  • string
ElasticPool
  • string
Server
  • string
Subscription
  • string

ImplementationMethod

获取可手动实现此建议操作的方法。 例如,TSql、AzurePowerShell。

Name Type Description
AzurePowerShell
  • string
TSql
  • string

IsRetryable

获取是否可以忽略错误,并重试建议的操作。 可能的值为:是/否

Name Type Description
No
  • string
Yes
  • string

RecommendedAction

数据库、服务器或弹性池建议的操作。

Name Type Description
id
  • string

资源 ID。

kind
  • string

资源类型。

location
  • string

资源位置。

name
  • string

资源名称。

properties.details
  • object

获取特定于此建议操作的其他详细信息。

properties.errorDetails

获取错误详细信息(如果以及为何将此建议的操作置于错误状态)。

properties.estimatedImpact

获取此建议操作的估计影响信息,例如估计的 CPU 增益、估计磁盘空间更改

properties.executeActionDuration
  • string

获取在用户资源上应用此建议操作所花费的时间。 例如,创建索引所需的时间

properties.executeActionInitiatedBy

获取用户/系统是否批准应用此建议的操作。

properties.executeActionInitiatedTime
  • string

获取批准执行此建议操作的时间。

properties.executeActionStartTime
  • string

获取系统开始对用户资源应用此建议操作的时间。 例如,索引创建开始时间

properties.implementationDetails

获取此建议操作的实现详细信息,供用户手动应用。

properties.isArchivedAction
  • boolean

获取此建议操作是否在一段时间前建议,但用户选择忽略此操作,并且系统再次添加了新的建议操作。

properties.isExecutableAction
  • boolean

获取此建议的操作是否可由用户操作

properties.isRevertableAction
  • boolean

获取用户是否可以还原此建议操作应用的更改

properties.lastRefresh
  • string

获取上次刷新此建议操作的时间。

properties.linkedObjects
  • string[]

获取链接的对象(如果有)。

properties.observedImpact

获取此建议操作的观察到/实际影响信息,例如实际 CPU 增益、实际磁盘空间更改

properties.recommendationReason
  • string

获取建议此操作的原因。 例如,DuplicateIndex

properties.revertActionDuration
  • string

获取在用户资源上还原此建议操作更改所花费的时间。 例如,删除创建的索引所需的时间。

properties.revertActionInitiatedBy

获取用户/系统是否批准还原此建议的操作。

properties.revertActionInitiatedTime
  • string

获取批准此建议操作进行还原的时间。

properties.revertActionStartTime
  • string

获取系统开始在用户资源上还原此建议操作更改的时间。 例如,执行索引删除的时间。

properties.score
  • integer

获取此建议操作的影响。 可能的值为 1 - 低影响,2 - 中等影响和 3 - 高影响

properties.state

获取建议操作处于的当前状态的信息。

properties.timeSeries

获取此建议操作的指标的时序信息,例如 CPU 消耗时序

properties.validSince
  • string

获取自此建议操作有效以来的时间。

type
  • string

资源类型。

RecommendedActionCurrentState

建议的操作处于当前状态。 一些常用的状态是:活动 -> 建议的操作处于活动状态,尚未执行任何操作。 挂起 -> 建议的操作已批准并等待执行。 正在执行 -> 在用户数据库上应用建议的操作。 验证 -> 已应用建议的操作,并正在由系统验证其有用性。 成功 -> 在验证期间应用建议的操作并改进。 挂起还原 -> 验证发现很少或没有改进,因此建议的操作排队进行还原,或者用户已手动还原。 还原 -> 在用户数据库上还原应用建议操作时所做的更改。 还原 -> 已成功还原用户数据库的建议操作所做的更改。 已忽略 -> 用户显式忽略/放弃建议的操作。

Name Type Description
Active
  • string
Error
  • string
Executing
  • string
Expired
  • string
Ignored
  • string
Monitoring
  • string
Pending
  • string
PendingRevert
  • string
Resolved
  • string
RevertCancelled
  • string
Reverted
  • string
Reverting
  • string
Success
  • string
Verifying
  • string

RecommendedActionErrorInfo

包含Azure SQL 数据库、服务器或弹性池建议操作的错误信息。

Name Type Description
errorCode
  • string

获取建议的操作被置于错误状态的原因。 例如,DatabaseHasQdsOff、IndexAlreadyExists

isRetryable

获取是否可以忽略错误,并重试建议的操作。 可能的值为:是/否

RecommendedActionImpactRecord

包含Azure SQL 数据库、服务器或弹性池建议操作对各种指标的估计或观察到影响的信息。

Name Type Description
absoluteValue
  • number

获取此维度的绝对值(如果适用)。 例如,受影响的查询数

changeValueAbsolute
  • number

获取此维度的值的绝对更改。 例如,以兆字节为单位的绝对磁盘空间更改

changeValueRelative
  • number

获取此维度的值的相对变化。 例如,相对磁盘空间在百分比更改

dimensionName
  • string

获取影响维度的名称。 例如,CPUChange、DiskSpaceChange、NumberOfQueriesAffected。

unit
  • string

获取影响维度的名称。 例如,CPUChange、DiskSpaceChange、NumberOfQueriesAffected。

RecommendedActionImplementationInfo

包含有关Azure SQL 数据库、服务器或弹性池推荐操作的手动实现的信息。

Name Type Description
method

获取可手动实现此建议操作的方法。 例如,TSql、AzurePowerShell。

script
  • string

获取手动实现脚本。 例如,可以在数据库上执行的 T-SQL 脚本。

RecommendedActionInitiatedBy

获取启动执行此建议操作的人员。 可能的值是:用户 -> 当用户显式通知系统应用建议的操作时。 系统 -> 当此顾问的自动执行状态设置为“已启用”时,在这种情况下,系统会应用它。

Name Type Description
System
  • string
User
  • string

RecommendedActionMetricInfo

包含Azure SQL 数据库、服务器或弹性池建议操作的各种受影响的指标的时序。

Name Type Description
metricName
  • string

获取指标的名称。 例如,CPU、查询数。

startTime
  • string

获取此 MetricInfo 给出的时间间隔的开始时间。

timeGrain
  • string

获取此 MetricInfo 给出的值的时间间隔持续时间。 例如,PT1H (1 小时)

unit
  • string

获取度量指标的单位。 例如,DTU、频率

value
  • number

获取此 MetricInfo 给出的时间间隔内指标的值。

RecommendedActionStateInfo

包含Azure SQL 数据库、服务器或弹性池推荐操作的当前状态信息。

Name Type Description
actionInitiatedBy

获取启动执行此建议操作的人员。 可能的值是:用户 -> 当用户显式通知系统应用建议的操作时。 系统 -> 当此顾问的自动执行状态设置为“已启用”时,在这种情况下,系统会应用它。

currentValue

建议的操作处于当前状态。 一些常用的状态是:活动 -> 建议的操作处于活动状态,尚未执行任何操作。 挂起 -> 建议的操作已批准并等待执行。 正在执行 -> 在用户数据库上应用建议的操作。 验证 -> 已应用建议的操作,并正在由系统验证其有用性。 成功 -> 在验证期间应用建议的操作并改进。 挂起还原 -> 验证发现很少或没有改进,因此建议的操作排队进行还原,或者用户已手动还原。 还原 -> 在用户数据库上还原应用建议操作时所做的更改。 还原 -> 已成功还原用户数据库的建议操作所做的更改。 已忽略 -> 用户显式忽略/放弃建议的操作。

lastModified
  • string

获取上次修改状态的时间