다음을 통해 공유


Database Automatic Tuning - Update

대상 데이터베이스에 대한 자동 튜닝 속성을 업데이트합니다.

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

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
databaseName
path True

string

데이터베이스의 이름입니다.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

리소스 그룹의 이름입니다. 이름은 대소문자를 구분하지 않습니다.

serverName
path True

string

서버의 이름입니다.

subscriptionId
path True

string (uuid)

대상 구독의 ID입니다. 값은 UUID여야 합니다.

api-version
query True

string

minLength: 1

이 작업에 사용할 API 버전입니다.

요청 본문

Name 형식 Description
properties.desiredState

AutomaticTuningMode

원하는 상태를 자동으로 조정합니다.

properties.options

<string,  AutomaticTuningOptions>

자동 튜닝 옵션 정의입니다.

응답

Name 형식 Description
200 OK

DatabaseAutomaticTuning

Azure 운영이 성공적으로 완료되었습니다.

Other Status Codes

ErrorResponse

예기치 않은 오류 응답입니다.

보안

azure_auth

Azure Active Directory OAuth2 Flow.

형식: oauth2
Flow: implicit
권한 부여 URL: https://login.microsoftonline.com/common/oauth2/authorize

범위

Name Description
user_impersonation 사용자 계정 가장

예제

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

Updates database automatic tuning settings with all properties

샘플 요청

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

샘플 응답

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

샘플 요청

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

샘플 응답

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

정의

Name Description
AutomaticTuningDisabledReason

원하는 상태와 실제 상태가 다른 경우 이유 설명입니다.

AutomaticTuningMode

원하는 상태를 자동으로 조정합니다.

AutomaticTuningOptionModeActual

자동 튜닝 옵션 실제 상태입니다.

AutomaticTuningOptionModeDesired

자동 튜닝 옵션 원하는 상태입니다.

AutomaticTuningOptions

개별 관리자에 대한 자동 조정 속성입니다.

createdByType

리소스를 만든 ID의 형식입니다.

DatabaseAutomaticTuning

데이터베이스 수준 자동 튜닝.

ErrorAdditionalInfo

리소스 관리 오류 추가 정보입니다.

ErrorDetail

오류 세부 정보입니다.

ErrorResponse

오류 응답

systemData

리소스의 생성 및 마지막 수정과 관련된 메타데이터입니다.

AutomaticTuningDisabledReason

원하는 상태와 실제 상태가 다른 경우 이유 설명입니다.

Description
Default

기본값

Disabled

비활성화

AutoConfigured

자동 구성

InheritedFromServer

InheritedFromServer

QueryStoreOff

QueryStoreOff

QueryStoreReadOnly

QueryStoreReadOnly

NotSupported

지원되지 않음

AutomaticTuningMode

원하는 상태를 자동으로 조정합니다.

Description
Inherit

상속

Custom

Custom

Auto

자동

Unspecified

지정되지 않음

AutomaticTuningOptionModeActual

자동 튜닝 옵션 실제 상태입니다.

Description
Off

사용 안 함

On

설정

AutomaticTuningOptionModeDesired

자동 튜닝 옵션 원하는 상태입니다.

Description
Off

사용 안 함

On

설정

Default

기본값

AutomaticTuningOptions

개별 관리자에 대한 자동 조정 속성입니다.

Name 형식 Description
actualState

AutomaticTuningOptionModeActual

자동 튜닝 옵션 실제 상태입니다.

desiredState

AutomaticTuningOptionModeDesired

자동 튜닝 옵션 원하는 상태입니다.

reasonCode

integer (int32)

원하는 경우 이유 코드와 실제 상태가 다른 경우.

reasonDesc

AutomaticTuningDisabledReason

원하는 상태와 실제 상태가 다른 경우 이유 설명입니다.

createdByType

리소스를 만든 ID의 형식입니다.

Description
User
Application
ManagedIdentity
Key

DatabaseAutomaticTuning

데이터베이스 수준 자동 튜닝.

Name 형식 Description
id

string (arm-id)

리소스에 대한 정규화된 리소스 ID입니다. 예: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

리소스의 이름

properties.actualState

AutomaticTuningMode

자동 조정 실제 상태입니다.

properties.desiredState

AutomaticTuningMode

원하는 상태를 자동으로 조정합니다.

properties.options

<string,  AutomaticTuningOptions>

자동 튜닝 옵션 정의입니다.

systemData

systemData

Azure Resource Manager 메타데이터에 createdBy 및 modifiedBy 정보가 포함되어 있습니다.

type

string

리소스의 형식입니다. 예를 들어, "Microsoft. 컴퓨트/가상 머신" 또는 "Microsoft." 저장소/저장소 계정"

ErrorAdditionalInfo

리소스 관리 오류 추가 정보입니다.

Name 형식 Description
info

object

추가 정보입니다.

type

string

추가 정보 유형입니다.

ErrorDetail

오류 세부 정보입니다.

Name 형식 Description
additionalInfo

ErrorAdditionalInfo[]

오류 추가 정보입니다.

code

string

오류 코드입니다.

details

ErrorDetail[]

오류 세부 정보입니다.

message

string

오류 메시지입니다.

target

string

오류 대상입니다.

ErrorResponse

오류 응답

Name 형식 Description
error

ErrorDetail

오류 개체입니다.

systemData

리소스의 생성 및 마지막 수정과 관련된 메타데이터입니다.

Name 형식 Description
createdAt

string (date-time)

리소스 만들기의 타임스탬프(UTC)입니다.

createdBy

string

리소스를 만든 ID입니다.

createdByType

createdByType

리소스를 만든 ID의 형식입니다.

lastModifiedAt

string (date-time)

리소스 마지막 수정의 타임스탬프(UTC)

lastModifiedBy

string

리소스를 마지막으로 수정한 ID입니다.

lastModifiedByType

createdByType

리소스를 마지막으로 수정한 ID의 형식입니다.