Export (0) Print
Expand All

How to: Restore a Database Backup (Transact-SQL)

This topic explains how to restore a full database backup.

ms189895.note(en-US,SQL.90).gifImportant:
The system administrator restoring the full database backup must be the only person currently using the database to be restored.

  1. 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.
  2. Optionally, specify:

    • 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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft