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

The following fields are returned by SELECT queries:

Successfully retrieved database automatic tuning properties.

NameDatatypeDescription
propertiesobjectResource properties.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, serverName, databaseName, subscriptionIdGets a database's automatic tuning.
updateupdateresourceGroupName, serverName, databaseName, subscriptionIdUpdate automatic tuning properties for target database.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
databaseNamestringThe name of the database.
resourceGroupNamestringThe name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverNamestringThe name of the server.
subscriptionIdstringThe subscription ID that identifies an Azure subscription.

SELECT examples

Gets a database's automatic tuning.

SELECT
properties
FROM azure.sql.database_automatic_tunings
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serverName = '{{ serverName }}' -- required
AND databaseName = '{{ databaseName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

UPDATE examples

Update automatic tuning properties for target database.

UPDATE azure.sql.database_automatic_tunings
SET
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND serverName = '{{ serverName }}' --required
AND databaseName = '{{ databaseName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
properties;