Get-​Azure​Sql​Recoverable​Database

Gets recoverable databases from a specified server.

Syntax

Get-AzureSqlRecoverableDatabase
   -Database <RecoverableDatabase>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]
Get-AzureSqlRecoverableDatabase
   -DatabaseName <String>
   [-Profile <AzureSMProfile>]
   -ServerName <String>
   [<CommonParameters>]
Get-AzureSqlRecoverableDatabase
   [-Profile <AzureSMProfile>]
   -ServerName <String>
   [<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.

Required Parameters

-Database

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

Type:RecoverableDatabase
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-DatabaseName

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

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

Optional Parameters

-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
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.WindowsAzure.Management.Sql.Models.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"