Restore Restore Restore Class

Definition

public sealed class Restore : Microsoft.SqlServer.Management.Smo.BackupRestoreBase
type Restore = class
    inherit BackupRestoreBase
Public NotInheritable Class Restore
Inherits BackupRestoreBase
Inheritance

Constructors

Restore() Restore() Restore()
Restore(String, BackupSet) Restore(String, BackupSet) Restore(String, BackupSet)

Creates a Restore object

Fields

currentAsyncOperation currentAsyncOperation currentAsyncOperation Inherited from BackupRestoreBase
m_BackupAction m_BackupAction m_BackupAction Inherited from BackupRestoreBase
m_LogTruncation m_LogTruncation m_LogTruncation Inherited from BackupRestoreBase
m_RestoreAction m_RestoreAction m_RestoreAction Inherited from BackupRestoreBase
VerifyComplete VerifyComplete VerifyComplete

An event raised at the end of SqlVerify operation. It indicates if verification succeeded or not.

Properties

Action Action Action
AsyncStatus AsyncStatus AsyncStatus

A status of most recent asynchronous operation, including possible errors.

(Inherited from BackupRestoreBase)
BackupSet BackupSet BackupSet

The restore backup set

BlockSize BlockSize BlockSize Inherited from BackupRestoreBase
BufferCount BufferCount BufferCount Inherited from BackupRestoreBase
Checksum Checksum Checksum Inherited from BackupRestoreBase
ClearSuspectPageTableAfterRestore ClearSuspectPageTableAfterRestore ClearSuspectPageTableAfterRestore
ContinueAfterError ContinueAfterError ContinueAfterError Inherited from BackupRestoreBase
CredentialName CredentialName CredentialName

Gets or sets the credential name that is used by Backup to Url

(Inherited from BackupRestoreBase)
Database Database Database Inherited from BackupRestoreBase
DatabaseFileGroups DatabaseFileGroups DatabaseFileGroups Inherited from BackupRestoreBase
DatabaseFiles DatabaseFiles DatabaseFiles Inherited from BackupRestoreBase
DatabasePages DatabasePages DatabasePages

Gets the restore pages.

Devices Devices Devices

A list of devices used as a target for backup

(Inherited from BackupRestoreBase)
FileNumber FileNumber FileNumber
KeepReplication KeepReplication KeepReplication
KeepTemporalRetention KeepTemporalRetention KeepTemporalRetention
MaxTransferSize MaxTransferSize MaxTransferSize Inherited from BackupRestoreBase
MediaName MediaName MediaName Inherited from BackupRestoreBase
NoRecovery NoRecovery NoRecovery Inherited from BackupRestoreBase
NoRewind NoRewind NoRewind Inherited from BackupRestoreBase
Offset Offset Offset
Partial Partial Partial
PercentCompleteNotification PercentCompleteNotification PercentCompleteNotification Inherited from BackupRestoreBase
RelocateFiles RelocateFiles RelocateFiles
ReplaceDatabase ReplaceDatabase ReplaceDatabase
Restart Restart Restart Inherited from BackupRestoreBase
RestrictedUser RestrictedUser RestrictedUser
RetryFailedQueries RetryFailedQueries RetryFailedQueries Inherited from BackupRestoreBase
StandbyFile StandbyFile StandbyFile
StopAtMarkAfterDate StopAtMarkAfterDate StopAtMarkAfterDate
StopAtMarkName StopAtMarkName StopAtMarkName
StopBeforeMarkAfterDate StopBeforeMarkAfterDate StopBeforeMarkAfterDate
StopBeforeMarkName StopBeforeMarkName StopBeforeMarkName
ToPointInTime ToPointInTime ToPointInTime
UnloadTapeAfter UnloadTapeAfter UnloadTapeAfter Inherited from BackupRestoreBase

Methods

Abort() Abort() Abort()

Aborts the current action, if any

(Inherited from BackupRestoreBase)
CheckForHADRMaintPlan(Server, StringBuilder) CheckForHADRMaintPlan(Server, StringBuilder) CheckForHADRMaintPlan(Server, StringBuilder)

If invoked from Maintenance plan Check if HADR is enabled

(Inherited from BackupRestoreBase)
ClearSuspectPageTable(Server) ClearSuspectPageTable(Server) ClearSuspectPageTable(Server)
ExecuteSql(Server, StringCollection) ExecuteSql(Server, StringCollection) ExecuteSql(Server, StringCollection) Inherited from BackupRestoreBase
ExecuteSqlAsync(Server, StringCollection) ExecuteSqlAsync(Server, StringCollection) ExecuteSqlAsync(Server, StringCollection) Inherited from BackupRestoreBase
ExecuteSqlWithResults(Server, String) ExecuteSqlWithResults(Server, String) ExecuteSqlWithResults(Server, String) Inherited from BackupRestoreBase
GetDevicesScript(StringBuilder, BackupDeviceList, ServerVersion) GetDevicesScript(StringBuilder, BackupDeviceList, ServerVersion) GetDevicesScript(StringBuilder, BackupDeviceList, ServerVersion) Inherited from BackupRestoreBase
IsStringValid(String) IsStringValid(String) IsStringValid(String) Inherited from BackupRestoreBase
ReadBackupHeader(Server) ReadBackupHeader(Server) ReadBackupHeader(Server)
ReadFileList(Server) ReadFileList(Server) ReadFileList(Server)
ReadMediaHeader(Server) ReadMediaHeader(Server) ReadMediaHeader(Server)
ReadSuspectPageTable(Server) ReadSuspectPageTable(Server) ReadSuspectPageTable(Server)
Script(Server) Script(Server) Script(Server)
SetMediaPassword(SecureString) SetMediaPassword(SecureString) SetMediaPassword(SecureString) Inherited from BackupRestoreBase
SetMediaPassword(String) SetMediaPassword(String) SetMediaPassword(String) Inherited from BackupRestoreBase
SetPassword(SecureString) SetPassword(SecureString) SetPassword(SecureString) Inherited from BackupRestoreBase
SetPassword(String) SetPassword(String) SetPassword(String) Inherited from BackupRestoreBase
SqlRestore(Server) SqlRestore(Server) SqlRestore(Server)

Runs Restore operation in a synchronous way, i.e. the call blocks until verification is completed.

SqlRestoreAsync(Server) SqlRestoreAsync(Server) SqlRestoreAsync(Server)

Runs Restore operation in an asynchronous way, i.e. the call returns immediately and verify operation continues in background.

SqlVerify(Server) SqlVerify(Server) SqlVerify(Server)

Runs Verify operation in a synchronous way, i.e. the call blocks until verification is completed.

SqlVerify(Server, Boolean) SqlVerify(Server, Boolean) SqlVerify(Server, Boolean)

Runs Verify operation in a synchronous way, i.e. the call blocks until verification is completed.

SqlVerify(Server, Boolean, String) SqlVerify(Server, Boolean, String) SqlVerify(Server, Boolean, String)

Runs Verify operation in a synchronous way, i.e. the call blocks until verification is completed.

SqlVerify(Server, String) SqlVerify(Server, String) SqlVerify(Server, String)

Runs Verify operation in a synchronous way, i.e. the call blocks until verification is completed.

SqlVerifyAsync(Server) SqlVerifyAsync(Server) SqlVerifyAsync(Server)

Runs Verify operation in an asynchronous way, i.e. the call returns immediately and verify operation continues in background.

SqlVerifyAsync(Server, Boolean) SqlVerifyAsync(Server, Boolean) SqlVerifyAsync(Server, Boolean)

Runs Verify operation in an asynchronous way, i.e. the call returns immediately and verify operation continues in background.

SqlVerifyLatest(Server) SqlVerifyLatest(Server) SqlVerifyLatest(Server)

Performs a verify on the last backup recorded in the backup history. FileNumber will be ignored, as the latest file number will be automatically determined.

SqlVerifyLatest(Server, SqlVerifyAction) SqlVerifyLatest(Server, SqlVerifyAction) SqlVerifyLatest(Server, SqlVerifyAction)

Performs a verify on the last backup recorded in the backup history. FileNumber will be ignored, as the latest file number will be automatically determined.

SqlVerifyLatest(Server, SqlVerifyAction, String) SqlVerifyLatest(Server, SqlVerifyAction, String) SqlVerifyLatest(Server, SqlVerifyAction, String)

Performs a verify on the last backup recorded in the backup history. FileNumber will be ignored, as the latest file number will be automatically determined.

SqlVerifyLatest(Server, String) SqlVerifyLatest(Server, String) SqlVerifyLatest(Server, String)

Performs a verify on the last backup recorded in the backup history. FileNumber will be ignored, as the latest file number will be automatically determined.

Wait() Wait() Wait()

Waits for the current asynchronous action to complete.

(Inherited from BackupRestoreBase)

Events

Complete Complete Complete

Complete event

(Inherited from BackupRestoreBase)
Information Information Information

Information event

(Inherited from BackupRestoreBase)
NextMedia NextMedia NextMedia

NextMedia event

(Inherited from BackupRestoreBase)
PercentComplete PercentComplete PercentComplete

PercentComplete event

(Inherited from BackupRestoreBase)

Applies to