Search code examples
reporting-servicesssrs-2019

In Ssrs 2019, how does one interpret Subscriptions.InactiveFlags?


In the Ssrs database catalog, how are you supposed to interpret the InactiveFlags column of the Subscriptions table?


Solution

  • I couldn't find anything really authoritative/complete out there on the 'Net (well, beyond "InactiveFlags = 0 means the subscription is enabled"). I perused the built-in sprocs/funcs in Ssrs, but except for DeliveryRemovedInactivateSubscription, they all just pass through whatever value they're given.

    So I went and decompiled the ReportingServicesLibrary.dll (I used "dnSpy") and found the Microsoft.ReportingServices.Library.InActiveFlags enum. I've personally experienced "8" and "16" from past work with Ssrs 2012, so everything lines up. It's a bit-mask, defined as follows:

    internal enum InActiveFlags
    {
        Active, // 0
        DeliveryProviderRemoved, // 1
        SharedDataSourceRemoved, // 2
        MissingParameterValue = 4,
        InvalidParameterValue = 8,
        UnknownItemParameter = 16,
        MissingExtensionEncryptedSettings = 32,
        CachingNotEnabledOnItem = 64,
        DisabledByUser = 128
    }
    

    E.g.

    --Find subs with invalid params ('cause someone made a breaking change to the report after the sub was created).
    SELECT * FROM Subscriptions WHERE InactiveFlags & 8 != 0;