Friday, August 20, 2010

How to check contents of a backup file

RESTORE FILELISTONLY
The RESTORE FILELISTONLY option allows you to see a list of the all the files of the database which was backed up.
SSMS do not have this facility,unless you use SSMS for Restore.You can only get information using T-SQL

Restore FILELISTONLY from disk='C:\Prakash_Test.BAK' WITH FILE=1

The RESTORE FILELISTONLY option can be simply issued as follows for a backup that exists on disk.

If there are multiple backups in one backup file then you will have to specify the option "WITH FILE = (Number)" .If you don’t then you will only get information for the first backup in the file.

So for example if you have a full backup you will see all of the data files (mdf,ndf) and the log file (ldf).

No comments:

Post a Comment