Udostępnij za pośrednictwem


View the Data and Log Files in a Backup Set (SQL Server)

This topic describes how to view the data and log files in a backup set in SQL Server 2012 by using SQL Server Management Studio or Transact-SQL.

In This Topic

  • Before you begin:

    Security

  • To view the data and log files in a backup set, using:

    SQL Server Management Studio

    Transact-SQL

Before You Begin

Security

For information about security, see RESTORE FILELISTONLY (Transact-SQL)

Permissions

In SQL Server 2008 and later versions, obtaining information about a backup set or backup device requires CREATE DATABASE permission. For more information, see GRANT Database Permissions (Transact-SQL).

Ikona strzałki używana z łączem Powrót na górę strony[Top]

Using SQL Server Management Studio

To view the data and log files in a backup set

  1. After connecting to the appropriate instance of the Microsoft SQL Server Database Engine, in Object Explorer, click the server name to expand the server tree.

  2. Expand Databases, and, depending on the database, either select a user database or expand System Databases and select a system database.

  3. Right-click the database, and then click Properties, which opens the Database Properties dialog box.

  4. In the Select a Page pane, click Files.

  5. Look in the Database files grid for a list of the data and log files and their properties.

Ikona strzałki używana z łączem Powrót na górę strony[Top]

Using Transact-SQL

To view the data and log files in a backup set

  1. Connect to the Database Engine.

  2. From the Standard bar, click New Query.

  3. Use the RESTORE FILELISTONLY statement. This example returns information about the second backup set (FILE=2) on the AdventureWorksBackups backup device.

USE AdventureWorks2012 ;
RESTORE FILELISTONLY FROM AdventureWorksBackups 
   WITH FILE=2;
GO

Ikona strzałki używana z łączem Powrót na górę strony[Top]

Zobacz także

Odwołanie

backupfilegroup (Transact-SQL)

backupfile (Transact-SQL)

backupset (Transact-SQL)

backupmediaset (Transact-SQL)

backupmediafamily (Transact-SQL)

Koncepcje

Backup Devices (SQL Server)