Server Operations - List By Server

Gets a list of operations performed on the server.

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

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

serverName
path True

string

The name of the server.

subscriptionId
path True

string

The subscription ID that identifies an Azure subscription.

api-version
query True

string

The API version to use for the request.

Responses

Name Type Description
200 OK

ServerOperationListResult

The request for getting server operations has been executed successfully.

Other Status Codes

*** Error Responses: ***

  • 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned

  • 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter

  • 400 PECsNotExistingToDenyPublicNetworkAccess - Unable to set Deny Public Network Access to Yes since there is no private endpoint enabled to access the server. Please set up private endpoints and retry the operation (https://docs.microsoft.com/azure/sql-database/sql-database-private-endpoint-overview#how-to-set-up-private-link-for-azure-sql-database).

  • 400 NameAlreadyExists - The provided name already exists.

  • 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided

  • 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided

  • 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes

  • 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call

  • 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'

  • 400 InvalidLoginName - The provided login name is invalid.

  • 400 InvalidUsername - Supplied user name contains invalid characters.

  • 400 Ipv6FeatureNotEnabled - User tried to turn on Ipv6 support on the server without enabling feature flag on subscription, or the feature support is currently disabled in the region.

  • 400 PasswordTooShort - The provided password is too short

  • 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.

  • 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.

  • 400 PasswordTooLong - The provided password is too long.

  • 400 PasswordNotComplex - The provided password is not complex enough.

  • 400 InvalidParameterValue - An invalid value was given to a parameter.

  • 400 InvalidLocation - An invalid location was specified.

  • 400 InvalidServerName - Invalid server name specified.

  • 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.

  • 400 TokenTooLong - The provided token is too long.

  • 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.

  • 400 ServerNotFound - The requested server was not found.

  • 404 SubscriptionDoesNotHaveServer - The requested server was not found

  • 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.

  • 404 OperationIdNotFound - The operation with Id does not exist.

  • 404 OperationIdNotFound - The operation with Id does not exist.

  • 404 SubscriptionNotFound - The requested subscription was not found.

  • 404 SubscriptionNotFound - The requested subscription was not found.

  • 409 OperationCancelled - The operation has been cancelled by user.

  • 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.

  • 409 UpsertLogicalServerRequestAlreadyInProgress - An ongoing logical server request is already in progress, please try your request again later.

  • 409 ServerDisabled - Server is disabled.

  • 409 ConflictingServerOperation - An operation is currently in progress for the server.

  • 409 SubscriptionDisabled - Subscription is disabled.

  • 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.

  • 409 ServerAlreadyExists - Duplicate server name.

  • 409 ServerDisabled - Server is disabled.

  • 409 ConflictingServerOperation - An operation is currently in progress for the server.

  • 409 DropLogicalServerAlreadyInProgress - Server is already being dropped.

  • 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.

  • 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.

  • 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

Examples

List the server management operations

Sample request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/operations?api-version=2021-11-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111",
      "name": "11111111-1111-1111-1111-111111111111",
      "type": "Microsoft.Sql/servers/operations",
      "properties": {
        "operation": "MakeAllLogicalDatabasesAccessible",
        "operationFriendlyName": "MAKE ALL DBS ACCESSIBLE",
        "percentComplete": 0,
        "serverName": "sqlcrudtest-4645",
        "startTime": "2017-06-01T09:10:08.1Z",
        "state": "InProgress"
      }
    },
    {
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222",
      "name": "22222222-2222-2222-2222-222222222222",
      "type": "Microsoft.Sql/servers/operations",
      "properties": {
        "operation": "MakeAllLogicalDatabasesAccessible",
        "operationFriendlyName": "MAKE ALL DBS ACCESSIBLE",
        "percentComplete": 100,
        "serverName": "sqlcrudtest-4645",
        "startTime": "2017-06-01T09:00:08.1Z",
        "state": "Succeeded"
      }
    }
  ]
}

Definitions

Name Description
ManagementOperationState

The operation state.

ServerOperation

A server operation.

ServerOperationListResult

The response to a list server operations request

ManagementOperationState

The operation state.

Name Type Description
CancelInProgress

string

Cancelled

string

Failed

string

InProgress

string

Pending

string

Succeeded

string

ServerOperation

A server operation.

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.description

string

The operation description.

properties.errorCode

integer

The operation error code.

properties.errorDescription

string

The operation error description.

properties.errorSeverity

integer

The operation error severity.

properties.estimatedCompletionTime

string

The estimated completion time of the operation.

properties.isCancellable

boolean

Whether the operation can be cancelled.

properties.isUserError

boolean

Whether or not the error is a user error.

properties.operation

string

The name of operation.

properties.operationFriendlyName

string

The friendly name of operation.

properties.percentComplete

integer

The percentage of the operation completed.

properties.serverName

string

The name of the server.

properties.startTime

string

The operation start time.

properties.state

ManagementOperationState

The operation state.

type

string

Resource type.

ServerOperationListResult

The response to a list server operations request

Name Type Description
nextLink

string

Link to retrieve next page of results.

value

ServerOperation[]

Array of results.