Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
This topic describes how to view the data and log files in a backup set in SQL Server by using SQL Server Management Studio or Transact-SQL.
In This Topic
Before you begin:
To view the data and log files in a backup set, using:
For information about security, see RESTORE FILELISTONLY (Transact-SQL)
In SQL Server 2008 (10.0.x) 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).
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.
Expand Databases, and, depending on the database, either select a user database or expand System Databases and select a system database.
Right-click the database, and then click Properties, which opens the Database Properties dialog box.
In the Select a Page pane, click Files.
Look in the Database files grid for a list of the data and log files and their properties.
Connect to the Database Engine.
From the Standard bar, click New Query.
Use the RESTORE FILELISTONLY statement. This example returns information about the second backup set (FILE=2
) on the AdventureWorksBackups
backup device.
USE AdventureWorks2022;
RESTORE FILELISTONLY FROM AdventureWorksBackups
WITH FILE=2;
GO
backupfilegroup (Transact-SQL)
backupfile (Transact-SQL)
backupset (Transact-SQL)
backupmediaset (Transact-SQL)
backupmediafamily (Transact-SQL)
Backup Devices (SQL Server)
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Certification
Microsoft Certified: Azure Database Administrator Associate - Certifications
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.
Documentation
Backup history & header - SQL Server
The msdb database stores SQL Server backup and restore operation history of a server instance. Learn about Transact-SQL statements that access backup history.
RESTORE VERIFYONLY (Transact-SQL) - SQL Server
RESTORE Statements - VERIFYONLY (Transact-SQL)
Restore a Transaction Log Backup (SQL Server) - SQL Server
This article describes how to restore a transaction log backup in SQL Server by using SQL Server Management Studio or Transact-SQL.