CMS Snapshot Analysis - Run Analyzer - Wrong objects
This page handles the issue of wrong object creation after analyzing an application. For information on objects created by the CAST AIP analyzers, refer to the relevant pages for each technology in the official documentation:
|Microsoft SQL Server
- Analyze a project
- Open Enlighten
- Validate the created objects in Enlighten Graphical view
Proceed with the below steps
- Open Enlighten and identify the wrong object as described in Enlighten - Information - How to identify and open an object in Enlighten Graphical View
- Validate if object is EXPECTED or NOT EXPECTED, according the the expected objects created by the CAST AIP analyzers as described in CMS Snapshot Analysis - Run Analyzer - Information - How to validate expected objects and links in CAST AIP documentation
- If you have confirmed that the object should be created, this is an expected product behavior.
- If the object should not be created or if you cannot confirm the expectation, proceed to next step
- Validate object expectation from the source code. You can locate the object source code :
- Either from ENL - Launching the Code Viewer
- Either from the project source file that you can retrieve from object properties
- For certain technologies (like Mainframe) an Unknown Program object is created when the source code contains a call to a program that is unresolved (not present in the source code). In this case the source code file that should be checked is the one where the call is declared. You can retrieve this file by opening the linked object to the Unknown Program and looking at the source code of the link
- If you find an exact reference to the object name, then validate the object type in regard to the syntax and reserved keywords of the used technology
- The object is EXPECTED when it corresponds to the expected object type
- The object is NOT EXPECTED when it does not correspond to the expected object type
- If you do not find an exact reference to the object name then the object is NOT EXPECTED except in some special cases where object names are created as a combination of references in the source code. This is the case for some instances of AngularJS Extension objects or Jquery Extension objects.
- Check if wrong objects are a result of the existence of ghost projects or ghost objects.
- Run the queries and remediation that can be found in SQL Queries - CAST Knowledge Base - Queries on objects - Identify and clean up all the ghost objects and ghost projects in your knowledge base.
- Check if wrong objects refer to source code that is not present in the current version. These objects are ghost objects that are not detected by the queries in previous step, because they are still attached to projects which themselves are attached to existing analysis units. These projects should be detected and removed. Check in your deployment folder if the object's source code file exists (you can retrieve it from ENL - Viewing properties)
- If it exists proceed to next step
- If it does not exist then locate and delete the project from where the objects belongs:
Run the following query in local database
select o.idobj, o.FullName from ObjFulNam o
where o.FullName = ‘%<Object_source_code_fullpath>%’
Above query may return several rows, you can use the idobj for anyone of them
Use any of the above retrieved idobj and run query:
select idpro from ObjPro op where op.IdObj = <idobj>
- Take a backup of the local database
Delete project by running query, using the retrieved idpro
- Rerun analysis/snapshot
Check if wrong objects are the result of the previous snapshot and in the new delivery the source code has been removed via DMT. But the analysis unit is still there and new snapshot has been taken and we could still see the objects in KB from last delivered source code. This issue has been seen in UA analyzer but it can come for another analyzer as well.
Run the query in the cdt_objects table to identify the wrong objects coming from the source code path inside the deploy folder.
Keep an empty file in the root of that path if it is SQL file keep empty SQL file etc.
Run the analysis
The objects will be removed from the KB and hence no more objects are seen on the dashboard post snapshot.
This issue is under investigation and has to be fixed in a future version, we will update the doc once this issue is fixed.
- Check if your case matches one of the known cases with solution, described in:
- If you do not find the information you are looking for or solution for your problem, on this page, contact CAST Technical Support, with the Relevant input
- Sherlock export with the following options: Export Cast Database(Management and Local databases), Export Logs, Export Configuration files, Source code