Database Operations - List By Database

Pobiera listę operacji wykonywanych w bazie danych.

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

Parametry identyfikatora URI

Nazwa W Wymagane Typ Opis
databaseName
path True

string

Nazwa bazy danych.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Nazwa grupy zasobów. Nazwa jest niewrażliwa na wielkość liter.

serverName
path True

string

Nazwa serwera.

subscriptionId
path True

string (uuid)

Identyfikator subskrypcji docelowej. Wartość musi być identyfikatorem UUID.

api-version
query True

string

minLength: 1

Wersja interfejsu API do użycia dla tej operacji.

Odpowiedzi

Nazwa Typ Opis
200 OK

DatabaseOperationListResult

Operacja Azure zakończyła się pomyślnie.

Other Status Codes

ErrorResponse

Nieoczekiwana odpowiedź na błąd.

Zabezpieczenia

azure_auth

Azure Active Directory OAuth2 Flow.

Typ: oauth2
Flow: implicit
Adres URL autoryzacji: https://login.microsoftonline.com/common/oauth2/authorize

Zakresy

Nazwa Opis
user_impersonation personifikacja konta użytkownika

Przykłady

List the database management operations

Przykładowe żądanie

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

Przykładowa odpowiedź

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

Definicje

Nazwa Opis
createdByType

Typ tożsamości, która utworzyła zasób.

DatabaseOperation

Operacja bazy danych.

DatabaseOperationListResult

Odpowiedź operacji DatabaseOperation list.

ErrorAdditionalInfo

Dodatkowe informacje o błędzie zarządzania zasobami.

ErrorDetail

Szczegóły błędu.

ErrorResponse

Odpowiedź na błąd

ManagementOperationState

Stan operacji.

Phase

Faza operacji.

PhaseDetails

Właściwości fazy szczegółów operacji bazy danych.

systemData

Metadane dotyczące tworzenia i ostatniej modyfikacji zasobu.

createdByType

Typ tożsamości, która utworzyła zasób.

Wartość Opis
User
Application
ManagedIdentity
Key

DatabaseOperation

Operacja bazy danych.

Nazwa Typ Opis
id

string (arm-id)

W pełni kwalifikowany identyfikator zasobu dla zasobu. Np. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

Nazwa zasobu

properties.databaseName

string

Nazwa bazy danych, na podstawie których jest wykonywana operacja.

properties.description

string

Opis operacji.

properties.errorCode

integer (int32)

Kod błędu operacji.

properties.errorDescription

string

Opis błędu operacji.

properties.errorSeverity

integer (int32)

Ważność błędu operacji.

properties.estimatedCompletionTime

string (date-time)

Szacowany czas ukończenia operacji.

properties.isCancellable

boolean

Czy można anulować operację.

properties.isUserError

boolean

Określa, czy błąd jest błędem użytkownika.

properties.operation

string

Nazwa operacji.

properties.operationFriendlyName

string

Przyjazna nazwa operacji.

properties.operationPhaseDetails

PhaseDetails

Szczegóły fazy operacji.

properties.percentComplete

integer (int32)

Procent ukończonej operacji.

properties.serverName

string

Nazwa serwera.

properties.startTime

string (date-time)

Godzina rozpoczęcia operacji.

properties.state

ManagementOperationState

Stan operacji.

systemData

systemData

Metadane Azure Resource Manager zawierające informacje createdBy i modifiedBy.

type

string

Typ zasobu. Np. "Microsoft. Compute/virtualMachines" lub "Microsoft. Storage/storageAccounts"

DatabaseOperationListResult

Odpowiedź operacji DatabaseOperation list.

Nazwa Typ Opis
nextLink

string (uri)

Link do następnej strony elementów

value

DatabaseOperation[]

Elementy DatabaseOperation na tej stronie

ErrorAdditionalInfo

Dodatkowe informacje o błędzie zarządzania zasobami.

Nazwa Typ Opis
info

object

Dodatkowe informacje.

type

string

Dodatkowy typ informacji.

ErrorDetail

Szczegóły błędu.

Nazwa Typ Opis
additionalInfo

ErrorAdditionalInfo[]

Błąd dodatkowe informacje.

code

string

Kod błędu.

details

ErrorDetail[]

Szczegóły błędu.

message

string

Komunikat o błędzie.

target

string

Cel błędu.

ErrorResponse

Odpowiedź na błąd

Nazwa Typ Opis
error

ErrorDetail

Obiekt błędu.

ManagementOperationState

Stan operacji.

Wartość Opis
Pending

W oczekiwaniu

InProgress

W toku

Succeeded

Powodzenie

Failed

Niepowodzenie

CancelInProgress

CancelInProgress

Cancelled

Anulowane

Phase

Faza operacji.

Wartość Opis
LogTransitionInProgress

LogTransitionInProgress

Copying

Kopiowanie

BuildingHyperscaleComponents

BuildingHyperscaleComponents

Catchup

Nadrabianie zaległości

WaitingForCutover

WaitingForCutover

CutoverInProgress

CutoverInProgress

PhaseDetails

Właściwości fazy szczegółów operacji bazy danych.

Nazwa Typ Opis
phase

Phase

Faza operacji.

phaseInformation

object

Informacje o fazie operacji.

systemData

Metadane dotyczące tworzenia i ostatniej modyfikacji zasobu.

Nazwa Typ Opis
createdAt

string (date-time)

Sygnatura czasowa tworzenia zasobu (UTC).

createdBy

string

Tożsamość, która utworzyła zasób.

createdByType

createdByType

Typ tożsamości, która utworzyła zasób.

lastModifiedAt

string (date-time)

Znacznik czasu ostatniej modyfikacji zasobu (UTC)

lastModifiedBy

string

Tożsamość, która ostatnio zmodyfikowała zasób.

lastModifiedByType

createdByType

Typ tożsamości, która ostatnio zmodyfikowała zasób.