SQL Queries - CAST Central Base - Queries on Metrics - How to detect when the violation has been added into the Action Plan
Purpose of Query
The query shows when the violation has been added into the Action Plan
Applicable CAST Version
| Release | Yes/No |
|---|---|
| 8.3.x | ✅ |
| 8.2.x | ✅ |
Applicable RDBMS
| RDBMS | Yes/No |
|---|---|
| Oracle Server | ✅ |
| Microsoft SQL Server | ✅ |
| CSS3 | ✅ |
| CSS2 | ✅ |
Query for CSS
SELECT ap.First_snapshot_date,
COUNT(1)
FROM VIEWER_ACTION_PLANS ap,
DSS_OBJECTS visible ,
DSS_SNAPSHOTS s
WHERE ap.OBJECT_ID + 0 = visible.OBJECT_ID
AND s.FUNCTIONAL_DATE BETWEEN ap.FIRST_SNAPSHOT_DATE AND ap.LAST_SNAPSHOT_DATE
AND s.SNAPSHOT_ID = <snapshot_id>
AND EXISTS
(SELECT 1
FROM c735_2592_asd.DSS_METRIC_RESULTS dmr,
c735_2592_asd.DSS_METRIC_TYPE_TREES dmtt
WHERE dmtt.METRIC_PARENT_ID = ap.METRIC_ID
AND dmtt.METRIC_ID = dmr.METRIC_ID
AND dmr.OBJECT_ID = ap.OBJECT_ID
AND dmr.SNAPSHOT_ID = <snapshot_id>
)
GROUP BY ap.First_snapshot_date
ORDER BY ap.First_snapshot_date
Query for Oracle
Same as that for CSS
Query for SQL server
Same as that for CSS
Notes/comments
Query result example
First_snapshot_date;count
‘2013-06-30 00:00:00’;2
‘2014-12-03 00:00:00’;186
Related Pages