Dela via


Server Automatic Tuning - Update

Uppdatera automatiska justeringsalternativ på servern.

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

URI-parametrar

Name I Obligatorisk Typ Description
resourceGroupName
path True

string

minLength: 1
maxLength: 90

Namnet på resursgruppen. Namnet är skiftlägesokänsligt.

serverName
path True

string

Namnet på servern.

subscriptionId
path True

string (uuid)

ID för målprenumerationen. Värdet måste vara ett UUID.

api-version
query True

string

minLength: 1

Den API-version som ska användas för den här åtgärden.

Begärandetext

Name Typ Description
properties.desiredState

AutomaticTuningServerMode

Automatiskt justera önskat tillstånd.

properties.options

<string,  AutomaticTuningServerOptions>

Definition av automatiska justeringsalternativ.

Svar

Name Typ Description
200 OK

ServerAutomaticTuning

Azure-operationen slutfördes framgångsrikt.

Other Status Codes

ErrorResponse

Ett oväntat felsvar.

Säkerhet

azure_auth

Azure Active Directory OAuth2 Flow.

Typ: oauth2
Flow: implicit
Auktoriseringswebbadress: https://login.microsoftonline.com/common/oauth2/authorize

Omfattningar

Name Description
user_impersonation personifiera ditt användarkonto

Exempel

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

Updates server automatic tuning settings with all properties

Exempelbegäran

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"
      }
    }
  }
}

Exempelsvar

{
  "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

Exempelbegäran

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"
  }
}

Exempelsvar

{
  "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"
      }
    }
  }
}

Definitioner

Name Description
AutomaticTuningOptionModeActual

Verkligt tillstånd för automatisk justeringsalternativ.

AutomaticTuningOptionModeDesired

Önskat tillstånd för alternativ för automatisk justering.

AutomaticTuningServerMode

Automatiskt justera önskat tillstånd.

AutomaticTuningServerOptions

Egenskaper för automatisk justering för enskilda rådgivare.

AutomaticTuningServerReason

Orsaksbeskrivning om önskat och faktiskt tillstånd skiljer sig.

createdByType

Den typ av identitet som skapade resursen.

ErrorAdditionalInfo

Resurshanteringsfelet ytterligare information.

ErrorDetail

Detaljerna om felet.

ErrorResponse

Felsvar

ServerAutomaticTuning

Automatisk justering på servernivå.

systemData

Metadata som rör skapande och senaste ändring av resursen.

AutomaticTuningOptionModeActual

Verkligt tillstånd för automatisk justeringsalternativ.

Värde Description
Off

Av

On

AutomaticTuningOptionModeDesired

Önskat tillstånd för alternativ för automatisk justering.

Värde Description
Off

Av

On

Default

Standardinställning

AutomaticTuningServerMode

Automatiskt justera önskat tillstånd.

Värde Description
Custom

Skräddarsydd

Auto

Automatisk

Unspecified

Ospecificerad

AutomaticTuningServerOptions

Egenskaper för automatisk justering för enskilda rådgivare.

Name Typ Description
actualState

AutomaticTuningOptionModeActual

Verkligt tillstånd för automatisk justeringsalternativ.

desiredState

AutomaticTuningOptionModeDesired

Önskat tillstånd för alternativ för automatisk justering.

reasonCode

integer (int32)

Orsakskod om önskat och faktiskt tillstånd skiljer sig.

reasonDesc

AutomaticTuningServerReason

Orsaksbeskrivning om önskat och faktiskt tillstånd skiljer sig.

AutomaticTuningServerReason

Orsaksbeskrivning om önskat och faktiskt tillstånd skiljer sig.

Värde Description
Default

Standardinställning

Disabled

Inaktiverad

AutoConfigured

AutoConfigured

createdByType

Den typ av identitet som skapade resursen.

Värde Description
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

Resurshanteringsfelet ytterligare information.

Name Typ Description
info

object

Den ytterligare informationen.

type

string

Typen av ytterligare information.

ErrorDetail

Detaljerna om felet.

Name Typ Description
additionalInfo

ErrorAdditionalInfo[]

Felet ytterligare information.

code

string

Felkoden.

details

ErrorDetail[]

Felinformationen.

message

string

Felmeddelandet.

target

string

Felmålet.

ErrorResponse

Felsvar

Name Typ Description
error

ErrorDetail

Felet objektet.

ServerAutomaticTuning

Automatisk justering på servernivå.

Name Typ Description
id

string (arm-id)

Fullständigt kvalificerat resurs-ID för resursen. T.ex. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

Namnet på resursen

properties.actualState

AutomaticTuningServerMode

Automatisk justering av verkligt tillstånd.

properties.desiredState

AutomaticTuningServerMode

Automatiskt justera önskat tillstånd.

properties.options

<string,  AutomaticTuningServerOptions>

Definition av automatiska justeringsalternativ.

systemData

systemData

Azure Resource Manager-metadata som innehåller creationBy och modifiedBy-information.

type

string

Resurstypen. T.ex. "Microsoft. Compute/virtualMachines" eller "Microsoft. Storage/storageAccounts"

systemData

Metadata som rör skapande och senaste ändring av resursen.

Name Typ Description
createdAt

string (date-time)

Tidsstämpeln för resursskapande (UTC).

createdBy

string

Identiteten som skapade resursen.

createdByType

createdByType

Den typ av identitet som skapade resursen.

lastModifiedAt

string (date-time)

Tidsstämpeln för senaste ändring av resurs (UTC)

lastModifiedBy

string

Identiteten som senast ändrade resursen.

lastModifiedByType

createdByType

Den typ av identitet som senast ändrade resursen.