T-SQL Tutorial

Restore full and differential database backup


Restore a full database backup followed by a differential backup from backup device.

RESTORE DATABASE Syntax:

RESTORE DATABASE [ database_name ]
FROM DISK = [ backup_path ]
WITH FILE = [ file_number]
RECOVERY;

RESTORE DATABASE Example:

RESTORE DATABASE master
FROM DISK = 'E:\SQLServerBackup\master.bak'
WITH FILE = 9
RECOVERY;

Messages:
Processed 328 pages for database 'test_2', file 'test_2' on file 1.
Processed 2 pages for database 'test_2', file 'test_2_log' on file 1.
RESTORE DATABASE successfully processed 330 pages in 0.276 seconds (9.333 MB/sec).