Aug 9, 2011
tom

RESTORE HEADERONLY usage for telling differential backups apart from full backups

Question

Using RESTORE HEADERONLY and checking the BackupType column to tell differential and full backups apart, but a little stumped on how to restrict the data that is being returned from the RESTORE HEADERONLY command.

How can you restrict the RESTORE HEADERONLY return set to just the BackupType column return info?

I guess make a stored procedure…? Any suggestions?

Answer

You can’t. You would need to create a table and do an

INSERT INTO #MyTable
RESTORE HEADERONLY ...

Then select only the columns that you want from the table.

Related posts:

  1. postgresql trigger for updating multiple columns
  2. SQL Server 2008 – Restore database without restoring transaction log (LDF)
  3. Sharepoint 2010: Can I use restore-spsite on a .bak file from backup-spfarm?
  4. Does a full ntbackup include mssql mdf files?
  5. Undo Restore Previous versions

Leave a comment