SQL Queries - CAST Knowledge Base - Queries on Links - How to list objects not having the categories needed for link escalation

Purpose of Query

The query retrieves the list of all object type not having the categories needed for link escalation, below are the four categories:

6500;"ESCALATION_AS_CALLER_CHILD";"To be part of escalation as caller child";"ACTIVE "
6501;"ESCALATION_AS_CALLEE_CHILD";"To be part of escalation as callee child";"ACTIVE "
6502;"ESCALATION_AS_CALLER_PARENT";"To be part of escalation as called parent";"ACTIVE "
6503;"ESCALATION_AS_CALLEE_PARENT";"To be part of escalation as callee parent";"ACTIVE "

Run the below query to get the above categories:

 select * from Cat where IdCat in (6500, 6501, 6502, 6503)
Applicable CAST Version
Release
Yes/No
8.3.x(tick)
8.2.x(tick)
Applicable RDBMS
RDBMS
Yes/No
Oracle Server(tick)
Microsoft SQL Server(tick)
CSS(tick)
Query for CSS

In Enlighten if you have missing Escalated links then run the below query to find the object type involved.


SELECT DISTINCT t.IdTyp ,
                t.TypDsc,
                t.TypNam
FROM            (SELECT t.IdTyp ,
                        t.TypDsc,
                        t.TypNam
                FROM    Typ t
                        JOIN
                                (SELECT DISTINCT tc.IdTyp
                                FROM             TypCat tc
                                                 JOIN
                                                                  (SELECT *
                                                                  FROM    Cat
                                                                  WHERE   CatNam LIKE 'EnlightenGraphable'
                                                                  )
                                                                  c
                                                 ON               c.IdCat = tc.IdCatParent
                                )
                                all_graphable
                        ON      t.IdTyp = all_graphable.IdTyp
                )
                t
                JOIN TypCat tc
                ON              tc.IdTyp = t.IdTyp
                LEFT JOIN
                                (SELECT *
                                FROM    Cat
                                WHERE   IdCat IN (6500,
                                                  6501,
                                                  6502,
                                                  6503)
                                )
                                c
                ON              c.IdCat = tc.IdCatParent
WHERE           (
                                t.IdTyp IN
                                ( SELECT   all_graphable.IdTyp
                                FROM      (SELECT DISTINCT tc.IdTyp
                                          FROM             TypCat tc
                                                           JOIN
                                                                            (SELECT *
                                                                            FROM    Cat
                                                                            WHERE   CatNam LIKE 'EnlightenGraphable'
                                                                            )
                                                                            c
                                                           ON               c.IdCat = tc.IdCatParent
                                          )
                                          all_graphable
                                          LEFT JOIN
                                                    ( SELECT  tc.IdTyp,
                                                             COUNT(1) count_
                                                    FROM     TypCat tc
                                                             JOIN
                                                                      (SELECT *
                                                                      FROM    Cat
                                                                      WHERE   IdCat IN (6500,
                                                                                        6501,
                                                                                        6502,
                                                                                        6503)
                                                                      )
                                                                      c
                                                             ON       c.IdCat = tc.IdCatParent
                                                    GROUP BY tc.IdTyp
                                                    )
                                                    typ_esc
                                          ON        all_graphable.IdTyp = typ_esc.IdTyp
                                WHERE     typ_esc.IdTyp           IS NULL
                                OR        typ_esc.count_               != 4
                                )
                )
ORDER BY        t.TypDsc
Query result example
 

416;".NET AddOn";"NET_EVENT_ADDON"
137626;".NET AppSetting found in configuration file";"CAST_DotNet_AppSettingType"
371;".NET Assembly";"NET_ASSEMBLY_EXT"
138103;".NET Assembly";"CAST_DotNet_Assembly"
389;".NET Class";"NET_CLASS"

Query result interpretation
 From the output of the query, check the object type if the type is not having the type needed for the link escalation then, the escalated link is excepted not to be drawn.
Query for Oracle

TBD


Query result example

Query result interpretation

Query for SQL server

TBD


Query result example


Query result interpretation

Notes/comments



Related Pages