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.


  1. Execute the RESTORE DATABASE statement to restore the database backup, specifying:
  2. Optionally, specify:
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
Creating and Restoring a Database Backup Setting Database Options
RESTORE Identifying the Backup Set to Restore
Creating and Applying Transaction Log Backups Creating and Restoring Differential Database Backups
Rebuilding the master Database Restoring the model, msdb, and distribution Databases
Using Differential Database Backups with Transaction Log Backups  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.