セールス: 1-800-867-1380
EN
このコンテンツは設定された言語で表示できません。英語版のページが表示されます。

Get-AzureSqlRecoverableDatabase

Get-AzureSqlRecoverableDatabase

Gets a list of databases that can be recovered.

Syntax

Parameter Set: AllDatabasesOnCurrentServer
Get-AzureSqlRecoverableDatabase -TargetServerName <String> [ <CommonParameters>]

Parameter Set: AllDatabasesOnGivenSourceServer
Get-AzureSqlRecoverableDatabase -SourceServerName <String> -TargetServerName <String> [ <CommonParameters>]

Parameter Set: GivenDatabaseObject
Get-AzureSqlRecoverableDatabase -SourceDatabase <RecoverableDatabase> [-TargetServerName <String> ] [ <CommonParameters>]

Parameter Set: GivenDatabaseOnCurrentServer
Get-AzureSqlRecoverableDatabase -SourceDatabaseName <String> -TargetServerName <String> [ <CommonParameters>]

Parameter Set: GivenDatabaseOnGivenServer
Get-AzureSqlRecoverableDatabase -SourceDatabaseName <String> -SourceServerName <String> -TargetServerName <String> [ <CommonParameters>]




Detailed Description

This cmdlet can be used to get a list of databases that can be recovered when the database server is no longer available. The database can be recovered to the same server as the source database or to a different server.

NOTE: For this release the source server must be live. The source server name and the target server name should be the same.

Parameters

-SourceDatabase<RecoverableDatabase>

The database object representing the database you want to retrieve


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-SourceDatabaseName<String>

The name of the database you want to recover.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SourceServerName<String>

The name of the server where the source database is live and running, or the name of the server where the source database was running before it was deleted.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TargetServerName<String>

The name of the server where the database backup should be restored to. This can be the same server as the source database or a different server.

NOTE: For this release the source server must be live. The source server name and the target server name should be the same.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.RecoverableDatabase

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.RecoverableDatabase

Notes

  • You must use certificate based authentication to run this cmdlet. The following commands need to be run to on the machine you are using to run the command from:
    C:\PS>$subId = <Subscription ID>
    C:\PS>$thumbprint = <Certificate Thumbprint>
    C:\PS>$myCert = Get-Item Cert:\CurrentUser\My\$thumbprint
    C:\PS>Set-AzureSubscription -SubscriptionName "mySubscription" -SubscriptionId $subId -Certificate $myCert
    C:\PS>Select-AzureSubscription -SubscriptionName "mySubscription"

Examples

-------------------------- EXAMPLE 1 --------------------------

This example lists all the recoverable databases on the source server.


PS C:\>Get-AzureSqlRecoverableDatabase –SourceServerName "server1" –TargetServerName "server1"

-------------------------- EXAMPLE 2 --------------------------

This example retrieves a specific database on source server.


PS C:\>$mydb = Get-AzureSqlRecoverableDatabase -SourceDatabaseName "mydb" -SourceServerName "server1" -TargetServerName "server1"
# refresh 
PS C:\>$mydb = $mydb | Get-AzureSqlRecoverableDatabase

Related topics

この情報は役に立ちましたか。
(残り 1500 文字)
フィードバックをいただき、ありがとうございました
表示:
© 2014 Microsoft