database_advisors
Creates, updates, deletes, gets or lists a database_advisors
resource.
Overview
Name | database_advisors |
Type | Resource |
Id | azure.sql.database_advisors |
Fields
- vw_database_advisors
- database_advisors
Name | Datatype | Description |
---|---|---|
advisorName | text | field from the properties object |
advisor_status | text | field from the properties object |
auto_execute_status | text | field from the properties object |
auto_execute_status_inherited_from | text | field from the properties object |
databaseName | text | field from the properties object |
kind | text | Resource kind. |
last_checked | text | field from the properties object |
location | text | Resource location. |
recommendations_status | text | field from the properties object |
recommended_actions | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serverName | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
kind | string | Resource kind. |
location | string | Resource location. |
properties | object | Properties for a Database, Server or Elastic Pool Advisor. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | advisorName, databaseName, resourceGroupName, serverName, subscriptionId | Gets a database advisor. |
update | UPDATE | advisorName, databaseName, resourceGroupName, serverName, subscriptionId | Updates a database advisor. |
list_by_database | EXEC | databaseName, resourceGroupName, serverName, subscriptionId | Gets a list of database advisors. |
SELECT
examples
Gets a database advisor.
- vw_database_advisors
- database_advisors
SELECT
advisorName,
advisor_status,
auto_execute_status,
auto_execute_status_inherited_from,
databaseName,
kind,
last_checked,
location,
recommendations_status,
recommended_actions,
resourceGroupName,
serverName,
subscriptionId
FROM azure.sql.vw_database_advisors
WHERE advisorName = '{{ advisorName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
kind,
location,
properties
FROM azure.sql.database_advisors
WHERE advisorName = '{{ advisorName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
UPDATE
example
Updates a database_advisors
resource.
/*+ update */
UPDATE azure.sql.database_advisors
SET
properties = '{{ properties }}'
WHERE
advisorName = '{{ advisorName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';