ReadMediaHeader Method (BackupDevice)
This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
The ReadMediaHeader method returns a QueryResults object that enumerates the values of a backup media header record.
A QueryResults object containing zero or one result set defined by these columns.
Name of the media.
System-generated unique identifier for the media set.
Number of families within the media set.
Ordinal position of the family within the entire media set.
System-generated unique identifier for the media family.
Ordinal position of the media within its family.
When 1, the MediaDescription column reports the contents of the Microsoft Tape Format label.
When 0, no label is present for the media. The MediaDescription column reports informative text.
Descriptive text. Interpret by using the value returned in the MediaLabelPresent column.
Name of the product creating the media header.
Unique identifier of the manufacturer of the product creating the media header.
Creation date and time of the media header.
A database backup performed by Microsoft SQL Server can target multiple devices of a single type and can span multiple media maintained by the device. To organize media used in backup, SQL Server defines the media set and media family. A media label, or header record, maintains data about a media's location within a media set and media family.
When the media of a backup device is unused or unlabeled, such as when a disk device is empty, the ReadMediaHeader method succeeds, returning an empty QueryResults object.