Commonly Used Restore Commands

Restore is the generic T-sql command we use to restore database backup files. We can also use restore command for other purposes such as validating the backups, find the database files in the backupset etc. Below are the commonly used restore functions other than the obvious restore database.

1.Validating the Backup :

Restore VerifyOnly From Disk= 'E:\BackupFilePath\BackupFile.Bak'

2.Find the Backup Files in the BackupSet

Restore HeaderOnly From Disk = 'E:\BackupFilePath\BackupFile.Bak'

3.Find the Database Files in the Backupset

Restore FileListOnly From Disk = 'E:\BackupFilePath\BackupFile.Bak'

There are also other restore command syntaxes we can use but I refer these more often.