Database Automatic Tuning - Update
Perbarui properti penyetelan otomatis untuk database target.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current?api-version=2023-08-01
Parameter URI
| Nama | Dalam | Diperlukan | Jenis | Deskripsi |
|---|---|---|---|---|
|
database
|
path | True |
string |
Nama database. |
|
resource
|
path | True |
string |
Nama grup sumber daya yang berisi sumber daya. Anda dapat memperoleh nilai ini dari API Azure Resource Manager atau portal. |
|
server
|
path | True |
string |
Nama server. |
|
subscription
|
path | True |
string |
ID langganan yang mengidentifikasi langganan Azure. |
|
api-version
|
query | True |
string |
Versi API yang akan digunakan untuk permintaan tersebut. |
Isi Permintaan
| Nama | Jenis | Deskripsi |
|---|---|---|
| properties.desiredState |
Status penyetelan otomatis yang diinginkan. |
|
| properties.options |
<string,
Automatic |
Definisi opsi penyetelan otomatis. |
Respons
| Nama | Jenis | Deskripsi |
|---|---|---|
| 200 OK |
Berhasil memperbarui pengaturan penyetelan otomatis database yang ditentukan. |
|
| Other Status Codes |
Respons Kesalahan: ***
|
Contoh
| Updates database automatic tuning settings with all properties |
| Updates database automatic tuning settings with minimal properties |
Updates database automatic tuning settings with all properties
Permintaan sampel
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=2023-08-01
{
"properties": {
"desiredState": "Auto",
"options": {
"createIndex": {
"desiredState": "Off"
},
"dropIndex": {
"desiredState": "On"
},
"forceLastGoodPlan": {
"desiredState": "Default"
}
}
}
}
Respon sampel
{
"id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/databases/db1/automaticTuning/current",
"name": "current",
"type": "Microsoft.Sql/servers/databases/automaticTuning",
"properties": {
"desiredState": "Auto",
"actualState": "Auto",
"options": {
"forceLastGoodPlan": {
"desiredState": "Default",
"actualState": "On",
"reasonCode": 2,
"reasonDesc": "AutoConfigured"
},
"createIndex": {
"desiredState": "Off",
"actualState": "Off"
},
"dropIndex": {
"desiredState": "On",
"actualState": "On"
},
"maintainIndex": {
"desiredState": "Default",
"actualState": "Off",
"reasonCode": 2,
"reasonDesc": "AutoConfigured"
}
}
}
}
Updates database automatic tuning settings with minimal properties
Permintaan sampel
Respon sampel
{
"id": "/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/databases/db1/automaticTuning/current",
"name": "current",
"type": "Microsoft.Sql/servers/databases/automaticTuning",
"properties": {
"desiredState": "Auto",
"actualState": "Auto",
"options": {
"forceLastGoodPlan": {
"desiredState": "Default",
"actualState": "On",
"reasonCode": 2,
"reasonDesc": "AutoConfigured"
},
"createIndex": {
"desiredState": "Default",
"actualState": "On",
"reasonCode": 2,
"reasonDesc": "AutoConfigured"
},
"dropIndex": {
"desiredState": "Default",
"actualState": "Off",
"reasonCode": 2,
"reasonDesc": "AutoConfigured"
},
"maintainIndex": {
"desiredState": "Default",
"actualState": "Off",
"reasonCode": 2,
"reasonDesc": "AutoConfigured"
}
}
}
}
Definisi
| Nama | Deskripsi |
|---|---|
|
Automatic |
Deskripsi alasan jika diinginkan dan status aktual berbeda. |
|
Automatic |
Status penyetelan otomatis yang diinginkan. |
|
Automatic |
Status aktual opsi penyetelan otomatis. |
|
Automatic |
Status yang diinginkan opsi penyetelan otomatis. |
|
Automatic |
Properti penyetelan otomatis untuk penasihat individual. |
|
Database |
Penyetelan Otomatis tingkat database. |
|
Error |
Info tambahan kesalahan manajemen sumber daya. |
|
Error |
Detail kesalahan. |
|
Error |
Respons kesalahan |
AutomaticTuningDisabledReason
Deskripsi alasan jika diinginkan dan status aktual berbeda.
| Nilai | Deskripsi |
|---|---|
| Default | |
| Disabled | |
| AutoConfigured | |
| InheritedFromServer | |
| QueryStoreOff | |
| QueryStoreReadOnly | |
| NotSupported |
AutomaticTuningMode
Status penyetelan otomatis yang diinginkan.
| Nilai | Deskripsi |
|---|---|
| Inherit | |
| Custom | |
| Auto | |
| Unspecified |
AutomaticTuningOptionModeActual
Status aktual opsi penyetelan otomatis.
| Nilai | Deskripsi |
|---|---|
| Off | |
| On |
AutomaticTuningOptionModeDesired
Status yang diinginkan opsi penyetelan otomatis.
| Nilai | Deskripsi |
|---|---|
| Off | |
| On | |
| Default |
AutomaticTuningOptions
Properti penyetelan otomatis untuk penasihat individual.
| Nama | Jenis | Deskripsi |
|---|---|---|
| actualState |
Status aktual opsi penyetelan otomatis. |
|
| desiredState |
Status yang diinginkan opsi penyetelan otomatis. |
|
| reasonCode |
integer (int32) |
Kode alasan jika diinginkan dan status aktual berbeda. |
| reasonDesc |
Deskripsi alasan jika diinginkan dan status aktual berbeda. |
DatabaseAutomaticTuning
Penyetelan Otomatis tingkat database.
| Nama | Jenis | Deskripsi |
|---|---|---|
| id |
string |
ID Sumber Daya. |
| name |
string |
Nama sumber daya. |
| properties.actualState |
Status aktual penyetelan otomatis. |
|
| properties.desiredState |
Status penyetelan otomatis yang diinginkan. |
|
| properties.options |
<string,
Automatic |
Definisi opsi penyetelan otomatis. |
| type |
string |
Jenis sumber daya. |
ErrorAdditionalInfo
Info tambahan kesalahan manajemen sumber daya.
| Nama | Jenis | Deskripsi |
|---|---|---|
| info |
object |
Info tambahan. |
| type |
string |
Jenis info tambahan. |
ErrorDetail
Detail kesalahan.
| Nama | Jenis | Deskripsi |
|---|---|---|
| additionalInfo |
Info tambahan kesalahan. |
|
| code |
string |
Kode kesalahan. |
| details |
Detail kesalahan. |
|
| message |
string |
Pesan kesalahan. |
| target |
string |
Target kesalahan. |
ErrorResponse
Respons kesalahan
| Nama | Jenis | Deskripsi |
|---|---|---|
| error |
Objek kesalahan. |