次の方法で共有


ReadMediaHeader Method (BackupDevice)

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

The ReadMediaHeader method returns a QueryResults object that enumerates the values of a backup media header record.

構文

object
.ReadMediaHeader(
)
as
QueryResults

Parts

  • object
    Expression that evaluates to an object in the Applies To list.

Prototype (C/C++)

HRESULT ReadMediaHeader(
LPSQLDMOQUERYRESULTS* ppResults);

Returns

A QueryResults object containing zero or one result set defined by these columns.

Column Data type Description

MediaName

nvarchar(130)

Name of the media.

MediaSetId

nvarchar(39)

System-generated unique identifier for the media set.

FamilyCount

integer

Number of families within the media set.

FamilySequenceNumber

integer

Ordinal position of the family within the entire media set.

MediaFamilyId

nvarchar(39)

System-generated unique identifier for the media family.

MediaSequenceNumber

integer

Ordinal position of the media within its family.

MediaLabelPresent

tinyint

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.

MediaDescription

nvarchar(256)

Descriptive text. Interpret by using the value returned in the MediaLabelPresent column.

SoftwareName

nvarchar(65)

Name of the product creating the media header.

SoftwareVendorId

integer

Unique identifier of the manufacturer of the product creating the media header.

MediaDate

smalldatetime

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.

Applies To:

BackupDevice Object

参照

その他の技術情報

メディア セットとメディア ファミリの使用

ヘルプおよび情報

SQL Server 2005 の参考資料の入手