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

Start-AzureSqlDatabaseRecovery

Start-AzureSqlDatabaseRecovery

Submits a recover database request for a live or dropped 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

This cmdlet is used to submit a restore request for a live or dropped database. This cmdlet supports basic recovery using the last known available backup for the database. The recovery operation creates a new database. You must specify a different name for the new database if you are recovering a live database on the same server.

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

Parameters

-SourceDatabase<RecoverableDatabase>

The database object that represents the database you want to recover.


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?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TargetDatabaseName<String>

The name of the recovered database. This should be different from the source database if the source database is still live and you are planning to recover it to the same server as the source.


Aliases

none

Required?

false

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 (http://go.microsoft.com/fwlink/p/?LinkID=113216).

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. The following commands need to be run on the computer you are using to run the cmdlet:
    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 recovers a database using an object representing the database.


PS C:\>$mydb = Get-AzureSqlRecoverableDatabase –ServerName "myserver" -DatabaseName "mydatabase" 
# Recover the database using database object 
PS C:\>$operation = Start-AzureSqlDatabaseRecovery -SourceDatabase $mydb -TargetDatabaseName "mydatabaserestored" 

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

This example recovers a database using the database name.


PS C:\>$operation = Start-AzureSqlDatabaseRecovery –SourceServerName "myserver" -SourceDatabaseName "mydatabase" -TargetDatabaseName "mydatabaserestored" 

Related topics

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