Export (0) Print
Expand All

How to restore a database backup (Transact-SQL)

SQL Server 2000

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:
    • The name of the database to restore.

    • The backup device from where the database backup will be restored.

    • The NORECOVERY clause if you have a transaction log or differential database backup to apply after restoring the database backup.
  2. Optionally, specify:
    • The FILE clause to identify the backup set on the backup device to restore.

This example restores the MyNwind database backup from tape:

USE master
   FROM TAPE = '\\.\Tape0'

See Also

Database Backups

Setting Database Options


Identifying the Backup Set to Restore

Transaction Log Backups

Differential Database Backups

Rebuilding the master Database

Restoring the model, msdb, and distribution Databases

Reducing Recovery Times

© 2014 Microsoft