Skip to main content

database_automatic_tunings

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

Overview

Namedatabase_automatic_tunings
TypeResource
Idazure.sql.database_automatic_tunings

Fields

NameDatatypeDescription
actual_statetextfield from the properties object
databaseNametextfield from the properties object
desired_statetextfield from the properties object
optionstextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdatabaseName, resourceGroupName, serverName, subscriptionIdGets a database's automatic tuning.
updateUPDATEdatabaseName, resourceGroupName, serverName, subscriptionIdUpdate automatic tuning properties for target database.

SELECT examples

Gets a database's automatic tuning.

SELECT
actual_state,
databaseName,
desired_state,
options,
resourceGroupName,
serverName,
subscriptionId
FROM azure.sql.vw_database_automatic_tunings
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

UPDATE example

Updates a database_automatic_tunings resource.

/*+ update */
UPDATE azure.sql.database_automatic_tunings
SET
properties = '{{ properties }}'
WHERE
databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';