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.
Examples

This example restores the MyNwind database backup from tape:

USE master
GO
RESTORE DATABASE MyNwind
   FROM TAPE = '\\.\Tape0'
GO

See Also

Database Backups

Setting Database Options

RESTORE

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

Show:
© 2014 Microsoft