Database Automatic Tuning - Update
Automatische afstemmingseigenschappen voor doeldatabase bijwerken.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current?api-version=2023-08-01
URI-parameters
| Name | In | Vereist | Type | Description |
|---|---|---|---|---|
|
database
|
path | True |
string |
De naam van de database. |
|
resource
|
path | True |
string |
De naam van de resourcegroep die de resource bevat. U kunt deze waarde verkrijgen via de Azure Resource Manager-API of de portal. |
|
server
|
path | True |
string |
De naam van de server. |
|
subscription
|
path | True |
string |
De abonnements-id waarmee een Azure-abonnement wordt geïdentificeerd. |
|
api-version
|
query | True |
string |
De API-versie die moet worden gebruikt voor de aanvraag. |
Aanvraagbody
| Name | Type | Description |
|---|---|---|
| properties.desiredState |
Automatische afstemmingsstatus. |
|
| properties.options |
<string,
Automatic |
Definitie van opties voor automatisch afstemmen. |
Antwoorden
| Name | Type | Description |
|---|---|---|
| 200 OK |
De opgegeven instellingen voor automatisch afstemmen van de database zijn bijgewerkt. |
|
| Other Status Codes |
Foutreacties: ***
|
Voorbeelden
| Updates database automatic tuning settings with all properties |
| Updates database automatic tuning settings with minimal properties |
Updates database 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/databases/db1/automaticTuning/current?api-version=2023-08-01
{
"properties": {
"desiredState": "Auto",
"options": {
"createIndex": {
"desiredState": "Off"
},
"dropIndex": {
"desiredState": "On"
},
"forceLastGoodPlan": {
"desiredState": "Default"
}
}
}
}
Voorbeeldrespons
{
"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
Voorbeeldaanvraag
Voorbeeldrespons
{
"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"
}
}
}
}
Definities
| Name | Description |
|---|---|
|
Automatic |
Redenbeschrijving indien gewenst en werkelijke status verschillen. |
|
Automatic |
Automatische afstemmingsstatus. |
|
Automatic |
Automatische afstemmingsoptie werkelijke status. |
|
Automatic |
Automatische afstemmingsoptie gewenste status. |
|
Automatic |
Eigenschappen voor automatisch afstemmen voor individuele adviseurs. |
|
Database |
Automatisch afstemmen op databaseniveau. |
|
Error |
Aanvullende informatie over de resourcebeheerfout. |
|
Error |
De foutdetails. |
|
Error |
Foutreactie |
AutomaticTuningDisabledReason
Redenbeschrijving indien gewenst en werkelijke status verschillen.
| Waarde | Description |
|---|---|
| Default | |
| Disabled | |
| AutoConfigured | |
| InheritedFromServer | |
| QueryStoreOff | |
| QueryStoreReadOnly | |
| NotSupported |
AutomaticTuningMode
Automatische afstemmingsstatus.
| Waarde | Description |
|---|---|
| Inherit | |
| Custom | |
| Auto | |
| Unspecified |
AutomaticTuningOptionModeActual
Automatische afstemmingsoptie werkelijke status.
| Waarde | Description |
|---|---|
| Off | |
| On |
AutomaticTuningOptionModeDesired
Automatische afstemmingsoptie gewenste status.
| Waarde | Description |
|---|---|
| Off | |
| On | |
| Default |
AutomaticTuningOptions
Eigenschappen voor automatisch afstemmen voor individuele adviseurs.
| Name | Type | Description |
|---|---|---|
| actualState |
Automatische afstemmingsoptie werkelijke status. |
|
| desiredState |
Automatische afstemmingsoptie gewenste status. |
|
| reasonCode |
integer (int32) |
Redencode is indien gewenst en de werkelijke status anders. |
| reasonDesc |
Redenbeschrijving indien gewenst en werkelijke status verschillen. |
DatabaseAutomaticTuning
Automatisch afstemmen op databaseniveau.
| Name | Type | Description |
|---|---|---|
| id |
string |
Resource-id. |
| name |
string |
Resourcenaam. |
| properties.actualState |
Automatische afstemming van de werkelijke status. |
|
| properties.desiredState |
Automatische afstemmingsstatus. |
|
| properties.options |
<string,
Automatic |
Definitie van opties voor automatisch afstemmen. |
| type |
string |
Resourcetype. |
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 |
De fout bevat aanvullende informatie. |
|
| code |
string |
De foutcode. |
| details |
De foutdetails. |
|
| message |
string |
Het foutbericht. |
| target |
string |
Het foutdoel. |
ErrorResponse
Foutreactie
| Name | Type | Description |
|---|---|---|
| error |
Het foutobject. |