Get-AzureSqlRecoverableDatabase

Gets recoverable databases from a specified 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

Get-AzureSqlRecoverableDatabase
   -ServerName <String>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]
Get-AzureSqlRecoverableDatabase
   -ServerName <String>
   -DatabaseName <String>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]
Get-AzureSqlRecoverableDatabase
   -Database <RecoverableDatabase>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

Description

The Get-AzureSqlRecoverableDatabase cmdlet gets recoverable databases from a specified server. This cmdlet gets a specific recoverable database or all recoverable databases on a server.

Examples

Example 1: Get all recoverable databases

PS C:\> Get-AzureSqlRecoverableDatabase -ServerName "Server01"

This command gets all recoverable databases on the server named Server01.

Example 2: Get a specific recoverable database

PS C:\> Get-AzureSqlRecoverableDatabase -ServerName "Server01" -DatabaseName "Database17"

This command gets retrieves the database named Database17 on the server named Server01.

Parameters

-Database

Specifies an object that represents the recoverable database that this cmdlet gets.

Type:RecoverableDatabase
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-DatabaseName

Specifies the name of the recoverable database that this cmdlet gets.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters: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.

Type:AzureSMProfile
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ServerName

Specifies the name of the server from which this cmdlet gets recoverable databases.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

RecoverableDatabase

Outputs

IEnumerable\<Microsoft.WindowsAzure.Management.Sql.Models.RecoverableDatabase\>

Notes

  • You must use certificate-based authentication to run this cmdlet. Run the following commands on the computer where run this cmdlet:

PS C:\\\> $subId = \<Subscription ID\> PS C:\\\> $thumbprint = \<Certificate Thumbprint\> PS C:\\\> $myCert = Get-Item Cert:\CurrentUser\My\$thumbprint PS C:\\\> Set-AzureSubscription -SubscriptionName "mySubscription" -SubscriptionId $subId -Certificate $myCert PS C:\\\> Select-AzureSubscription -SubscriptionName "mySubscription"