Restore Information

Backup files and system tables contain a wealth of information about what can be restored or already has been restored. You can retrieve information from the backup files by using variations of the RESTORE command. These variations do not actually perform the restore operation but provide information about the backups that can be restored. The RESTORE commands and some useful system tables are detailed in the following sections.

The RESTORE FILELISTONLY Command

The RESTORE FILELISTONLY command returns a result set that contains a list of the database and log files contained in the backup. An example of this command follows:

RESTORE FILELISTONLYFROM DISK = 'C:\mssql\backup\AdventureWorks2012_Partial.bak' ...

Get Microsoft® SQL Server 2012 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.