Skip to main content

database_advisors

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

Overview

Namedatabase_advisors
TypeResource
Idazure.sql.database_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
databaseNametextfield 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, databaseName, resourceGroupName, serverName, subscriptionIdGets a database advisor.
updateUPDATEadvisorName, databaseName, resourceGroupName, serverName, subscriptionIdUpdates a database advisor.
list_by_databaseEXECdatabaseName, resourceGroupName, serverName, subscriptionIdGets a list of database advisors.

SELECT examples

Gets a database advisor.

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

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