What are the challenges you face when working across database platforms? Take the survey
Options

How to programmatically identify the type of an sqb file?

ogrishmanogrishman Posts: 81 Bronze 4
edited November 22, 2010 1:21AM in SQL Backup Previous Versions
Hey,

How to programmatically identify the type of an sqb file? Such as whether it's an full backup or log backup.

Thanks.

Comments

  • Options
    peteypetey Posts: 2,358 New member
    Using the sqbutility extended stored procedure:
    DECLARE @type INT
    EXEC master..sqbutility 1015, 'e:\temp\pubs.sqb', @type OUTPUT
    SELECT @type
    
    where @type 1 = database full, 2 = database differential, 3 = log, 4 = file, 14 = file differential, 19 = partial, 20 = partial differential

    Reading the file header:

    Read value for byte offset 505. Values as above i.e. 1 = database full, 2 = database differential etc.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
Sign In or Register to comment.