VERKOOP: 1-800-867-1389
EN
Deze inhoud is niet beschikbaar in uw taal, maar wel in het Engels.

Start-AzureSqlDatabaseRecovery

Updated: August 13, 2015

Start-AzureSqlDatabaseRecovery

Initiates a restore request for a database.

Syntax

Parameter Set: BySourceDatabaseName
Start-AzureSqlDatabaseRecovery -SourceDatabaseName <String> [-SourceServerName <String> ] [-TargetDatabaseName <String> ] [ <CommonParameters>]

Parameter Set: BySourceDatabaseObject
Start-AzureSqlDatabaseRecovery -SourceDatabase <RecoverableDatabase> [-TargetDatabaseName <String> ] [ <CommonParameters>]




Detailed Description

The Start-AzureSqlDatabaseRecovery cmdlet initiates a restore request for a live or dropped database. This cmdlet supports basic recovery that uses the last known available backup for the database. The recovery operation creates a new database. If you recover a live database on the same server, you must specify a different name for the new database.

To do a point in time restore for a database, use the Start-AzureSqlDatabaseRestore cmdlet instead.

Parameters

-SourceDatabase<RecoverableDatabase>

Specifies the database object that represents the database that this cmdlet recovers.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-SourceDatabaseName<String>

Specifies the name of the database that this cmdlet recovers.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SourceServerName<String>

Specifies the name of the server on which the source database is live and running, or on which the source database ran before it was deleted.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TargetDatabaseName<String>

Specifies the name of the recovered database. If the source database is still live, in order to recover it to the same server, you must specify a name that differs from the source database name.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. 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.Management.Sql.Models.RecoverableDatabase

Outputs

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

  • Microsoft.WindowsAzure.Management.Sql.Models.RecoverDatabaseOperation

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"

Examples

Example 1: Recover a database specified as an object

The first command gets a database object by using the Get-AzureSqlRecoverableDatabase cmdlet. The command stores that object in the $Database variable.

The second command recovers the database stored in $Database.


PS C:\> $Database = Get-AzureSqlRecoverableDatabase -ServerName "Server01" -DatabaseName "Database17" 
PS C:\> $Operation = Start-AzureSqlDatabaseRecovery -SourceDatabase $Database -TargetDatabaseName "DatabaseRestored" 

Example 2: Recover a database specified by name

This command recovers a database using the database name.


PS C:\> $Operation = Start-AzureSqlDatabaseRecovery -SourceServerName "Server01" -SourceDatabaseName "Database17" -TargetDatabaseName "DatabaseRestored" 

Related topics

Vindt u dit nuttig?
(1500 tekens resterend)
Bedankt voor uw feedback
Weergeven:
© 2015 Microsoft