---
title: "View backup set data & Log files"
ms.custom: seo-lt-2019
ms.date: "12/17/2019"
ms.prod: sql
ms.prod_service: backup-restore
ms.reviewer: ""
ms.technology: backup-restore
ms.topic: conceptual
helpviewer_keywords:
- "database backups [SQL Server], viewing backup sets"
- "viewing backup set information"
- "backup sets [SQL Server], viewing files in"
- "displaying backup set information"
- "transaction log backups [SQL Server], viewing backup sets"
- "backing up [SQL Server], viewing backup sets"
ms.assetid: abb6420c-f809-426e-aeb4-d0a74989cf39
author: MikeRayMSFT
ms.author: mikeray
---
# View the data and log files in a backup set (SQL Server)
[!INCLUDE[appliesto-ss-xxxx-xxxx-xxx-md](../../includes/appliesto-ss-xxxx-xxxx-xxx-md.md)]
This topic describes how to view the data and log files in a backup set in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)].
**In This Topic**
- **Before you begin:**
[Security](#Security)
- **To view the data and log files in a backup set, using:**
[SQL Server Management Studio](#SSMSProcedure)
[Transact-SQL](#TsqlProcedure)
## Before You Begin
### Security
For information about security, see [RESTORE FILELISTONLY (Transact-SQL)](../../t-sql/statements/restore-statements-filelistonly-transact-sql.md)
#### Permissions
In [!INCLUDE[ssKatmai](../../includes/sskatmai-md.md)] 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)](../../t-sql/statements/grant-database-permissions-transact-sql.md).
## 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 [!INCLUDE[msCoName](../../includes/msconame-md.md)] [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)], 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.
## Using Transact-SQL
#### To view the data and log files in a backup set
1. Connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)].
2. From the Standard bar, click **New Query**.
3. Use the [RESTORE FILELISTONLY](../../t-sql/statements/restore-statements-filelistonly-transact-sql.md) statement. This example returns information about the second backup set (`FILE=2`) on the `AdventureWorksBackups` backup device.
```sql
USE AdventureWorks2012 ;
RESTORE FILELISTONLY FROM AdventureWorksBackups
WITH FILE=2;
GO
```
## See Also
[backupfilegroup (Transact-SQL)](../../relational-databases/system-tables/backupfilegroup-transact-sql.md)
[backupfile (Transact-SQL)](../../relational-databases/system-tables/backupfile-transact-sql.md)
[backupset (Transact-SQL)](../../relational-databases/system-tables/backupset-transact-sql.md)
[backupmediaset (Transact-SQL)](../../relational-databases/system-tables/backupmediaset-transact-sql.md)
[backupmediafamily (Transact-SQL)](../../relational-databases/system-tables/backupmediafamily-transact-sql.md)
[Backup Devices (SQL Server)](../../relational-databases/backup-restore/backup-devices-sql-server.md)