sys.dm_io_backup_tapes (Transact-SQL)sys.dm_io_backup_tapes (Transact-SQL)

本主題適用於:是SQL Server (從 2008 開始)否Azure SQL Database否Azure SQL 資料倉儲 否平行處理資料倉儲 THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

傳回磁帶裝置的清單和掛載要求的狀態,作為備份。Returns the list of tape devices and the status of mount requests for backups.

資料行名稱Column name 資料類型Data type DescriptionDescription
physical_device_namephysical_device_name nvarchar(520)nvarchar(520) 可以從中取出備份的實際實體裝置名稱。Name of the actual physical device on which a backup can be taken. 不可為 Null。Is not nullable.
logical_device_namelogical_device_name nvarchar(256)nvarchar(256) 使用者指定的磁碟機的名稱 (從sys.backup_devices)。User-specified name for the drive (from sys.backup_devices). 如果沒有使用者指定名稱可用,便是 NULL。NULL if no user-specified name is available. 可為 Null。Is nullable.
statusstatus intint 磁帶的狀態:Status of the tape:

1 = 已開啟,可供使用1 = Open, available for use

2 = 掛載暫止2 = Mount pending

3 = 使用中3 = In use

4 = 載入中4 = Loading

注意:載入磁帶時 (狀態 = 4),尚未讀取媒體標籤。Note: While a tape is being loaded (status = 4), the media label is not read yet. 這類複製媒體標籤值的資料行media_sequence_number,顯示預期的值,它們在磁帶上的實際值可能不同。Columns that copy media-label values, such as media_sequence_number, show anticipated values, which may differ from the actual values on the tape. 已讀取標籤之後,狀態變為3 (使用中),以及媒體標籤資料行會反映所載入的實際磁帶。After the label has been read, status changes to 3 (in use), and the media-label columns then reflect the actual tape that is loaded.

不可為 Null。Is not nullable.
status_descstatus_desc nvarchar(520)nvarchar(520) 磁帶狀態的描述:Description of the tape status:

AVAILABLE AVAILABLE

MOUNT PENDING MOUNT PENDING

IN USE IN USE

LOADING MEDIALOADING MEDIA

不可為 Null。Is not nullable.
mount_request_timemount_request_time datetimedatetime 要求掛載的時間。Time at which mount was requested. 如果沒有掛接已暫止,則為 NULL (狀態 ! = 2)。NULL if no mount is pending (status!=2). 可為 Null。Is nullable.
mount_expiration_timemount_expiration_time datetimedatetime 掛載要求將到期 (逾時) 的時間。Time at which mount request will expire (time-out). 如果沒有掛接已暫止,則為 NULL (狀態 ! = 2)。NULL if no mount is pending (status!=2). 可為 Null。Is nullable.
database_namedatabase_name nvarchar(256)nvarchar(256) 將備份至這個裝置中的資料庫。Database that is to be backed up onto this device. 可為 Null。Is nullable.
spidspid intint 工作階段識別碼。Session ID. 這用來識別磁帶的使用者。This identifies the user of the tape. 可為 Null。Is nullable.
命令command intint 執行備份的命令。Command that performs the backup. 可為 Null。Is nullable.
command_desccommand_desc nvarchar(120)nvarchar(120) 命令的描述。Description of the command. 可為 Null。Is nullable.
media_family_idmedia_family_id intint 媒體家族的索引 (1...n ), n 是媒體集中的媒體家族數目。Index of media family (1...n), n is the number of media families in the media set. 可為 Null。Is nullable.
media_set_namemedia_set_name nvarchar(256)nvarchar(256) 媒體集的名稱 (如果有的話),依照建立媒體集時,MEDIANAME 選項中的指定。Name of the media set (if any) as specified by the MEDIANAME option when the media set was created). 可為 Null。Is nullable.
media_set_guidmedia_set_guid uniqueidentifieruniqueidentifier 用來唯一識別媒體集的識別碼。Identifier that uniquely identifies the media set. 可為 Null。Is nullable.
media_sequence_numbermedia_sequence_number intint 媒體家族內的磁碟區的索引 (1...n).Index of volume within a media family (1...n). 可為 Null。Is nullable.
tape_operationtape_operation intint 正在執行的磁帶作業:Tape operation that is being performed:

1 = 讀取1 = Read

2 = 格式化2 = Format

3 = 初始化3 = Init

4 = 附加4 = Append

可為 Null。Is nullable.
tape_operation_desctape_operation_desc nvarchar(120)nvarchar(120) 要執行的磁帶作業:Tape operation that is being performed:

READREAD

FORMATFORMAT

INITINIT

APPEND APPEND

可為 Null。Is nullable.
mount_request_typemount_request_type intint 掛載要求的類型:Type of the mount request:

1 = 特定磁帶。1 = Specific tape. 所識別的磁帶media_\* 是必要的欄位。The tape identified by the media_\* fields is required.

2 = 下一個媒體家族。2 = Next media family. 要求下一個尚未還原的媒體家族。The next media family not yet restored is requested. 當還原的來源裝置比媒體家族少時,便使用這個項目。This is used when restoring from fewer devices than there are media families.

3 = 接續磁帶。3 = Continuation tape. 將延伸媒體家族,並要求接續磁帶。The media family is being extended, and a continuation tape is requested.

可為 Null。Is nullable.
mount_request_type_descmount_request_type_desc nvarchar(120)nvarchar(120) 掛載要求的類型:Type of the mount request:

SPECIFIC TAPE SPECIFIC TAPE

NEXT MEDIA FAMILY NEXT MEDIA FAMILY

CONTINUATION VOLUME CONTINUATION VOLUME

可為 Null。Is nullable.

PermissionsPermissions

使用者必須有這部伺服器的 VIEW SERVER STATE 權限。The user must have VIEW SERVER STATE permission on the server.

請參閱<See Also

動態管理檢視與函數 (Transact-SQL) Dynamic Management Views and Functions (Transact-SQL)
我 O 相關動態管理檢視和函數 (TRANSACT-SQL )I O Related Dynamic Management Views and Functions (Transact-SQL)