Skip to main content

database_operations

Creates, updates, deletes, gets or lists a database_operations resource.

Overview

Namedatabase_operations
TypeResource
Idazure.sql.database_operations

Fields

The following fields are returned by SELECT queries:

The request for getting database operations has been executed successfully.

NameDatatypeDescription
propertiesobjectResource properties.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_databaseselectresourceGroupName, serverName, databaseName, subscriptionIdGets a list of operations performed on the database.
cancelexecresourceGroupName, serverName, databaseName, operationId, subscriptionIdCancels the asynchronous operation on the database.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
databaseNamestringThe name of the database.
operationIdstring (uuid)The operation identifier.
resourceGroupNamestringThe name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverNamestringThe name of the server.
subscriptionIdstringThe subscription ID that identifies an Azure subscription.

SELECT examples

Gets a list of operations performed on the database.

SELECT
properties
FROM azure.sql.database_operations
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serverName = '{{ serverName }}' -- required
AND databaseName = '{{ databaseName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

Lifecycle Methods

Cancels the asynchronous operation on the database.

EXEC azure.sql.database_operations.cancel 
@resourceGroupName='{{ resourceGroupName }}' --required,
@serverName='{{ serverName }}' --required,
@databaseName='{{ databaseName }}' --required,
@operationId='{{ operationId }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;