RESTORE Statements for Restoring, Recovering, and Managing Backups
This section describes the RESTORE statements for backups. In addition to the main RESTORE {DATABASE | LOG} statement for restoring and recovering backups, a number of auxiliary RESTORE statements help you manage your backups and plan your restore sequences. The auxiliary RESTORE commands include: RESTORE FILELISTONLY, RESTORE HEADERONLY, RESTORE LABELONLY, RESTORE REWINDONLY, and RESTORE VERIFYONLY.
Statement | Description |
---|---|
Describes the RESTORE DATABASE and RESTORE LOG Transact-SQL statements used to restore and recover a database from backups taken using the BACKUP command. RESTORE DATABASE is used for databases under all recovery models. RESTORE LOG is used only under the full and bulk-logged recovery models. RESTORE DATABASE can also be used to revert a database to a database snapshot. |
|
Documents the arguments described in the "Syntax" sections of the RESTORE statement and of the associated set of auxiliary statements: RESTORE FILELISTONLY, RESTORE HEADERONLY, RESTORE LABELONLY, RESTORE REWINDONLY, and RESTORE VERIFYONLY. Most of the arguments are supported by only a subset of these six statements. The support for each argument is indicated in the description of the argument. |
|
Describes the RESTORE FILELISTONLY Transact-SQL statement, which is used to return a result set containing a list of the database and log files contained in the backup set. |
|
Describes the RESTORE HEADERONLY Transact-SQL statement, which is used to return a result set containing all the backup header information for all backup sets on a particular backup device. |
|
Describes the RESTORE LABELONLY Transact-SQL statement, which is used to return a result set containing information about the backup media identified by the given backup device. |
|
Describes the RESTORE REWINDONLY Transact-SQL statement, which is used to rewind and close tape devices that were left open by BACKUP or RESTORE statements executed with the NOREWIND option. |
|
Describes the RESTORE VERIFYONLY Transact-SQL statement, which is used to verify the backup but does not restore it, and checks to see that the backup set is complete and the entire backup is readable; does not attempt to verify the structure of the data. |