Database Operations - List By Database
Ottiene un elenco di operazioni eseguite nel database.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations?api-version=2025-01-01
Parametri dell'URI
| Nome | In | Necessario | Tipo | Descrizione |
|---|---|---|---|---|
|
database
|
path | True |
string |
Nome del database. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
Nome del gruppo di risorse. Il nome è insensibile alle maiuscole e minuscole. |
|
server
|
path | True |
string |
Il nome del server. |
|
subscription
|
path | True |
string (uuid) |
ID della sottoscrizione di destinazione. Il valore deve essere un UUID. |
|
api-version
|
query | True |
string minLength: 1 |
Versione dell'API da usare per questa operazione. |
Risposte
| Nome | Tipo | Descrizione |
|---|---|---|
| 200 OK |
Operazione Azure completata con successo. |
|
| Other Status Codes |
Risposta di errore imprevista. |
Sicurezza
azure_auth
Azure Active Directory OAuth2 Flow.
Tipo:
oauth2
Flow:
implicit
URL di autorizzazione:
https://login.microsoftonline.com/common/oauth2/authorize
Ambiti
| Nome | Descrizione |
|---|---|
| user_impersonation | rappresentare l'account utente |
Esempio
List the database management operations
Esempio di richiesta
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/operations?api-version=2025-01-01
Risposta di esempio
{
"value": [
{
"name": "11111111-1111-1111-1111-111111111111",
"type": "Microsoft.Sql/servers/databases/operations",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/operations/11111111-1111-1111-1111-111111111111",
"properties": {
"description": "'UpdateLogicalDatabase' on database 'testdb', Source ServiceLevelObjective 'SQLDB_GP_Gen5_2', target ServiceLevelObjective 'SQLDB_HS_Gen5_2', target database MaxSize '32'GB",
"databaseName": "testdb",
"estimatedCompletionTime": "2023-02-17T14:30:30.71Z",
"isCancellable": true,
"operation": "UpdateLogicalDatabase",
"operationFriendlyName": "ALTER DATABASE",
"percentComplete": 100,
"serverName": "testsvr",
"startTime": "2023-02-13T06:25:23.67Z",
"state": "Succeeded"
}
},
{
"name": "55555555-5555-5555-5555-555555555555",
"type": "Microsoft.Sql/servers/databases/operations",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/operations/55555555-5555-5555-5555-555555555555",
"properties": {
"description": "'UpdateLogicalDatabase' on database 'testdb', Source ServiceLevelObjective 'SQLDB_BC_Gen5_6', target ServiceLevelObjective 'SQLDB_HS_Gen5_6', target database MaxSize '32'GB",
"databaseName": "testdb",
"estimatedCompletionTime": "2024-09-27T12:44:33.953Z",
"isCancellable": true,
"operation": "UpdateLogicalDatabase",
"operationFriendlyName": "ALTER DATABASE",
"operationPhaseDetails": {
"phase": "LogTransitionInProgress",
"phaseInformation": {
"currentStep": "1",
"logTransitioningInProgress": "True",
"totalSteps": "6"
}
},
"percentComplete": 50,
"serverName": "testsvr",
"startTime": "2024-09-27T05:42:30.097Z",
"state": "InProgress"
}
},
{
"name": "55555555-5555-5555-5555-555555555555",
"type": "Microsoft.Sql/servers/databases/operations",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/operations/55555555-5555-5555-5555-555555555555",
"properties": {
"description": "'UpdateLogicalDatabase' on database 'testdb', Source ServiceLevelObjective 'SQLDB_GP_Gen5_6', target ServiceLevelObjective 'SQLDB_HS_Gen5_6', target database MaxSize '32'GB",
"databaseName": "testdb",
"estimatedCompletionTime": "2024-09-27T12:28:10.83Z",
"isCancellable": true,
"operation": "UpdateLogicalDatabase",
"operationFriendlyName": "ALTER DATABASE",
"operationPhaseDetails": {
"phase": "BuildingHyperscaleComponents",
"phaseInformation": {
"creatingPrimaryHyperscaleComponents": "True",
"currentStep": "3",
"totalSteps": "6"
}
},
"percentComplete": 50,
"serverName": "testsvr",
"startTime": "2024-09-27T05:13:37.84Z",
"state": "InProgress"
}
},
{
"name": "55555555-5555-5555-5555-555555555555",
"type": "Microsoft.Sql/servers/databases/operations",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/operations/55555555-5555-5555-5555-555555555555",
"properties": {
"description": "'UpdateLogicalDatabase' on database 'testdb', Source ServiceLevelObjective 'SQLDB_GP_Gen5_6', target ServiceLevelObjective 'SQLDB_HS_Gen5_6', target database MaxSize '32'GB",
"databaseName": "testdb",
"estimatedCompletionTime": "2024-09-27T14:59:54.38Z",
"isCancellable": true,
"operation": "UpdateLogicalDatabase",
"operationFriendlyName": "ALTER DATABASE",
"operationPhaseDetails": {
"phase": "WaitingForCutover",
"phaseInformation": {
"currentStep": "5",
"dataDelayInMb": "0",
"performCutoverBy": "2024-09-30T07:43:55.08Z",
"totalSteps": "6"
}
},
"percentComplete": 50,
"serverName": "testsvr",
"startTime": "2024-09-27T07:31:56.087Z",
"state": "InProgress"
}
},
{
"name": "55555555-5555-5555-5555-555555555555",
"type": "Microsoft.Sql/servers/databases/operations",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/operations/55555555-5555-5555-5555-555555555555",
"properties": {
"description": "'UpdateLogicalDatabase' on database 'testdb'",
"databaseName": "testdb",
"errorCode": 40640,
"errorDescription": "The server encountered an unexpected exception.",
"errorSeverity": 20,
"isUserError": true,
"operation": "UpdateLogicalDatabase",
"operationFriendlyName": "ALTER DATABASE",
"percentComplete": 100,
"serverName": "testsvr",
"startTime": "2023-02-24T11:48:29.16Z",
"state": "Failed"
}
}
]
}
Definizioni
| Nome | Descrizione |
|---|---|
|
created |
Tipo di identità che ha creato la risorsa. |
|
Database |
Operazione di database. |
|
Database |
La risposta di un'operazione di lista DatabaseOperation. |
|
Error |
Informazioni aggiuntive sull'errore di gestione delle risorse. |
|
Error |
Dettagli dell'errore. |
|
Error |
Risposta di errore |
|
Management |
Stato dell'operazione. |
| Phase |
Fase dell'operazione. |
|
Phase |
La fase descrive in dettaglio le proprietà di un'operazione di database. |
|
system |
Metadati relativi alla creazione e all'ultima modifica della risorsa. |
createdByType
Tipo di identità che ha creato la risorsa.
| Valore | Descrizione |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DatabaseOperation
Operazione di database.
| Nome | Tipo | Descrizione |
|---|---|---|
| id |
string (arm-id) |
ID risorsa completo per la risorsa. Ad esempio, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| name |
string |
Nome della risorsa |
| properties.databaseName |
string |
Nome del database in cui viene eseguita l'operazione. |
| properties.description |
string |
La descrizione dell'operazione. |
| properties.errorCode |
integer (int32) |
Codice di errore dell'operazione. |
| properties.errorDescription |
string |
Descrizione dell'errore dell'operazione. |
| properties.errorSeverity |
integer (int32) |
Gravità dell'errore dell'operazione. |
| properties.estimatedCompletionTime |
string (date-time) |
Tempo di completamento stimato dell'operazione. |
| properties.isCancellable |
boolean |
Indica se l'operazione può essere annullata. |
| properties.isUserError |
boolean |
Indica se l'errore è un errore dell'utente. |
| properties.operation |
string |
Nome dell'operazione. |
| properties.operationFriendlyName |
string |
Nome descrittivo dell'operazione. |
| properties.operationPhaseDetails |
Dettagli della fase dell'operazione. |
|
| properties.percentComplete |
integer (int32) |
Percentuale dell'operazione completata. |
| properties.serverName |
string |
Il nome del server. |
| properties.startTime |
string (date-time) |
Ora di inizio dell'operazione. |
| properties.state |
Stato dell'operazione. |
|
| systemData |
Azure Resource Manager metadati contenenti informazioni createBy e modifiedBy. |
|
| type |
string |
Tipo di risorsa. Ad esempio: "Microsoft. Compute/virtualMachines" oppure "Microsoft. Storage/storageAccounts" |
DatabaseOperationListResult
La risposta di un'operazione di lista DatabaseOperation.
| Nome | Tipo | Descrizione |
|---|---|---|
| nextLink |
string (uri) |
Il link alla pagina successiva degli elementi |
| value |
Gli elementi DatabaseOperation in questa pagina |
ErrorAdditionalInfo
Informazioni aggiuntive sull'errore di gestione delle risorse.
| Nome | Tipo | Descrizione |
|---|---|---|
| info |
object |
Informazioni aggiuntive. |
| type |
string |
Tipo di informazioni aggiuntive. |
ErrorDetail
Dettagli dell'errore.
| Nome | Tipo | Descrizione |
|---|---|---|
| additionalInfo |
Informazioni aggiuntive sull'errore. |
|
| code |
string |
Codice di errore. |
| details |
Dettagli dell'errore. |
|
| message |
string |
Messaggio di errore. |
| target |
string |
Destinazione dell'errore. |
ErrorResponse
Risposta di errore
| Nome | Tipo | Descrizione |
|---|---|---|
| error |
Oggetto error. |
ManagementOperationState
Stato dell'operazione.
| Valore | Descrizione |
|---|---|
| Pending |
In sospeso |
| InProgress |
In corso |
| Succeeded |
Succeeded |
| Failed |
Non riuscito |
| CancelInProgress |
CancelInProgress |
| Cancelled |
Operazione annullata |
Phase
Fase dell'operazione.
| Valore | Descrizione |
|---|---|
| LogTransitionInProgress |
LogTransitionInProgress |
| Copying |
Copiare |
| BuildingHyperscaleComponents |
BuildingHyperscaleComponents |
| Catchup |
Catchup |
| WaitingForCutover |
WaitingForCutover |
| CutoverInProgress |
CutoverInProgress |
PhaseDetails
La fase descrive in dettaglio le proprietà di un'operazione di database.
| Nome | Tipo | Descrizione |
|---|---|---|
| phase |
Fase dell'operazione. |
|
| phaseInformation |
object |
Informazioni sulla fase dell'operazione. |
systemData
Metadati relativi alla creazione e all'ultima modifica della risorsa.
| Nome | Tipo | Descrizione |
|---|---|---|
| createdAt |
string (date-time) |
Timestamp della creazione della risorsa (UTC). |
| createdBy |
string |
Identità che ha creato la risorsa. |
| createdByType |
Tipo di identità che ha creato la risorsa. |
|
| lastModifiedAt |
string (date-time) |
Il timestamp dell'ultima modifica della risorsa (UTC) |
| lastModifiedBy |
string |
Identità che ha modificato l'ultima volta la risorsa. |
| lastModifiedByType |
Tipo di identità che ha modificato l'ultima volta la risorsa. |