Database Operations - List By Database

Mendapatkan daftar operasi yang dilakukan pada database.

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

Parameter URI

Nama Dalam Diperlukan Jenis Deskripsi
databaseName
path True

string

Nama database.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Nama grup sumber daya. Nama tidak sensitif terhadap penggunaan huruf besar atau kecil.

serverName
path True

string

Nama server.

subscriptionId
path True

string (uuid)

ID langganan target. Nilainya harus sebuah UUID.

api-version
query True

string

minLength: 1

Versi API yang digunakan untuk operasi ini.

Respons

Nama Jenis Deskripsi
200 OK

DatabaseOperationListResult

Operasi Azure berhasil diselesaikan.

Other Status Codes

ErrorResponse

Respons kesalahan tak terduga.

Keamanan

azure_auth

Alur OAuth2 Azure Active Directory.

Jenis: oauth2
Alur: implicit
URL Otorisasi: https://login.microsoftonline.com/common/oauth2/authorize

Cakupan

Nama Deskripsi
user_impersonation meniru akun pengguna Anda

Contoh

List the database management operations

Permintaan sampel

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

Respon sampel

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

Definisi

Nama Deskripsi
createdByType

Jenis identitas yang membuat sumber daya.

DatabaseOperation

Operasi database.

DatabaseOperationListResult

Respons operasi daftar DatabaseOperation.

ErrorAdditionalInfo

Info tambahan kesalahan manajemen sumber daya.

ErrorDetail

Detail kesalahan.

ErrorResponse

Tanggapan kesalahan

ManagementOperationState

Status operasi.

Phase

Fase operasi.

PhaseDetails

Properti detail fase operasi database.

systemData

Metadata yang berkaitan dengan pembuatan dan modifikasi terakhir sumber daya.

createdByType

Jenis identitas yang membuat sumber daya.

Nilai Deskripsi
User
Application
ManagedIdentity
Key

DatabaseOperation

Operasi database.

Nama Jenis Deskripsi
id

string (arm-id)

ID sumber daya yang sepenuhnya memenuhi syarat untuk sumber daya. Misalnya "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

Nama sumber daya

properties.databaseName

string

Nama database tempat operasi sedang dilakukan.

properties.description

string

Deskripsi operasi.

properties.errorCode

integer (int32)

Kode kesalahan operasi.

properties.errorDescription

string

Deskripsi kesalahan operasi.

properties.errorSeverity

integer (int32)

Tingkat keparahan kesalahan operasi.

properties.estimatedCompletionTime

string (date-time)

Perkiraan waktu penyelesaian operasi.

properties.isCancellable

boolean

Apakah operasi dapat dibatalkan.

properties.isUserError

boolean

Apakah kesalahan tersebut adalah kesalahan pengguna atau tidak.

properties.operation

string

Nama operasi.

properties.operationFriendlyName

string

Nama operasi yang ramah.

properties.operationPhaseDetails

PhaseDetails

Detail fase operasi.

properties.percentComplete

integer (int32)

Persentase operasi selesai.

properties.serverName

string

Nama server.

properties.startTime

string (date-time)

Waktu mulai operasi.

properties.state

ManagementOperationState

Status operasi.

systemData

systemData

Metadata Azure Resource Manager yang berisi informasi createdBy dan modifiedBy.

type

string

Jenis sumber daya. Misalnya "Microsoft. Komputasi/virtualMachines" atau "Microsoft. Akun penyimpanan/penyimpanan"

DatabaseOperationListResult

Respons operasi daftar DatabaseOperation.

Nama Jenis Deskripsi
nextLink

string (uri)

Tautan ke halaman item berikutnya

value

DatabaseOperation[]

Item DatabaseOperation di halaman ini

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

ErrorAdditionalInfo[]

Info tambahan kesalahan.

code

string

Kode kesalahan.

details

ErrorDetail[]

Rincian kesalahan.

message

string

Pesan kesalahan.

target

string

Sasaran kesalahan.

ErrorResponse

Tanggapan kesalahan

Nama Jenis Deskripsi
error

ErrorDetail

Objek kesalahan.

ManagementOperationState

Status operasi.

Nilai Deskripsi
Pending

Menunggu

InProgress

InProgress

Succeeded

Berhasil

Failed

Kegagalan

CancelInProgress

BatalSedang Berlangsung

Cancelled

Dibatalkan

Phase

Fase operasi.

Nilai Deskripsi
LogTransitionInProgress

LogTransitionInProgress

Copying

Menyalin

BuildingHyperscaleComponents

MembangunKomponen Hyperscale

Catchup

Penangkapan

WaitingForCutover

WaitingForCutover

CutoverInProgress

CutoverInProgress

PhaseDetails

Properti detail fase operasi database.

Nama Jenis Deskripsi
phase

Phase

Fase operasi.

phaseInformation

object

Informasi fase operasi.

systemData

Metadata yang berkaitan dengan pembuatan dan modifikasi terakhir sumber daya.

Nama Jenis Deskripsi
createdAt

string (date-time)

Tanda waktu pembuatan sumber daya (UTC).

createdBy

string

Identitas yang membuat sumber daya.

createdByType

createdByType

Jenis identitas yang membuat sumber daya.

lastModifiedAt

string (date-time)

Stempel waktu modifikasi terakhir sumber daya (UTC)

lastModifiedBy

string

Identitas yang terakhir mengubah sumber daya.

lastModifiedByType

createdByType

Jenis identitas yang terakhir memodifikasi sumber daya.