Certain Commands Help You Know What Is in an SQL Backup File

Feb 6
14:51

2011

Robert Schumann

Robert Schumann

  • Share this article on Facebook
  • Share this article on Twitter
  • Share this article on Linkedin

You have backed up at appropriate times and with different recovery modes. Then the unfortunate takes place and the system goes down. There isn't a feeling of panic because you know everything has been backed up. However, there are a few moments of concern when you aren't sure which SQL backup file is which. There isn't a lot of time to figure this out because time is limited - you are racing the clock!

mediaimage
There are times when you can figure out what the SQL backup file is from the file name. It might be possible to figure out whether it is a differential backup,Certain Commands Help You Know What Is in an SQL Backup File Articles full backup, or transaction log backup, but it can be difficult to truly know what is inside the file. Thankfully, a SQL server includes several other commands that help you know what is inside each of the database backup files. This means using options such as FILELISTONLY, HEADERONLY, and LABELONLY.

Along with the ability to restore functionality and a normal backup, there are several other restore options that help you know what is inside a backup file. These commands should be known, especially if there have been multiple backups created from the same physical files. Another problem is when there are other database backups created from another system and you don't know what is in the files.

The commands that help you with this is RESTORE HEADERONLY, which will give you a list of backup header information from a backup device. RESTORE FILELISTONLY will give you all of the log files and data listed in the backup. RESTORE LABELONLY shows data on the backup media.

There will be times when more data than you want will be shown and received from these commands. However, look for clues that provide you with the data you need.