συμβάν
31 Μαρ, 11 μ.μ. - 2 Απρ, 11 μ.μ.
Το μεγαλύτερο συμβάν εκμάθησης SQL, Fabric και Power BI. 31 Μαρτίου – 2 Απριλίου. Χρησιμοποιήστε τον κωδικό FABINSIDER για να εξοικονομήσετε 400 $.
Εγγραφείτε σήμεραΑυτό το πρόγραμμα περιήγησης δεν υποστηρίζεται πλέον.
Κάντε αναβάθμιση σε Microsoft Edge για να επωφεληθείτε από τις τελευταίες δυνατότητες, τις ενημερώσεις ασφαλείας και την τεχνική υποστήριξη.
Applies to:
SQL Server
This topic describes how to restore a backup from a device in SQL Server by using SQL Server Management Studio or Transact-SQL.
Σημείωση
For information on SQL Server backup to Azure Blob Storage, see, SQL Server Backup and Restore with Microsoft Azure Blob Storage.
In This Topic
Before you begin:
To restore a backup from a device, using:
If the database being restored does not exist, the user must have CREATE DATABASE permissions to be able to execute RESTORE. If the database exists, RESTORE permissions default to members of the sysadmin and dbcreator fixed server roles and the owner (dbo) of the database (for the FROM DATABASE_SNAPSHOT option, the database always exists).
RESTORE permissions are given to roles in which membership information is always readily available to the server. Because fixed database role membership can be checked only when the database is accessible and undamaged, which is not always the case when RESTORE is executed, members of the db_owner fixed database role do not have RESTORE permissions.
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, point to Tasks, and then click Restore.
Click the type of restore operation you want (Database, Files and Filegroups, or Transaction Log). This opens the corresponding restore dialog box.
On the General page, in the Restore source section, click From device.
Click the browse button for the From device text box, which opens the Specify Backup dialog box.
In the Backup media text box, select Backup Device, and click the Add button to open the Select Backup Device dialog box.
In the Backup device text box, select the device you want to use for the restore operation.
Connect to the Database Engine.
From the Standard bar, click New Query.
In the RESTORE statement, specify a logical or physical backup device to use for the backup operation. This example restores from a disk file that has the physical name Z:\SQLServerBackups\AdventureWorks2022.bak
.
RESTORE DATABASE AdventureWorks2022
FROM DISK = 'Z:\SQLServerBackups\AdventureWorks2022.bak' ;
RESTORE FILELISTONLY (Transact-SQL)
RESTORE HEADERONLY (Transact-SQL)
RESTORE LABELONLY (Transact-SQL)
RESTORE VERIFYONLY (Transact-SQL)
Restore a Database Backup Under the Simple Recovery Model (Transact-SQL)
Restore a Database Backup Using SSMS
Restore a Differential Database Backup (SQL Server)
Restore a Database to a New Location (SQL Server)
Back Up Files and Filegroups (SQL Server)
Back Up a Transaction Log (SQL Server)
Create a Differential Database Backup (SQL Server)
συμβάν
31 Μαρ, 11 μ.μ. - 2 Απρ, 11 μ.μ.
Το μεγαλύτερο συμβάν εκμάθησης SQL, Fabric και Power BI. 31 Μαρτίου – 2 Απριλίου. Χρησιμοποιήστε τον κωδικό FABINSIDER για να εξοικονομήσετε 400 $.
Εγγραφείτε σήμεραΕκπαίδευση
Πιστοποίηση
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.
Τεκμηρίωση
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.
Restore Database (Options Page) - SQL Server
While restoring a database in SQL Server, use the Options page of the Restore Database dialog box to modify the behavior and outcome of the restore operation.