Views [dbo].[ThresholdsView]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created11:10:09 AM Wednesday, March 07, 2007
Last Modified5:37:37 PM Monday, May 04, 2009
Columns
Name
server_addr
probe_addr
MibIdx
rsrcIndex
rsrcOtherIndex
fieldIndex
fieldName
lowerThreshold
lowerMode
upperThreshold
upperMode
Permissions
TypeActionOwning Principal
GrantSelectuniadmin
SQL Script
CREATE VIEW ThresholdsView AS
SELECT
    server_addr=0
    ,probe_addr=0
    ,MibIdx=0
    ,rsrcIndex=0
    ,rsrcOtherIndex=0
    ,td.fieldIndex
    ,fieldName=lower(td.fieldName)
    ,lowerThreshold=displayScaleFactor*td.lowerDefaultValue
    ,lowerMode=td.lowerDefaultMode
    ,upperThreshold=displayScaleFactor*td.upperDefaultValue
    ,upperMode=td.upperDefaultMode
FROM ThresholdDesc td
UNION ALL
SELECT t.server_addr
    ,t.probe_addr
    ,t.MibIdx
    ,t.rsrcIndex
    ,t.rsrcOtherIndex
    ,td.fieldIndex
    ,fieldName=lower(td.fieldName)
    ,lowerThreshold=displayScaleFactor*(
        CASE lowerMode
        WHEN 2 THEN td.lowerDefaultValue
        WHEN 3 THEN 0
        ELSE t.lowerThreshold
        END)
    ,t.lowerMode
    ,upperThreshold=displayScaleFactor*(
        CASE upperMode
        WHEN 2 THEN td.upperDefaultValue
        WHEN 3 THEN 0
        ELSE t.upperThreshold
        END)
    ,t.upperMode
FROM Thresholds t JOIN ThresholdDesc td ON
    t.fieldIndex=td.fieldIndex
GO
GRANT SELECT ON  [dbo].[ThresholdsView] TO [uniadmin]
GO
Uses