To restore a differential database backup
This example restores a database and differential database backup of the MyNwind database.
-- Assume the database is lost at this point. Now restore the full -- database. Specify the original full backup and NORECOVERY. -- NORECOVERY allows subsequent restore operations to proceed. RESTORE DATABASE MyNwind FROM MyNwind_1 WITH NORECOVERY GO -- Now restore the differential database backup, the second backup on -- the MyNwind_1 backup device. RESTORE DATABASE MyNwindFROM MyNwind_1WITH FILE = 2,RECOVERYGO
This example restores a database, differential database, and transaction log backup of the MyNwind database.
-- Assume the database is lost at this point. Now restore the full -- database. Specify the original full backup and NORECOVERY. -- NORECOVERY allows subsequent restore operations to proceed. RESTORE DATABASE MyNwind FROM MyNwind_1 WITH NORECOVERY GO -- Now restore the differential database backup, the second backup on -- the MyNwind_1 backup device. RESTORE DATABASE MyNwindFROM MyNwind_1WITH FILE = 2,NORECOVERYGO-- Now restore each transaction log backup created after-- the differential database backup.RESTORE LOG MyNwindFROM MyNwind_log1WITH NORECOVERYGORESTORE LOG MyNwindFROM MyNwind_log2WITH RECOVERYGO