查看逻辑备份设备的属性和内容 (SQL Server)View the Properties and Contents of a Logical Backup Device (SQL Server)

适用对象:是SQL Server 否Azure SQL 数据库 否Azure Synapse Analytics (SQL DW) 否并行数据仓库APPLIES TO: yesSQL Server noAzure SQL Database noAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

本主题介绍如何通过使用 SQL ServerSQL ServerSQL Server Management StudioSQL Server Management Studio 查看 Transact-SQLTransact-SQL中逻辑备份设备的属性和内容。This topic describes how to view the properties and contents of a logical backup device in SQL ServerSQL Server by using SQL Server Management StudioSQL Server Management Studio or Transact-SQLTransact-SQL.

本主题内容In This Topic

开始之前Before You Begin

SecuritySecurity

有关安全性的信息,请参阅 RESTORE LABELONLY (Transact SQL)For information about security, see RESTORE LABELONLY (Transact-SQL).

权限Permissions

SQL Server 2008SQL Server 2008 和更高版本中,获取有关备份集或备份设备的信息要求具有 CREATE DATABASE 权限。In SQL Server 2008SQL Server 2008 and later versions, obtaining information about a backup set or backup device requires CREATE DATABASE permission. 有关详细信息,请参阅 GRANT 数据库权限 (Transact-SQL)For more information, see GRANT Database Permissions (Transact-SQL).

使用 SQL Server Management StudioUsing SQL Server Management Studio

查看逻辑备份设备的属性和内容To view the properties and contents of a logical backup device

  1. 连接到相应的 MicrosoftMicrosoft SQL Server 数据库引擎SQL Server Database Engine实例之后,在对象资源管理器中,单击服务器名称以展开服务器树。After connecting to the appropriate instance of the MicrosoftMicrosoft SQL Server 数据库引擎SQL Server Database Engine, in Object Explorer, click the server name to expand the server tree.

  2. 展开 “服务器对象” ,然后展开 “备份设备”Expand Server Objects, and expand Backup Devices.

  3. 单击设备并右键单击“属性” ,将打开“备份设备” 对话框。Click the device and right-click Properties, which opens the Backup Device dialog box.

  4. “常规” 页将显示设备名称和目标,目标为磁带设备或者文件路径。The General page displays the device name and destination, which is either a tape device or file path.

  5. “选择页” 窗格中,单击 “介质内容”In the Select a Page pane, click Media Contents.

  6. 以下属性面板中将显示右侧窗格:The right-hand pane displays in the following properties panels:

    • 介质Media

      介质顺序信息(介质序列号、簇序列号和镜像标识符(如果存在))以及介质的创建日期和时间。Media sequence information (the media sequence number, the family sequence number, and the mirror identifier, if any) and the media creation date and time.

    • 介质集Media set

      介质集信息:介质集名称和说明(如果有)以及介质集中的簇数。Media set information: the media set name and description, if any, and the number of families in the media set.

  7. “备份集” 网格显示了有关介质集内容的信息。The Backup sets grid displays information about the contents of the media set.

备注

有关详细信息,请参阅 媒体内容页For more information, see Media Contents Page.

使用 Transact-SQLUsing Transact-SQL

查看逻辑备份设备的属性和内容To view the properties and contents of a logical backup device

  1. 连接到 数据库引擎Database EngineConnect to the 数据库引擎Database Engine.

  2. 在标准菜单栏上,单击 “新建查询”From the Standard bar, click New Query.

  3. 使用 RESTORE LABELONLY 语句。Use the RESTORE LABELONLY statement. 此示例返回有关 AdvWrks2008R2Backup 逻辑备份设备的信息。This example returns information about the AdvWrks2008R2Backup logical backup device.

USE AdventureWorks2012 ;  
RESTORE LABELONLY  
   FROM AdvWrks2008R2Backup ;  
GO  
  

另请参阅See Also

backupfilegroup (Transact-SQL) backupfilegroup (Transact-SQL)
backupfile (Transact-SQL) backupfile (Transact-SQL)
backupset (Transact-SQL) backupset (Transact-SQL)
backupmediaset (Transact-SQL) backupmediaset (Transact-SQL)
backupmediafamily (Transact-SQL) backupmediafamily (Transact-SQL)
sp_addumpdevice (Transact-SQL) sp_addumpdevice (Transact-SQL)
备份设备 (SQL Server)Backup Devices (SQL Server)