0

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?

asteroid
  • 121
  • 6

1 Answers1

1

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.

mrdenny
  • 27,074
  • 4
  • 40
  • 68
  • thanks! all interested in the functionality mrdenny suggests should see: http://www.karaszi.com/SQLServer/util_restore_all_in_file.asp – asteroid Jul 11 '11 at 14:55