Aracılığıyla paylaş


Server Automatic Tuning - Update

Sunucudaki otomatik ayarlama seçeneklerini güncelleştirin.

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

URI Parametreleri

Name İçinde Gerekli Tür Description
resourceGroupName
path True

string

Kaynağı içeren kaynak grubunun adı. Bu değeri Azure Resource Manager API'sinden veya portaldan alabilirsiniz.

serverName
path True

string

Sunucunun adı.

subscriptionId
path True

string

Azure aboneliğini tanımlayan abonelik kimliği.

api-version
query True

string

İstek için kullanılacak API sürümü.

İstek Gövdesi

Name Tür Description
properties.desiredState

AutomaticTuningServerMode

otomatik ayarlama istenen durum.

properties.options

<string,  AutomaticTuningServerOptions>

Otomatik ayarlama seçenekleri tanımı.

Yanıtlar

Name Tür Description
200 OK

ServerAutomaticTuning

Sunucu düzeyinde otomatik ayarlama seçenekleri başarıyla güncelleştirildi.

Other Status Codes

ErrorResponse

Hata Yanıtları: ***

  • 400 FeatureDisabledOnSelectedEdition - Kullanıcı geçerli veritabanı sürümünde devre dışı bırakılmış bir özelliği kullanmaya çalıştı.

  • 400 InvalidIdentifier - Tanımlayıcı NULL veya geçersiz bir unicode karakter içeriyor.

  • 400 InvalidAutomaticTuningUpsertRequest - Güncelleştirme otomatik ayarlama isteği gövdesi yok veya özellik nesnesi yok.

  • 400 InvalidAdvisorAutoExecuteStatus - Danışman için belirtilen otomatik yürütme durumuna izin verilmiyor.

  • 404 SubscriptionDoesNotHaveServer - İstenen sunucu bulunamadı

  • 404 DatabaseDoesNotExist - İstenen veritabanı bulunamadı

  • 404 SubscriptionDoesNotHaveElasticPool - İstenen elastik havuz bulunamadı

  • 404 OperationIdNotFound - Kimliği olan işlem yok.

  • 404 AutomaticTuningOptionNotFound - İstenen otomatik ayarlama seçeneği bulunamadı.

  • 405 Desteklenmiyor - Bu işlev desteklenmez.

  • 409 Çakışması - İstekteki çakışma nedeniyle istek işlenemedi.

  • 409 CannotCancelOperation - Yönetim işlemi iptal edilemeyen bir durumda.

  • 409 OperationCancelled - İşlem kullanıcı tarafından iptal edildi.

  • 409 İşlem Kesildi - Kaynak üzerindeki işlem, aynı kaynak üzerindeki başka bir işlem tarafından kesildiği için tamamlanamadı.

  • 409 DefaultAdvisorStateNotAllowedInCustomServerMode - ÖZEL modda DEFAULT danışmanı durumuna izin verilmiyor

  • 409 UpdateNotAllowedIfServerAutotuningUpdateOperationInProgress - Önceki istekteki otomatik ayarlama ayarları tüm kullanıcı veritabanlarına yayılmadı.

  • 429 SubscriptionTooManyCreateUpdateRequests - Kullanılabilir kaynaklar tarafından işlenebilen maksimum isteğin ötesindeki istekler.

  • 429 SubscriptionTooManyRequests - Kullanılabilir kaynaklar tarafından işlenebilen maksimum isteğin ötesindeki istekler.

  • 500 OperationTimedOut - İşlem zaman aşımına uğradı ve otomatik olarak geri alındı. Lütfen işlemi yeniden deneyin.

  • 503 ServiceTemporarilyUnavailable - Özellik geçici olarak kullanılamıyor.

  • 503 TooManyRequests - Kullanılabilir kaynaklar tarafından işlenebilen maksimum isteğin ötesindeki istekler.

Örnekler

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

Updates server automatic tuning settings with all properties

Örnek isteği

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

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

Örnek yanıt

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

Updates server automatic tuning settings with minimal properties

Örnek isteği

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

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

Örnek yanıt

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

Tanımlar

Name Description
AutomaticTuningOptionModeActual

Otomatik ayarlama seçeneği gerçek durumu.

AutomaticTuningOptionModeDesired

Otomatik ayarlama seçeneği istenen durum.

AutomaticTuningServerMode

otomatik ayarlama istenen durum.

AutomaticTuningServerOptions

Tek tek danışmanlar için otomatik ayarlama özellikleri.

AutomaticTuningServerReason

İstenen durum ve gerçek durum farklıysa neden açıklaması.

ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

ErrorDetail

Hata ayrıntısı.

ErrorResponse

Hata yanıtı

ServerAutomaticTuning

Sunucu düzeyinde Otomatik Ayarlama.

AutomaticTuningOptionModeActual

Otomatik ayarlama seçeneği gerçek durumu.

Değer Description
Off
On

AutomaticTuningOptionModeDesired

Otomatik ayarlama seçeneği istenen durum.

Değer Description
Off
On
Default

AutomaticTuningServerMode

otomatik ayarlama istenen durum.

Değer Description
Custom
Auto
Unspecified

AutomaticTuningServerOptions

Tek tek danışmanlar için otomatik ayarlama özellikleri.

Name Tür Description
actualState

AutomaticTuningOptionModeActual

Otomatik ayarlama seçeneği gerçek durumu.

desiredState

AutomaticTuningOptionModeDesired

Otomatik ayarlama seçeneği istenen durum.

reasonCode

integer (int32)

İstenirse neden kodu ve gerçek durum farklıdır.

reasonDesc

AutomaticTuningServerReason

İstenen durum ve gerçek durum farklıysa neden açıklaması.

AutomaticTuningServerReason

İstenen durum ve gerçek durum farklıysa neden açıklaması.

Değer Description
Default
Disabled
AutoConfigured

ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

Name Tür Description
info

object

Ek bilgiler.

type

string

Ek bilgi türü.

ErrorDetail

Hata ayrıntısı.

Name Tür Description
additionalInfo

ErrorAdditionalInfo[]

Hata ek bilgileri.

code

string

Hata kodu.

details

ErrorDetail[]

Hata ayrıntıları.

message

string

Hata iletisi.

target

string

Hata hedefi.

ErrorResponse

Hata yanıtı

Name Tür Description
error

ErrorDetail

Hata nesnesi.

ServerAutomaticTuning

Sunucu düzeyinde Otomatik Ayarlama.

Name Tür Description
id

string

Kaynak Kimliği.

name

string

Kaynak adı.

properties.actualState

AutomaticTuningServerMode

Gerçek durumu otomatik ayarlama.

properties.desiredState

AutomaticTuningServerMode

otomatik ayarlama istenen durum.

properties.options

<string,  AutomaticTuningServerOptions>

Otomatik ayarlama seçenekleri tanımı.

type

string

Kaynak türü.