Mssql Restore Filelistonly From Disk

0 views
Skip to first unread message

Lior Gonzales

unread,
Aug 3, 2024, 5:42:15 PM8/3/24
to dipenilan

This information can only be returned using T-SQL there is not a way to get thisinformation from SQL Server Management Studio. Although if you do a restore andselect options, you will see some of this information in SSMS.

The RESTORE FILELISTONLY option can be simply issued as follows for a backupthat exists on disk. If there are multiple backups in one file and you donot specify "WITH FILE = X" you will only get information for the first backup inthe file. To get the FILE number useRESTORE HEADERONLY and use the "Position" column.

Restoring the database depends on the situation and backup type available at the time. Sometimes we need to take the backup as to create a copy of the backup for testing purpose from prod to test environment and sometimes we might want to restore the database in case of any failure or corruption. Also, the availability of the backups is also important and how we have formed the backups strategies in case of any database corruption or server failure.

The restorefilelistonly option can be simply issued as follows for a backup that exists on disk. If there are multiple backups in one file and you do not specify "WITH FILE = X" you will only get information for the first backup in the file.

The RESTORE VERIFYONLY command checks the backup to ensure it is complete and the entire backup is readable. The does not do an actual restore, but reads through the file to ensure that SQL Server can read it in the event that a restore using this backup needs to occur.

The RESTORE VERIFYONLY option is a good choice to check each backup after the backup has completed. Unfortunately this takes additional processing time for this to complete, but it is a good practice to put in place

The Restore HeaderOnlyreturns a result set containing all the backup header information for all backup sets on a particular backup device in SQL Server.Restore HeaderOnly and Restore FilelistOnly are the two most important statements a DBA should issue when preparing to restore a backup

c80f0f1006
Reply all
Reply to author
Forward
0 new messages