Aracılığıyla paylaş


RestorePlan Class

Definition

Database Restore Plan is a sequence of Database Restore operations which will recover a Database to a particular state in a point in time.

public class RestorePlan
type RestorePlan = class
Public Class RestorePlan
Inheritance
RestorePlan

Constructors

RestorePlan(Database)

Initializes a new instance of the RestorePlan class.

RestorePlan(Server, String)

Initializes a new instance of the RestorePlan class.

RestorePlan(Server)

Properties

AsyncStatus

Gets the status of most recent asynchronous operation including possible errors.

CloseExistingConnections

Gets or sets a value indicating whether [close existing connections].

DatabaseName

Gets or sets the name of the database.

RestoreAction

Gets and sets the type of the Restore action: Database,File,Log,Page

RestoreOperations

Gets or sets the restore operations.

Server

Server where the Restore plan executes.

TailLogBackupOperation

Gets or sets the tail log backup operation.

Methods

AddRestoreOperation(BackupSet)

Adds the restore operation.

AddRestoreOperation(List<BackupSet>)

Adds the restore operations.

CanDropExistingConnections(String)

Checks if the given database supports dropping connections. The ones that are in 9.0 (SQL 2005) compatibility mode, or in a status that is not normal don't support dropping connections.

CheckBackupSetsExistence()

Checks the backup sets existence.

Execute()

Verifies and executes the Restore Plan. InvalidRestorePlanException is thrown when verification fails.

ExecuteAsync()

Verifies and executes the Restore Plan async.

Script()

Verifies the Restore plan and scripts the operation.

SetRestoreOptions(RestoreOptions)

Sets the restore options.

Verify(Boolean)

Verifies the restore plan. InvalidRestorePlanException is thrown when verification fails. Supported only for SQL Server 2005 or later.

Events

Complete

Occurs when [Restore operation gets completed].

Information

Occurs when [Server sends information].

NextMedia

Occurs when [Next media needs to be loaded].

NextRestore

Occurs when [next restore].

PercentComplete

Occurs when [Server sends percent complete information].

Applies to