Database Automatic Tuning - Update

Werk de automatische afstemmingseigenschappen voor de doeldatabase bij.

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current?api-version=2025-01-01

URI-parameters

Name In Vereist Type Description
databaseName
path True

string

De naam van de database.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

De naam van de resourcegroep. De naam is hoofdletterongevoelig.

serverName
path True

string

De naam van de server.

subscriptionId
path True

string (uuid)

De id van het doelabonnement. De waarde moet een UUID zijn.

api-version
query True

string

minLength: 1

De API-versie die voor deze bewerking moet worden gebruikt.

Aanvraagbody

Name Type Description
properties.desiredState

AutomaticTuningMode

Automatische afstemmingsstatus.

properties.options

<string,  AutomaticTuningOptions>

Definitie van opties voor automatisch afstemmen.

Antwoorden

Name Type Description
200 OK

DatabaseAutomaticTuning

Azure-operatie succesvol voltooid.

Other Status Codes

ErrorResponse

Een onverwachte foutreactie.

Beveiliging

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Stroom: implicit
Autorisatie-URL: https://login.microsoftonline.com/common/oauth2/authorize

Bereiken

Name Description
user_impersonation Uw gebruikersaccount imiteren

Voorbeelden

Updates database automatic tuning settings with all properties
Updates database automatic tuning settings with minimal properties

Updates database automatic tuning settings with all properties

Voorbeeldaanvraag

PATCH https://management.azure.com/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/databases/db1/automaticTuning/current?api-version=2025-01-01

{
  "properties": {
    "desiredState": "Auto",
    "options": {
      "createIndex": {
        "desiredState": "Off"
      },
      "dropIndex": {
        "desiredState": "On"
      },
      "forceLastGoodPlan": {
        "desiredState": "Default"
      }
    }
  }
}

Voorbeeldrespons

{
  "name": "current",
  "type": "Microsoft.Sql/servers/databases/automaticTuning",
  "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/databases/db1/automaticTuning/current",
  "properties": {
    "actualState": "Auto",
    "desiredState": "Auto",
    "options": {
      "createIndex": {
        "actualState": "Off",
        "desiredState": "Off"
      },
      "dropIndex": {
        "actualState": "On",
        "desiredState": "On"
      },
      "forceLastGoodPlan": {
        "actualState": "On",
        "desiredState": "Default",
        "reasonCode": 2,
        "reasonDesc": "AutoConfigured"
      },
      "maintainIndex": {
        "actualState": "Off",
        "desiredState": "Default",
        "reasonCode": 2,
        "reasonDesc": "AutoConfigured"
      }
    }
  }
}

Updates database automatic tuning settings with minimal properties

Voorbeeldaanvraag

PATCH https://management.azure.com/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/databases/db1/automaticTuning/current?api-version=2025-01-01

{
  "properties": {
    "desiredState": "Auto"
  }
}

Voorbeeldrespons

{
  "name": "current",
  "type": "Microsoft.Sql/servers/databases/automaticTuning",
  "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/databases/db1/automaticTuning/current",
  "properties": {
    "actualState": "Auto",
    "desiredState": "Auto",
    "options": {
      "createIndex": {
        "actualState": "On",
        "desiredState": "Default",
        "reasonCode": 2,
        "reasonDesc": "AutoConfigured"
      },
      "dropIndex": {
        "actualState": "Off",
        "desiredState": "Default",
        "reasonCode": 2,
        "reasonDesc": "AutoConfigured"
      },
      "forceLastGoodPlan": {
        "actualState": "On",
        "desiredState": "Default",
        "reasonCode": 2,
        "reasonDesc": "AutoConfigured"
      },
      "maintainIndex": {
        "actualState": "Off",
        "desiredState": "Default",
        "reasonCode": 2,
        "reasonDesc": "AutoConfigured"
      }
    }
  }
}

Definities

Name Description
AutomaticTuningDisabledReason

Redenbeschrijving indien gewenst en werkelijke status verschillen.

AutomaticTuningMode

Automatische afstemmingsstatus.

