Page tree
Skip to end of metadata
Go to start of metadata
Purpose (problem description)

This page provides a methodology on how to reset violation status in certain cases. A screenshot of violation status before running the steps in this page is shown here:


Here is a screenshot that shows the status after running the steps

 

Observed in CAST AIP
Release
Yes/No
8.3.x(question)
8.2.x(tick)
8.1.x(question)
8.0.x(question)
Observed on RDBMS
RDBMS
Yes/No
Oracle Server(tick)
Microsoft SQL Server(tick)
CSS3(tick)
CSS2(tick)

Step by Step scenario

It is currently unclear about the steps that lead to this situation. It was noticed in a dashboard but the steps done prior to the issue were not provided.

Action Plan

Perform the below actions

  1. Check to see if this issue has occurred
    1. Run the following query on the central database

      SELECT   SNAPSHOT_ID     ,
               VIOLATION_STATUS,
               COUNT(1)
      FROM     DSS_VIOLATION_STATUSES
      GROUP BY SNAPSHOT_ID,
               VIOLATION_STATUS
      ORDER BY SNAPSHOT_ID,
               VIOLATION_STATUS;
    2. The query should normally return results such as the following:

      Query result example
      1;1;417174

      2;1;19437
      2;2;4358
      2;3;57007
      2;4;355809
      3;1;11042
      3;2;7688
      3;3;64991
      3;4;359574

    3. The results above indicate that all violations were added in snapshot 1, some were added, some deleted, some updated, and some unchanged in the other snapshots which is generally the case with CAST.

      An example of an incorrect violations status would be something like this where all violations are suddenly shown as added for a new snapshot where the objects have mostly remained unchanged:

      Query result example
      1;1;417174

      2;1;19437
      2;2;4358
      2;3;57007
      2;4;355809
      3;1;443295

      If the results from the query indicate an issue not related to the code that was analyzed for many or almost all objects analyzed, then this may indicate the problem which can be corrected with the steps below. If the case does involve not just violation statuses but issues with other analyzed objects such as added/deleted objects which then have result in added/deleted violations, this situation would not apply. For any questions or clarifications on using the steps on this page, please contact CAST Technical Support.

      If using the DSS_VIOLATION_STATUSES table on the central for any validation of this situation, note that these are the values for the violation status column:

      1=Added
      2=Deleted
      3=Updated
      4=Unchanged
  2. Make sure a recent backup of the central exists. If not, take a backup prior to performing the next steps.
  3. First obtain the snapshot_ids for the application using this page: SQL Queries - CAST Central Base - Queries on snapshots - How to get the ID and name of a snapshot for a given application
  4. Once all the snapshot_ids for the application have been obtained, then the following will need to be run on each snapshot on the central database:

    SELECT VIEWER_PRECALC_PORTF(<snapshot_id>);
    
    SELECT REMOVE_VIOLATION_STATUSES (<snapshot_id>);
    
    SELECT COMPUTE_VIOLATION_STATUSES (<prior_snapshot_id>, <snapshot_id>);
    1. No significant output will result from these queries.

      For example, if the snapshots for the application are:

      2;Snapshot1
      4;Snapshot2
      6;Snapshot3


      Then the following should be run on the central:

      SELECT VIEWER_PRECALC_PORTF(2);
      SELECT REMOVE_VIOLATION_STATUSES (2);
      SELECT COMPUTE_VIOLATION_STATUSES (-1, 2);
      SELECT VIEWER_PRECALC_PORTF(4);
      SELECT REMOVE_VIOLATION_STATUSES (4);
      SELECT COMPUTE_VIOLATION_STATUSES (2, 4);
      SELECT VIEWER_PRECALC_PORTF(6);
      SELECT REMOVE_VIOLATION_STATUSES (6);
      SELECT COMPUTE_VIOLATION_STATUSES (4, 6);

      Note that for the first snasphot for the application the prior snapshot_id to be used is -1.


  5. If the above steps do not solve your issue contact CAST Technical Support. with the following Relevant input

 

Notes/comments

Ticket #11173

Related Pages


 

 

 

  • No labels