BackupRestoreBase BackupRestoreBase BackupRestoreBase Class

Definition

The BackupRestoreBase class is a base class that represents functionality that is common to both backup and restore operations.

public ref class BackupRestoreBase
public class BackupRestoreBase
Public Class BackupRestoreBase
Inheritance
BackupRestoreBaseBackupRestoreBaseBackupRestoreBase
Derived

Examples

Backing Up and Restoring Databases and Transaction Logs

Remarks

The BackupRestoreBase class is used in the construction of the Restore class and the Backup class, and contains functionality that is common.

Constructors

BackupRestoreBase() BackupRestoreBase() BackupRestoreBase()

Initializes a new instance of the BackupRestoreBase class.

Fields

currentAsyncOperation currentAsyncOperation currentAsyncOperation

Specifies the current asynchronous operation, such as backup, restore, or none.

m_BackupAction m_BackupAction m_BackupAction

Specifies the backup action type, such as database or log.

m_LogTruncation m_LogTruncation m_LogTruncation

Specifies whether to truncate the log.

m_RestoreAction m_RestoreAction m_RestoreAction

Specifies the restore action type, such as database or log.

Properties

AsyncStatus AsyncStatus AsyncStatus

Gets the asynchronous status of a backup or restore process.

BlockSize BlockSize BlockSize

Gets or sets the physical block size of the backup or restore, in bytes.

BufferCount BufferCount BufferCount

Gets or sets the total number of I/O buffers to be used for the backup or restore operation.

Checksum Checksum Checksum

Gets or sets a Boolean property value that determines whether a checksum value is calculated during backup or restore operations.

ContinueAfterError ContinueAfterError ContinueAfterError

Gets or sets a Boolean property value that determines whether the backup or restore continues after a checksum error occurs.

CredentialName CredentialName CredentialName

Gets or sets the Credential property value, which is used to authenticate to the Windows Azure storage account.

Database Database Database

Gets or sets the database on which the backup or restore operation runs.

DatabaseFileGroups DatabaseFileGroups DatabaseFileGroups

Gets the SQL Server file groups targeted by the backup or restore operation.

DatabaseFiles DatabaseFiles DatabaseFiles

Gets the operating system files targeted by the backup or restore operation.

Devices Devices Devices

Gets the backup devices specified for the backup or restore operation.

MaxTransferSize MaxTransferSize MaxTransferSize

Gets or sets the maximum number of bytes to be transferred between the backup media and the instance of SQL Server.

MediaName MediaName MediaName

Gets or sets the name used to identify a particular media set.

NoRecovery NoRecovery NoRecovery

Gets or sets a Boolean property value that determines whether the tail of the log is backed up and whether the database is restored into the Restoring state.

NoRewind NoRewind NoRewind

Gets or sets a Boolean property value that determines whether Microsoft SQL Server will keep the tape open after the backup or restore operation.

PercentCompleteNotification PercentCompleteNotification PercentCompleteNotification

Gets or sets the percentage interval for PercentCompleteEventHandler event handler calls.

Restart Restart Restart

Gets or sets a Boolean property value that determines whether the backup or restore operation will restart if it is interrupted.

UnloadTapeAfter UnloadTapeAfter UnloadTapeAfter

Gets or sets a Boolean property value that determines whether tape media are rewound and unloaded after the backup or restore operation completes.

Methods

Abort() Abort() Abort()

Terminates a running backup or restore operation.

CheckForHADRMaintPlan(Server, StringBuilder) CheckForHADRMaintPlan(Server, StringBuilder) CheckForHADRMaintPlan(Server, StringBuilder)

Checks for HADR Maintenance plan.

ExecuteSql(Server, StringCollection) ExecuteSql(Server, StringCollection) ExecuteSql(Server, StringCollection)

Executes a batch of Transact-SQL statements that does not expect a returned results set on the specified instance of SQL Server.

ExecuteSqlAsync(Server, StringCollection) ExecuteSqlAsync(Server, StringCollection) ExecuteSqlAsync(Server, StringCollection)

Executes a batch of Transact-SQL statements asynchronously that does not expect a returned results set on the specified instance of SQL Server.

ExecuteSqlWithResults(Server, String) ExecuteSqlWithResults(Server, String) ExecuteSqlWithResults(Server, String)

Executes a batch of Transact-SQL statements that expects one or more returned results sets on the specified instance of SQL Server.

GetDevicesScript(StringBuilder, BackupDeviceList, ServerVersion) GetDevicesScript(StringBuilder, BackupDeviceList, ServerVersion) GetDevicesScript(StringBuilder, BackupDeviceList, ServerVersion)

Gets the script that is used to create devices.

IsBackupUrlDeviceSupported(ServerVersion) IsBackupUrlDeviceSupported(ServerVersion) IsBackupUrlDeviceSupported(ServerVersion)

Indicates whether BackupToUrl is supported on the connected server version.

IsStringValid(String) IsStringValid(String) IsStringValid(String)

Verifies whether the specified string is valid.

SetMediaPassword(SecureString) SetMediaPassword(SecureString) SetMediaPassword(SecureString)

Sets the password for a media set.

SetMediaPassword(String) SetMediaPassword(String) SetMediaPassword(String)

Sets the password for a media set.

SetPassword(SecureString) SetPassword(SecureString) SetPassword(SecureString)

Sets the password for a backup set.

SetPassword(String) SetPassword(String) SetPassword(String)

Sets the password for a backup set.

Wait() Wait() Wait()

Waits for the current backup or restore operation to complete before moving on to the next process.

Events

Complete Complete Complete

Occurs when the backup or restore operation completes.

Information Information Information

Occurs when any informational message is issued by Microsoft SQL Server that cannot be handled by the CompleteNextMedia or PercentComplete events.

NextMedia NextMedia NextMedia

Occurs when the backup or restore operation exhausts the medium in a target device.

PercentComplete PercentComplete PercentComplete

Occurs when a backup or restore operation reaches a completion unit.

Applies to