How to restore a database backup (Transact-SQL)
To restore a database backup
Important The system administrator restoring the database backup must be the only person currently using the database to be restored.
- Execute the RESTORE DATABASE statement to restore the database backup, specifying:
- The name of the database to restore.
- The backup device where the database backup will be restored from.
- The NORECOVERY clause if you have a transaction log or differential database backup to apply after restoring the database backup.
- Optionally, specify:
- The FILE clause to identify the backup set on the backup device to restore.
Examples
This example restores the MyNwind database backup from tape without using a permanent (named) backup device.
USE master
GO
RESTORE DATABASE MyNwind
FROM TAPE = '\\.\Tape0'
GO
See Also
(c) 1988-98 Microsoft Corporation. All Rights Reserved.