How to: Restore a Database Backup (Transact-SQL)
This topic explains how to restore a full database backup.
The system administrator restoring the full database backup must be the only person currently using the database to be restored.
To restore a full database backup
Execute the RESTORE DATABASE statement to restore the full database backup, specifying:
- The name of the database to restore.
- The backup device from where the full database backup is restored.
- The NORECOVERY clause if you have a transaction log or differential database backup to apply after restoring the full database backup.
- The FILE clause to identify the backup set on the backup device to restore.
This example restores the
AdventureWorks full database backup from tape.
USE master GO RESTORE DATABASE AdventureWorks FROM TAPE = '\\.\Tape0' GO
Performing a Complete Database Restore (Full Recovery Model)
Performing a Complete Database Restore (Simple Recovery Model)
Full Database Backups
Setting Database Options
Viewing Information About Backups
Optimizing Backup and Restore Performance in SQL Server
Considerations for Rebuilding the master Database
Considerations for Restoring the model and msdb Databases