My Oracle Support Banner

13c: Upgraded Agent Not Listed For Cleanup Post Upgrade (Doc ID 2684763.1)

Last updated on MARCH 12, 2021

Applies to:

Enterprise Manager Base Platform - Version 13.3.0.0.0 and later
Information in this document applies to any platform.

Symptoms

After upgrading agent to 13.3/13.4, trying to cleanup the agent using the Post Upgrade Agent tasks in the Agent Upgrade Console, doesn't list the agent for cleanup.

Navigation: Setup -> Manage Cloud Control -> Upgrade Agents -> Click on "Post Upgrade Agent Tasks"

Click on "Add" to select the Agent for cleanup. However, the upgraded agent doesn't show up on this list.

This document contains two queries which should be executed in the repository DB as SYSMAN.

1) The following query is executed while fetching the agent for cleanup:

SELECT distinct mt.TARGET_NAME agentname,
aru.PLATFORM_NAME platformname,
aru.PLATFORM_ID platformid,
oraclehomes.PROPERTY_VALUE oraclehome,
agentversions.PROPERTY_VALUE agentversion
FROM
MGMT_TARGETS mt ,
EM_CURRENT_AVAILABILITY agentstatus ,
MGMT$OH_HOME_INFO hostaru ,
MGMT$OH_COMPONENT ohc ,
MGMT_TARGET_PROPERTIES oraclehomes ,
MGMT_TARGET_PROPERTIES agentversions ,
MGMT_ARU_PLATFORMS aru WHERE mt.TARGET_TYPE = 'oracle_emd' AND
lower(mt.EMD_URL) LIKE '%https:%' AND
agentstatus.TARGET_GUID = mt.TARGET_GUID AND
agentstatus.CURRENT_STATUS = 1 AND
oraclehomes.TARGET_GUID = mt.TARGET_GUID AND
oraclehomes.PROPERTY_NAME = 'OracleHome' AND
oraclehomes.PROPERTY_TYPE = 'INSTANCE' AND
agentversions.TARGET_GUID = mt.TARGET_GUID AND
agentversions.PROPERTY_NAME = 'Version' AND
agentversions.PROPERTY_TYPE = 'INSTANCE' AND
mt.TARGET_GUID NOT IN (SELECT TARGET_GUID FROM EM_AUC_AGT_JOB_INFO WHERE JOB_STEP_NAME IN ('AgentUpgradeJob','SignOffUpgradeJob') AND
JOB_STEP_STATUS = 'Inprogress') AND
ohc.target_name = hostaru.target_name and
ohc.component_name='oracle.sysman.top.agent' and
mt.HOST_NAME = hostaru.HOST_NAME AND
hostaru.HOME_LOCATION != oraclehomes.PROPERTY_VALUE AND
hostaru.EMD_URL = mt.EMD_URL AND
hostaru.ARU_ID = aru.PLATFORM_ID
GROUP BY mt.TARGET_NAME , aru.PLATFORM_NAME , aru.PLATFORM_ID, oraclehomes.PROPERTY_VALUE , agentversions.PROPERTY_VALUE
HAVING COUNT(hostaru.TARGET_NAME) >= 1;

2) If the first query does NOT return the agent that is intended to be cleaned up, execute the following query:

SELECT distinct mt.TARGET_NAME agentname,
aru.PLATFORM_NAME platformname,
aru.PLATFORM_ID platformid,
oraclehomes.PROPERTY_VALUE oraclehome,
agentversions.PROPERTY_VALUE agentversion FROM
MGMT_TARGETS mt ,
EM_CURRENT_AVAILABILITY agentstatus ,
MGMT$OH_HOME_INFO hostaru ,
MGMT_TARGET_PROPERTIES oraclehomes ,
MGMT_TARGET_PROPERTIES agentversions ,
MGMT_ARU_PLATFORMS aru
WHERE mt.TARGET_TYPE = 'oracle_emd' AND
lower(mt.EMD_URL) LIKE '%https:%' AND
agentstatus.TARGET_GUID = mt.TARGET_GUID AND
agentstatus.CURRENT_STATUS = 1 AND
oraclehomes.TARGET_GUID = mt.TARGET_GUID AND
oraclehomes.PROPERTY_NAME = 'OracleHome' AND
oraclehomes.PROPERTY_TYPE = 'INSTANCE' AND
agentversions.TARGET_GUID = mt.TARGET_GUID AND
agentversions.PROPERTY_NAME = 'Version' AND
agentversions.PROPERTY_TYPE = 'INSTANCE' AND
mt.TARGET_GUID NOT IN (SELECT TARGET_GUID FROM EM_AUC_AGT_JOB_INFO WHERE JOB_STEP_NAME IN ('AgentUpgradeJob','SignOffUpgradeJob') AND
JOB_STEP_STATUS = 'Inprogress') AND
mt.HOST_NAME = hostaru.HOST_NAME AND
hostaru.target_name like 'agent%' AND
hostaru.HOME_LOCATION != oraclehomes.PROPERTY_VALUE AND
hostaru.EMD_URL = mt.EMD_URL AND
hostaru.ARU_ID = aru.PLATFORM_ID
GROUP BY mt.TARGET_NAME , aru.PLATFORM_NAME , aru.PLATFORM_ID, oraclehomes.PROPERTY_VALUE , agentversions.PROPERTY_VALUE
HAVING COUNT(hostaru.TARGET_NAME) >= 1; 

If the second query returns the agent that is not showing for cleanup, please follow the solution.

NOTE: If both the queries don't fetch the agent that is not showing for cleanup, the issue probably is different from what this document is intended to fix.

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.