SQL Queries - CAST Central Base - Queries on grades - How to get the Health Factor grades for the Snapshot of an Application

Purpose of Query

This document provides a query to get the Health Factor grades (efficiency, security, robustness, transferability, changeability) for a given Snapshot of an Application.

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 (question) 
CSS3 (tick) 
Query for CSS


SELECT O.OBJECT_NAME AS APPLICATION   ,
       S.SNAPSHOT_NAME                ,
       T.metric_name              AS HEALTH_FACTOR ,
       ROUND(R.metric_num_value,3)AS GRADE
FROM   dss_metric_results R,
       dss_metric_types T  ,
       dss_snapshots S     ,
       dss_objects O
WHERE  R.snapshot_id =S.snapshot_id
AND    R.metric_id   = T.metric_id
AND    R.snapshot_id = <SNAPSHOT_ID> -- here 2
AND    T.metric_id IN(60011,60012,60013,60014,60016)
AND    R.object_id          = O.object_id
AND    R.object_id          = <APPLICATION_ID> --here 3
AND    R.metric_value_index = 0
Query result example

"App1";"V2-COBOL-1APP-2016-MR2-11082016";"Efficiency";1.251
"App1";"V2-COBOL-1APP-2016-MR2-11082016";"Transferability";2.643
"App1";"V2-COBOL-1APP-2016-MR2-11082016";"Security";2.237
"App1";"V2-COBOL-1APP-2016-MR2-11082016";"Changeability";2.595
"App1";"V2-COBOL-1APP-2016-MR2-11082016";"Robustness";2.149

Query result interpretation

Snapshot "V2-COBOL-1 APP-2016-MR2-11082016" of Application "App1" has the following grades for the five Health Factors

  • Efficiency : 1.251
  • Tranferability : 2.643
  • Security : 2.237
  • Changeability : 2.595
  • Robustness : 2.149
Query for Oracle
SELECT O.OBJECT_NAME AS APPLICATION   ,
       S.SNAPSHOT_NAME                ,
       T.metric_name              AS HEALTH_FACTOR ,
       ROUND(R.metric_num_value,3)AS GRADE
FROM   dss_metric_results R,
       dss_metric_types T  ,
       dss_snapshots S     ,
       dss_objects O
WHERE  R.snapshot_id =S.snapshot_id
AND    R.metric_id   = T.metric_id
AND    R.snapshot_id = <SNAPSHOT_ID> -- here 98
AND    T.metric_id IN(60011,60012,60013,60014,60016)
AND    R.object_id          = O.object_id
AND    R.object_id          = <APPLICATION_ID> -- here 468616
AND    R.metric_value_index = 0
Query result example

APPLICATION SNAPSHOT_NAME HEALTH_FACTOR GRADE
------------------- --------------------------------------- ------------------------------ -----------
App2 App2 01/12/2016 10:50:50 Transferability 2,893
App2 App2 01/12/2016 10:50:50 Changeability 2,341
App2 App2 01/12/2016 10:50:50 Robustness 2,487
App2 App2 01/12/2016 10:50:50 Efficiency 2,308
App2 App2 01/12/2016 10:50:50 Security 2,2

5 record(s) selected [Fetch MetaData: 0/ms] [Fetch Data: 1/ms]

[Executed: 01/02/17 08:57:30 GMT ] [Execution: 7723/ms]

Query result interpretation

Snapshot "App2 01/12/2016 10:50:50" of Application "App2" has the following grades for the five Health Factors

  • Transferability : 2.893
  • Changeability : 2.341
  • Robustness : 2.487
  • Efficiency : 2.308
  • Security : 2.2
Notes/comments

Related Pages