Delen via


Server Automatic Tuning - Update

Opties voor automatisch afstemmen op de server bijwerken.

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

URI-parameters

Name In Vereist Type Description
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

AutomaticTuningServerMode

Automatische afstemmingsstatus.

properties.options

<string,  AutomaticTuningServerOptions>

Definitie van opties voor automatisch afstemmen.

Antwoorden

Name Type Description
200 OK

ServerAutomaticTuning

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 server automatic tuning settings with all properties
Updates server automatic tuning settings with minimal properties

Updates server 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/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/automaticTuning",
  "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/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 server 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/automaticTuning/current?api-version=2025-01-01

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

Voorbeeldrespons

{
  "name": "current",
  "type": "Microsoft.Sql/servers/automaticTuning",
  "id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/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
AutomaticTuningOptionModeActual

Automatische afstemmingsoptie werkelijke status.

AutomaticTuningOptionModeDesired

Automatische afstemmingsoptie gewenste status.

AutomaticTuningServerMode

Automatische afstemmingsstatus.

AutomaticTuningServerOptions

Eigenschappen voor automatisch afstemmen voor individuele adviseurs.

AutomaticTuningServerReason

Redenbeschrijving indien gewenst en werkelijke status verschillen.

createdByType

Het type identiteit waarmee de resource is gemaakt.

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

ErrorDetail

De foutdetails.

ErrorResponse

Foutreactie

ServerAutomaticTuning

Automatisch afstemmen op serverniveau.

systemData

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

AutomaticTuningOptionModeActual

Automatische afstemmingsoptie werkelijke status.

Waarde Description
Off

Uit

On

On

AutomaticTuningOptionModeDesired

Automatische afstemmingsoptie gewenste status.

Waarde Description
Off

Uit

On

On

Default

Verstek

AutomaticTuningServerMode

Automatische afstemmingsstatus.

Waarde Description
Custom

Op maat gemaakt

Auto

Auto

Unspecified

Onbepaald

AutomaticTuningServerOptions

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

AutomaticTuningServerReason

Redenbeschrijving indien gewenst en werkelijke status verschillen.

AutomaticTuningServerReason

Redenbeschrijving indien gewenst en werkelijke status verschillen.

Waarde Description
Default

Verstek

Disabled

Disabled

AutoConfigured

AutoConfigured

createdByType

Het type identiteit waarmee de resource is gemaakt.

Waarde Description
User
Application
ManagedIdentity
Key

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.

ServerAutomaticTuning

Automatisch afstemmen op serverniveau.

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

AutomaticTuningServerMode

Automatische afstemming van de werkelijke status.

properties.desiredState

AutomaticTuningServerMode

Automatische afstemmingsstatus.

properties.options

<string,  AutomaticTuningServerOptions>

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"

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.