Skip to main content

database_automatic_tuning

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

Overview

Namedatabase_automatic_tuning
TypeResource
Idazure.sql.database_automatic_tuning

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
actualStatestringAutomatic tuning actual state. Known values are: "Inherit", "Custom", "Auto", and "Unspecified". (Inherit, Custom, Auto, Unspecified)
desiredStatestringAutomatic tuning desired state. Known values are: "Inherit", "Custom", "Auto", and "Unspecified". (Inherit, Custom, Auto, Unspecified)
optionsobjectAutomatic tuning options definition.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, server_name, database_name, subscription_idGets a database's automatic tuning.
updateupdateresource_group_name, server_name, database_name, subscription_idUpdate 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
database_namestringThe name of the database. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
server_namestringThe name of the server. Required.
subscription_idstring

SELECT examples

Gets a database's automatic tuning.

SELECT
id,
name,
actualState,
desiredState,
options,
systemData,
type
FROM azure.sql.database_automatic_tuning
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND database_name = '{{ database_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

UPDATE examples

Update automatic tuning properties for target database.

UPDATE azure.sql.database_automatic_tuning
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND server_name = '{{ server_name }}' --required
AND database_name = '{{ database_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;