server_advisors
Creates, updates, deletes, gets or lists a server_advisors
resource.
Overview
Name | server_advisors |
Type | Resource |
Id | azure.sql.server_advisors |
Fields
- vw_server_advisors
- server_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 |
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, resourceGroupName, serverName, subscriptionId | Gets a server advisor. |
update | UPDATE | advisorName, resourceGroupName, serverName, subscriptionId | Updates a server advisor. |
list_by_server | EXEC | resourceGroupName, serverName, subscriptionId | Gets a list of server advisors. |
SELECT
examples
Gets a server advisor.
- vw_server_advisors
- server_advisors
SELECT
advisorName,
advisor_status,
auto_execute_status,
auto_execute_status_inherited_from,
kind,
last_checked,
location,
recommendations_status,
recommended_actions,
resourceGroupName,
serverName,
subscriptionId
FROM azure.sql.vw_server_advisors
WHERE advisorName = '{{ advisorName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
kind,
location,
properties
FROM azure.sql.server_advisors
WHERE advisorName = '{{ advisorName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
UPDATE
example
Updates a server_advisors
resource.
/*+ update */
UPDATE azure.sql.server_advisors
SET
properties = '{{ properties }}'
WHERE
advisorName = '{{ advisorName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';