AIP Console - Information - V2 - How to Delete an Application from AIP Console Databases
Purpose
This page will help you to delete an application completely from AIP Console version 2.
This solution can be applied,
- If you are unable to delete an application completely from the GUI or
- if the application was removed from the Console GUI or if the triplets are deleted with the Delivery folder removed but with the entries remaining in the AIP Console Postgres database > AIP_NODE schema.
Applicable Platform
| AIP Platform | Yes/No |
|---|---|
| CAST AIP 8.3 | ✅ |
| AIP Console Version | Yes/No |
|---|---|
| AIP Console 2.x or greater | ✅ |
Action Plan
For the application_guid below, it usually can be seen in the console URL for application actions.
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 Postgres Database > AIP_NODE schema.
DO $$
DECLARE
application_guid_value varchar := ‘<application_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 $$;
2. Restart the Console and Node services for them to be in sync.
3. If the problem you are facing does not match any case listed in this page, report your problem to [CAST Technical Support](https://help.castsoftware.com/hc/en-us/requests/new) and provide the below [Relevant input](/export-v2/tg/technical-guides/technical-guides-by-cast-aip-component/cast-aip-console/) for CAST Technical Support to *reproduce the issue..*
**Notes/comments**
Ticket # 42682, 45325
**Related Pages**
*[AIP Console - Information - How to Delete an Application from AIP Console Databases](/export-v2/tg/information-guides/information-guides-by-cast-aip-component/aip-console/aip-console-information-how-to-delete-an-application-from-aip-console-databases/)*