AutomaticTuningOptionModeActual

Automatische afstemmingsoptie werkelijke status.

AutomaticTuningOptionModeDesired

Automatische afstemmingsoptie gewenste status.

AutomaticTuningOptions

Eigenschappen voor automatisch afstemmen voor individuele adviseurs.

createdByType

Het type identiteit waarmee de resource is gemaakt.

DatabaseAutomaticTuning

Automatisch afstemmen op databaseniveau.

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

ErrorDetail

De foutdetails.

ErrorResponse

Foutreactie

systemData

Metagegevens met betrekking tot het maken en de laatste wijziging van de resource.

AutomaticTuningDisabledReason

Redenbeschrijving indien gewenst en werkelijke status verschillen.

Waarde Description
Default

Verstek

Disabled

Disabled

AutoConfigured

AutoConfigured

InheritedFromServer

InheritedFromServer

QueryStoreOff

QueryStoreOff

QueryStoreReadOnly

QueryStoreReadOnly

NotSupported

NotSupported

AutomaticTuningMode

Automatische afstemmingsstatus.

Waarde Description
Inherit

Erven

Custom

Op maat gemaakt

Auto

Auto

Unspecified

Onbepaald

AutomaticTuningOptionModeActual

Automatische afstemmingsoptie werkelijke status.

Waarde Description
Off

Uit

On

On

AutomaticTuningOptionModeDesired

Automatische afstemmingsoptie gewenste status.

Waarde Description
Off

Uit

On

On

Default

Verstek

AutomaticTuningOptions

Eigenschappen voor automatisch afstemmen voor individuele adviseurs.

Name Type Description
actualState

AutomaticTuningOptionModeActual

Automatische afstemmingsoptie werkelijke status.

desiredState

AutomaticTuningOptionModeDesired

Automatische afstemmingsoptie gewenste status.

reasonCode

integer (int32)

Redencode is indien gewenst en de werkelijke status anders.

reasonDesc

AutomaticTuningDisabledReason

Redenbeschrijving indien gewenst en werkelijke status verschillen.

createdByType

Het type identiteit waarmee de resource is gemaakt.

Waarde Description
User
Application
ManagedIdentity
Key

DatabaseAutomaticTuning

Automatisch afstemmen op databaseniveau.

Name Type Description
id

string (arm-id)

Volledig gekwalificeerde resource-id voor de resource. Bijvoorbeeld /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceType}/{resourceName}"

name

string

De naam van de resource

properties.actualState

AutomaticTuningMode

Automatische afstemming van de werkelijke status.

properties.desiredState

AutomaticTuningMode

Automatische afstemmingsstatus.

properties.options

<string,  AutomaticTuningOptions>

Definitie van opties voor automatisch afstemmen.

systemData

systemData

Azure Resource Manager metadata met creationBy en modifiedBy informatie.

type

string

Het type bron. Bijvoorbeeld: "Microsoft. Compute/virtualMachines" of "Microsoft. Opslag/opslagAccounts"

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

Name Type Description
info

object

De aanvullende informatie.

type

string

Het extra informatietype.

ErrorDetail

De foutdetails.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

De fout bevat aanvullende informatie.

code

string

De foutcode.

details

ErrorDetail[]

De foutdetails.

message

string

Het foutbericht.

target

string

Het foutdoelwit.

ErrorResponse

Foutreactie

Name Type Description
error

ErrorDetail

Het foutobject.

systemData

Metagegevens met betrekking tot het maken en de laatste wijziging van de resource.

Name Type Description
createdAt

string (date-time)

De tijdstempel van het maken van resources (UTC).

createdBy

string

De identiteit waarmee de resource is gemaakt.

createdByType

createdByType

Het type identiteit waarmee de resource is gemaakt.

lastModifiedAt

string (date-time)

Het tijdstempel van de laatste wijziging van de resource (UTC)

lastModifiedBy

string

De identiteit die de resource voor het laatst heeft gewijzigd.

lastModifiedByType

createdByType

Het type identiteit dat de resource voor het laatst heeft gewijzigd.