Get-AzureSqlDatabaseOperation
Gets the status of database operations on an Azure server.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.
The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.
Syntax
ByConnectionContext (Default)
Get-AzureSqlDatabaseOperation
-ConnectionContext <IServerDataServiceContext>
[-Database <Database>]
[-DatabaseName <String>]
[-OperationGuid <Guid>]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
ByServerName
Get-AzureSqlDatabaseOperation
-ServerName <String>
[-Database <Database>]
[-DatabaseName <String>]
[-OperationGuid <Guid>]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Description
The Get-AzureSqlDatabaseOperation cmdlet gets the status of database operations on the specified Azure server. If you specify only the ServerName or ConnectionContext parameter, the cmdlet gets all the database operations for the server. If you also specify a database by using the Database or DatabaseName parameter, this cmdlet gets all the operations for the specified database. If you specify an operation GUID, and ServerName or ConnectionContext, the cmdlet gets a single database operation.
Examples
Example 1: Get the status of all database operations for a database
PS C:\> $Operations = Get-AzureSqlDatabaseOperation -ConnectionContext $Context -DatabaseName "Database17"
This command gets the status of all database operations on the database named Database17 on the server that the connection context $Context specifies.
Example 2: Get the status of all database operations for a server
PS C:\> $Operations = Get-AzureSqlDatabaseOperation -ConnectionContext $Context
This command gets the status of all database operations on the server that the connection context $Context specifies.
Parameters
-ConnectionContext
Specifies the connection context of a server.
Parameter properties
Type: | IServerDataServiceContext |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | Context |
Parameter sets
ByConnectionContext
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Database
Specifies an object that represents an Azure SQL Database. If you specify this parameter, you must specify the ServerName parameter or ConnectionContext parameter.
Parameter properties
Type: | Database |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-DatabaseName
Specifies the name of a database. If you specify this parameter, you must specify the ServerName parameter or the ConnectionContext parameter.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-OperationGuid
Specifies the operation ID that represents a specific database operation for which this cmdlet gets status. You can obtain operation IDs by requesting all the database operations for a Azure SQL Database or server. If you specify this parameter, you must specify the ServerName parameter or the ConnectionContext parameter.
Parameter properties
Type: | Guid |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Profile
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Parameter properties
Type: | AzureSMProfile |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ServerName
Specifies the name of a server.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ByServerName
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database
Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerContext
Guid
Outputs
Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database.DatabaseOperationResponseList
This cmdlet returns an array of DatabaseOperationResponseList objects if you get multiple operations.