RESTORE Statement

Microsoft SQL Server Virtual Backup

Microsoft SQL Server Virtual Backup Device Specification

RESTORE Statement

Syntax

RESTORE DATABASE {database_name | @database_name_var}
[FROM <backup_device> [,...n]]
[WITH
[DBO_ONLY]
[[,] FILE = file_number]
[[,] MEDIANAME = {media_name | @media_name_variable}]
[[,] MOVE 'logical_file_name' TO 'operating_system_file_name']
[,...n]
[[,] {NORECOVERY | RECOVERY | STANDBY = undo_file_name}]
[[,] {NOUNLOAD | UNLOAD}]
[[,] REPLACE]
[[,] RESTART]

[[,] SNAPSHOT]
[[,] STATS [= percentage]]
]

The SNAPSHOT option instructs RESTORE to skip the data and log laydown phases of the restore, as the snapshot will be present on disk. Instead, restore will issue a VDC_MountSnapshot command to the VDI application. Successful completion of the command indicates to backup that the data and log files are in place.

The following restrictions apply if the SNAPSHOT option is given:

  • The backup device must be a virtual device.

  • Only a single virtual device may be specified.

It is expected that the application will specify PIPE-like behavior for the virtual device. Whatever mode is chosen, the behavior of the command options will be consistent with VDI behavior. In particular, MOVE can be used to indicate that an individual file is in a different location than indicated in the backup set meta data.

Note   For complete documentation on the RESTORE statement, see SQL Server Books Online.