Partager via


RestoreOptions Class

Definition

public class RestoreOptions
type RestoreOptions = class
Public Class RestoreOptions
Inheritance
RestoreOptions

Constructors

RestoreOptions()

Initializes a new instance of the RestoreOptions class.

Properties

Blocksize

BLOCKSIZE Specifies the physical block size, in bytes. The supported sizes are 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536 (64 KB) bytes. The default is 65536 for tape devices and 512 otherwise. If you are restoring a backup from a CD-ROM, specify BLOCKSIZE=2048.

BufferCount

BUFFERCOUNT Specifies the total number of I/O buffers to be used for the restore operation. Large numbers of buffers might cause "out of memory" errors because of inadequate virtual address space in the Sqlservr.exe process.

ClearSuspectPageTableAfterRestore

Deletes entries in the suspect page table.

ContinueAfterError

CONTINUE_AFTER_ERROR Specifies that the restore operation is to continue after an error is encountered.

KeepReplication

KEEP_REPLICATION KEEP_REPLICATION prevents replication settings from being removed when a database backup or log backup is restored on a warm standby server and the database is recovered.

KeepTemporalRetention

KEEP_TEMPORAL_RETENTION KEEP_TEMPORAL_RETENTION prevents temporal history tables retention policy setting from being removed when a database backup is restored on a warm standby server and the database is recovered.

MaxTransferSize

MAXTRANSFERSIZE Specifies the largest unit of transfer in bytes to be used between the backup media and SQL Server. The possible values are multiples of 65536 bytes (64 KB) ranging up to 4194304 bytes (4 MB).

PercentCompleteNotification

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

RecoveryState
ReplaceDatabase

REPLACE Specifies that SQL Server should create the specified database and its related files even if another database already exists with the same name. In such a case, the existing database is deleted. When the REPLACE option is not specified, a safety check occurs. This prevents overwriting a different database by accident.

SetRestrictedUser

RESTRICTED_USER Restricts access for the newly restored database to members of the db_owner, dbcreator, or sysadmin roles.

StandByFile

STANDBY Undo uncommitted transactions, but save the undo actions in a standby file that allows the recovery effects to be reversed.

Applies to