Događaji
M03 31 23 - M04 2 23
Najveći događaj učenja jezika SQL, platforme Fabric i platforme Power BI. 31. mart - 2. april Koristite kod FABINSIDER da uštedite 400 dolara.
Registrirajte se danasOvaj preglednik više nije podržan.
Nadogradite na Microsoft Edge da iskoristite najnovije osobine, sigurnosna ažuriranja i tehničku podršku.
Applies to:
SQL Server
This topic describes how to view the content of a backup tape or file in SQL Server by using SQL Server Management Studio or Transact-SQL.
Bilješka
Support for tape backup devices will be removed in a future version of SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
In This Topic
Before you begin:
To view the content of a backup tape or file, using:
For information about security, see RESTORE HEADERONLY (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 you want to backup, point to Tasks, and then click Back Up. The Back Up Database dialog box appears.
In the Destination section of the General page, click either Disk or Tape. In the Back up to list box, look for the disk file or tape you want.
If the disk file or tape is not displayed in the list-box, click Add. Select a file name or tape drive. To add it to the Back up to list-box, click OK.
In the Back up to list-box, select the path of the disk or tape drive you want to view, and click Contents. This opens the Device Contents dialog box.
The right-hand pane displays information about the media set and backup sets on the selected tape or file.
Connect to the Database Engine.
From the Standard bar, click New Query.
Use the RESTORE HEADERONLY statement. This example returns information about the file named AdventureWorks2022-FullBackup.bak
.
USE AdventureWorks2022;
RESTORE HEADERONLY
FROM DISK = N'C:\AdventureWorks2022-FullBackup.bak' ;
GO
backupfilegroup (Transact-SQL)
backupfile (Transact-SQL)
backupset (Transact-SQL)
backupmediaset (Transact-SQL)
backupmediafamily (Transact-SQL)
Backup Devices (SQL Server)
Define a Logical Backup Device for a Disk File (SQL Server)
Define a Logical Backup Device for a Tape Drive (SQL Server)
Događaji
M03 31 23 - M04 2 23
Najveći događaj učenja jezika SQL, platforme Fabric i platforme Power BI. 31. mart - 2. april Koristite kod FABINSIDER da uštedite 400 dolara.
Registrirajte se danasObučavanje
Dokumentacija
Restore a Backup from a Device (SQL Server) - SQL Server
This article describes how to restore a backup from a device in SQL Server by using SQL Server Management Studio or Transact-SQL.
Restore a database to a new location (SQL Server) - SQL Server
This article shows you how to restore a SQL Server database to a new location and rename the database by using SQL Server Management Studio or Transact-SQL.
Restore a Database Backup Using SSMS - SQL Server
This article explains how to restore a full SQL Server database backup using SQL Server Management Studio.