CAST Console - How to Delete an Application from AIP Console Databases

This page will help you to delete an application completely from AIP Console

if you are unable to do the same from the GUI

or

if the application was removed from the Console GUI/ triplets deleted

and

the Delivery folder is removed but the entries still remain in the AIP Console H2 Database.

 

 

AIP Platform

Yes/No

CAST AIP 8.3 Yes 

 

AIP Console Version Yes/No
AIP Console 1.8.x  or greater Yes

 

 

Action Plan

For the application_guid below, it usually can be seen in the console URL for application actions, though you can also get it from :  AIP Console - Information - V2 - How to get an application GUID for an application AIP Console

The below queries need to be run on the AIP Node H2 Database.

Delete Application Queries

DO $$

DECLARE
application_guid_value varchar := '<app_guid>';
analysis_result_id varchar;
connection_profile_id varchar;

BEGIN
-- Get ANALYSIS_RESULT_GUID from ANALYSIS table
SELECT ANALYSIS_RESULT_GUID INTO analysis_result_id

FROM ANALYSIS

WHERE VERSION_GUID IN (SELECT GUID FROM VERSION WHERE APPLICATION_GUID = application_guid_value);

-- Get CONNECTION_PROFILE_GUID from APPLICATION table
SELECT CONNECTION_PROFILE_GUID INTO connection_profile_id


FROM APPLICATION
WHERE GUID = application_guid_value;


-- Delete from SNAPSHOT_INDICATORS

DELETE FROM SNAPSHOT_INDICATORS
WHERE SNAPSHOT_GUID IN (SELECT GUID FROM SNAPSHOT WHERE APPLICATION_GUID = application_guid_value);


-- Delete from SNAPSHOT

DELETE FROM SNAPSHOT
WHERE APPLICATION_GUID = application_guid_value;


-- Delete from ANALYSIS

DELETE FROM ANALYSIS
WHERE VERSION_GUID IN (SELECT GUID FROM VERSION WHERE APPLICATION_GUID = application_guid_value);


-- Delete from ANALYSIS_RESULT
DELETE FROM ANALYSIS_RESULT
WHERE GUID = analysis_result_id;


-- Delete from VERSION_OBJECTIVES
DELETE FROM VERSION_OBJECTIVES
WHERE VERSION_GUID IN (SELECT GUID FROM VERSION WHERE APPLICATION_GUID = application_guid_value);


-- Delete from VERSION
DELETE FROM VERSION
WHERE APPLICATION_GUID = application_guid_value;

-- Delete from EXTENSION
DELETE FROM EXTENSION
WHERE APPLICATION_GUID = application_guid_value;


-- Delete from REF_FINDER_CONFIG

DELETE FROM REF_FINDER_CONFIG
WHERE APPLICATION_GUID = application_guid_value;


-- Delete from CONFIGURATION_CHANGELOG

DELETE FROM CONFIGURATION_CHANGELOG
WHERE APPLICATION_GUID = application_guid_value;


-- Delete from APPLICATION_MAVEN_REPOSITORIES

DELETE FROM APPLICATION_MAVEN_REPOSITORIES
WHERE APPLICATION_GUID = application_guid_value;


-- Delete from APPLICATION
DELETE FROM APPLICATION
WHERE GUID = application_guid_value;


-- Delete from CONNECTION_PROFILE

DELETE FROM CONNECTION_PROFILE
WHERE GUID = connection_profile_id;

END $$;

To access your h2 DB, please follow the  steps in the document here - AIP Console - Information - How to Access Console and Node Databases   then

  1. Restart the Console and Node services for them to be in sync.
  2. If the problem you are facing does not match any case listed in this page, report your problem to CAST Technical Support and provide the below Relevant input for CAST Technical Support to reproduce the issue.

 

Ticket # 34364

 

Have more questions? Submit a request

Comments

Powered by Zendesk