Skip to main content

server_advisors

Creates, updates, deletes, gets or lists a server_advisors resource.

Overview

Nameserver_advisors
TypeResource
Idazure.sql.server_advisors

Fields

NameDatatypeDescription
advisorNametextfield from the properties object
advisor_statustextfield from the properties object
auto_execute_statustextfield from the properties object
auto_execute_status_inherited_fromtextfield from the properties object
kindtextResource kind.
last_checkedtextfield from the properties object
locationtextResource location.
recommendations_statustextfield from the properties object
recommended_actionstextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTadvisorName, resourceGroupName, serverName, subscriptionIdGets a server advisor.
updateUPDATEadvisorName, resourceGroupName, serverName, subscriptionIdUpdates a server advisor.
list_by_serverEXECresourceGroupName, serverName, subscriptionIdGets a list of server advisors.

SELECT examples

Gets a server advisor.

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 }}';

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 }}';