Is it possible to access just one information from RESTORE HEADERONLY

  • Is it possible to access just one information RESTORE HEADERONLY and put it in variable(string) without creating any table. I just need BackupDescription information.

  • I had similar needs a while back, and I couldn't find a way to retrieve the information without first pushing the output into a temporary table with code something like:

        insert into ##Test_DBA_Restore

            exec('restore headeronly from tapedrive with unload')

  • Probably I'll do the same thing...it will be more code in my backup application in c#, but I have to finish the job.

    Thank you anyway.

  • Hi,

    Not sure if this helps, but I think the table msdb..backupset holds some of this information

    Might be wrong though...

     

    Pete

    Peter Gadsby
    Business Intelligence Consultant
    www.hgconsult.co.uk

  • Take a look in BOL at "BackupDevice Object".

  • The Backupset table in the msdb database contains information about the backup information specified when taking a backup.

    select * from msdb..backupset where database_name like 'dbname'

    The output contains a column called 'Description' which shows the description for that particular backup.

    --Kishore

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply