SQL Server RESTORE LABELONLY
By: Greg Robidoux
The RESTORE LABELONLY option allows you to see the backup media information for the backup device. So if a backup device, such as a backup file, has multiple backups you will only get one record back that gives you information about the media set, such as the software that was used to create the backup, the date the media was created, etc...
ExplanationThis information can only be returned using T-SQL there is not a way to get this information from SQL Server Management Studio.
The RESTORE LABELONLY option can be simply issued as follows for a backup that exists on disk.
Get labelonly information from a backup file
RESTORE LABELONLY FROM DISK = 'C:\AdventureWorks.BAK' GO
The result set would like the following. As you can see there is a lot of great information that is returned when using LABELONLY.
|SoftwareName||Microsoft SQL Server|