Thursday, June 7, 2012

Restore HeaderOnly, VerifyOnly, FilelistOnly

Restore Headeronly  -- This command displays backup information of a particular database backup.

Restore Filelistonly  -- This command displays list of data files and log files in the database backup.

Restore VerifyOnly -- Verifies whether the backup set is valid or not, It wont verify the structure of data in the backup media.


SQL Server Syntax

RESTORE FILELISTONLY FROM DISK = 'C:\temp\TestDB.bak'

RESTORE HEADERONLY FROM DISK = 'C:\temp\TestDB.bak'

RESTORE VERIFYONLY FROM DISK = 'C:\temp\TestDB.bak' Redgate Syntax :

Redgate Syntax

EXECUTE master..sqlbackup '-SQL "restore headeronly from disk='C:\temp\TestDB.bak''"'

EXECUTE master..sqlbackup '-SQL "RESTORE filelistonly from disk=''C:\temp\TestDB.bak''"'

EXECUTE master..sqlbackup '-SQL "RESTORE verifyonly from disk=''C:\temp\TestDB.bak''"'

No comments: