This page provides the solution to the problem of ghost projects still visible on the dashboard for Shell analysis even though those shell files have been removed from the source code.
Please refer to the below screenshot for more clarity:
Release | Yes/No |
---|---|
8.3.x |
RDBMS | Yes/No |
---|---|
CSS |
Below is the step-by-step scenario leading to the problem:
- Migrate from 7.0.x to 7.3 or later.
Add version and package the source
Run analysis
Run snapshot
The impact of the problem on the dashboard is: The objects which are not part of the source code in current run are also visible on the dashboard.
This problem occurred because there were ghost objects present in the KB associated with ghost projects that were part of the 7.0.x analysis.
To fix the problem, proceed as follows:
In order to remove the ghost objects and projects, there are queries that are to be executed on the Knowledge base to know what objects/projects are ghost entries.
select * from objects where lower(idnam) like '%<name of the object>%' -- alarmcount.sh in this case
In this scenario:
select * from objects where lower(idnam) like '%alarmcount.sh%'
Query result example423728;'S:\Sources\BDMAP\Analyzed\admin\cron\alarmcount.sh';'S:\Sources\BDMAP\Analyzed\admin\cron\alarmcount.sh';1000007- Now, get the object type associated with it i.e. the value in objtyp from the above query. Then run the below:
select * from keys where objtyp = <objtyp from above query> -- 1000007 in this scenario order by keynam
Query result example420273;'admin';'';'XXXXXX';-1;1000003;0;1000003;'???';'1970-01-01 00:00:00';'';0;''
Get the list of all the projects that are ghost
select * from objpro op join keys k on k.idkey = op.idpro and op.idobj = 420273 -- idkey from the query above join typ t on t.idtyp = k.objtyp
Query result example420273;423729;0;423729;'Shell_SHELL';'';'XXXXXX';-1;1016003;0;1016003;'???';'1970-01-01 00:00:00';'';0;'';1016003;'SHELLProject';'SHELL Project';'ACTIVE '
420273;423730;0;423730;'Shell';'';'XXXXXX';-1;1000001;0;1000001;'???';'1970-01-01 00:00:00';'';0;'';1000001;'universalProject';'Universal Project';'ACTIVE '
420273;422810;0;422810;'WSDL_SOA_Assistant';'';'XXXXXX';-1;10003003;0;10003003;'???';'1970-01-01 00:00:00';'';0;'';10003003;'SOA_AssistantProject';'SOA_Assistant Project';'ACTIVE '
420273;422811;0;422811;'WSDL';'';'XXXXXX';-1;1000001;0;1000001;'???';'1970-01-01 00:00:00';'';0;'';1000001;'universalProject';'Universal Project';'ACTIVE '
420273;1128952;0;1128952;'WSDL_13995';'';'XXXXXX';-1;1000001;0;1000001;'???';'1970-01-01 00:00:00';'';0;'';1000001;'universalProject';'Universal Project';'ACTIVE '
420273;1128951;0;1128951;'WSDL_13995_SOA_Assistant';'';'XXXXXX';-1;10003003;0;10003003;'???';'1970-01-01 00:00:00';'';0;'';10003003;'SOA_AssistantProject';'SOA_Assistant Project';'ACTIVE 'Now, Get the list of all the projects that are UA since the issue here is with the SHELL Project and Objects.
select k.* from Keys k join TypCat tc on tc.IdTyp = k.ObjTyp and tc.IdCatParent = 1000011 /* 'UAProject' */ left join AnaPro apm on apm.IdPro = k.idkey where apm.IdPro is null;
Query result example423729;'Shell_SHELL';'';'XXXXXX';-1;1016003;0;1016003;'???';'1970-01-01 00:00:00';'';0;''
422810;'WSDL_SOA_Assistant';'';'XXXXXX';-1;10003003;0;10003003;'???';'1970-01-01 00:00:00';'';0;''So, here two additional Project_Delete to call:
select Project_Delete(423729);
select Project_Delete(422810);Run the below function to perform the cleanup of ghost projects
select Project_Delete(423729); -- ID from the above query select Project_Delete(422810); -- ID from the above query
- After running the clean up queries for the projects, run snapshot skipping analysis for the changes to get affected.
- If the above steps do not resolve the issue then check if the objects are part of the module - SQL Queries - CAST Knowledge Base - Queries on Module - Module content and properties, if yes then refer to the following page for further investigation - CMS Application - Modules - Incorrect module content - Unexpected objects