Purpose (problem description)

This page handle the issue, when you find more failed than total objects for one particular quality rule.


Observed in CAST AIP
Release
Yes/No
8.3.x(tick)
Observed on RDBMS
RDBMS
Yes/No
CSS(tick)

Step by Step scenario

  1. Take a snapshot.
  2. Open CED.

Action Plan

  1. Check if your case matches with the Specific Check
  2. If your problem is not listed in the Specific Checks then Find the list of quality rules for which the total checks < failed checks
  3. For all the quality rules obtained in the above action - please contact CAST Technical Support with Relevant Inputs 
  4. For CAST Technical Support only - Check if there is a difference between scopes in Detail and Total procedures by following the page - SQL Queries - CAST Knowledge Base - Queries on metrics and diagnostics - How to run DETAIL and TOTAL procedures manually reproduce the issue and contact R&D.

Relevant input

  1. Sherlock output with all the options checked (including Allow export of source code)
  2. Screenshot of the dashboard showing the problem

Find the list of quality rules for which the total checks < failed checks


Execute the below query on the Central database

SELECT r1.metric_id, 
       dmt.metric_name, 
       dobj.object_full_name, 
       r2.metric_num_value - r1.metric_num_value AS SUCCESSFUL_OBJECTS 
FROM   dss_metric_results r1, 
       dss_metric_results r2, 
       dss_metric_types dmt, 
       dss_objects dobj 
WHERE  r1.metric_id = r2.metric_id 
       AND r1.object_id = r2.object_id 
       AND r1.metric_value_index = 1 
       AND r2.metric_value_index = 2 
       AND r2.metric_num_value < r1.metric_num_value 
       AND r1.metric_id = dmt.metric_id 
       AND dmt.metric_group = 1 
       AND r1.snapshot_id = r2.snapshot_id 
       AND r1.snapshot_id = (SELECT Max(s.snapshot_id) 
                             FROM   dss_snapshots s) 
       AND dobj.object_id = r1.object_id 

 

Result of the query -

Specific Check

  1. If the negative checks is reported for the metric "Avoid action artifacts that call packages that reference database" it can be due to the same object in the violation being counted several times.This is because the QR has a complementary value, and the option 'Multiple Value for each Object' on the metric tree is not checked resulting in the negative count. A workaround to this issue can be advised to the customer to check the corresponding option in the assessment model for this particular QR. This issue has been fixed in 7.0.8.
  2. If the negative checks is reported for the metric "Avoid unreferenced Functions and Stored Procedures" and if your are analyzing a PLSQL application, it can be due to the fact that there are objects raised as violation but without corresponding object in the package body, these objects are considered as invalid objects, this can be checked from the analysis log file (please refer to the following page for the logs location CAST Management Studio - Information - How to find logs ), the analyzer will return a warning(s) as follows:

     2017-01-30 13:29:59.389 � Warning� RESOLVE ; Job execution� Object 'PURGE_TRANSACTION_TABLES_PKG' is found as invalid

    To resolve this issue, you have to recompile the invalid schema schema objects, extract the schema again and then run analysis. For more information on how to recompile invalid objects please refer to the page CMS Snapshot Analysis - Run Analyzer - Warnings - Oracle Server PL SQL with Core CAST AIP - Object 'XX_YY_ZZ' is found as invalid

Notes/comments


Related Pages