Determine if BACKUP COMPRESSION is available

  • Comments posted to this topic are about the item Determine if BACKUP COMPRESSION is available

  • I have this version, and it does NOT support compression :

    productversion:11.0.2383.0

    productlevel:RTM

    edition:Web Edition (64-bit)

  • Bert,

    You are correct. I have enhanced the IF statment that sets the CompressYN flag. It is below.

    Thanks for the feedback.

    Mark Cook

    IF (

    -- Check for SQL 2012

    -- Editions that support backup compression:

    -- Enterprise, Business Intelligence, Standard

    ((SELECT CONVERT(VARCHAR(16), Verinfo) FROM @verinfoTbl) LIKE '11.%') AND

    (

    ((SELECT CONVERT(VARCHAR(16), EditionInfo) FROM @verinfoTbl) LIKE 'Enterprise%') OR

    ((SELECT CONVERT(VARCHAR(16), EditionInfo) FROM @verinfoTbl) LIKE 'Business%') OR

    ((SELECT CONVERT(VARCHAR(16), EditionInfo) FROM @verinfoTbl) LIKE 'Standard%')

    )

    )

    OR

    (

    -- Check for SQL 2008 R2

    -- Editions that support backup compression:

    -- DataCenter, Enterprise, Standard

    ((SELECT CONVERT(VARCHAR(16), Verinfo) FROM @verinfoTbl) LIKE '10.50%') AND

    (

    ((SELECT CONVERT(VARCHAR(16), EditionInfo) FROM @verinfoTbl) LIKE 'Data%') OR

    ((SELECT CONVERT(VARCHAR(16), EditionInfo) FROM @verinfoTbl) LIKE 'Enterprise%') OR

    ((SELECT CONVERT(VARCHAR(16), EditionInfo) FROM @verinfoTbl) LIKE 'Standard%')

    )

    )

    OR

    (

    -- Check for SQL 2008

    -- Editions that support backup compression:

    -- Enterprise

    ((SELECT CONVERT(VARCHAR(16), Verinfo) FROM @verinfoTbl) LIKE '10.00%') AND

    (

    ((SELECT CONVERT(VARCHAR(16), EditionInfo) FROM @verinfoTbl) LIKE 'Enterprise%')

    )

    )

    BEGIN

    SET @CompressYN = 'Y'

    END

    ELSE

    ---- BACKUP COMPRESSION not available

    BEGIN

    SET @CompressYN = 'N'

    END

  • Thanks for the script.

Viewing 4 posts - 1 through 3 (of 3 total)

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