target - ol6-112-rac1
agent home - /u01/app/oracle/agent_13c/agent_13.1.0.0.0
oms - oel6-rac01
oms home - /u01/app/oracle/middleware
on monitored target we can see that agent is aleady installed and host being moniored by OEM.
[oracle@ol6-112-rac1 install]$ /u01/app/oracle/agent_13c/agent_13.1.0.0.0/bin/emctl status agent
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 13.1.0.0.0
OMS Version : 13.1.0.0.0
Protocol Version : 12.1.0.1.0
Agent Home : /u01/app/oracle/agent_13c/agent_inst
Agent Log Directory : /u01/app/oracle/agent_13c/agent_inst/sysman/log
Agent Binaries : /u01/app/oracle/agent_13c/agent_13.1.0.0.0
Core JAR Location : /u01/app/oracle/agent_13c/agent_13.1.0.0.0/jlib
Agent Process ID : 3759
Parent Process ID : 3587
Agent URL : https://ol6-112-rac1.localdomain:3872/emd/main/
Local Agent URL in NAT : https://ol6-112-rac1.localdomain:3872/emd/main/
Repository URL : https://oel6-rac01.localdomain:4904/empbs/upload
Started at : 2020-12-21 10:25:03
Started by user : oracle
Operating System : Linux version 4.1.12-124.39.2.el6uek.x86_64 (amd64)
Number of Targets : 14
Last Reload : (none)
Last successful upload : 2020-12-21 12:30:33
Last attempted upload : 2020-12-21 12:30:33
Total Megabytes of XML files uploaded so far : 0.35
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0
Available disk space on upload filesystem : 46.60%
Collection Status : Collections enabled
Heartbeat Status : Ok
Last attempted heartbeat to OMS : 2020-12-21 12:31:53
Last successful heartbeat to OMS : 2020-12-21 12:31:53
Next scheduled heartbeat to OMS : 2020-12-21 12:32:53
---------------------------------------------------------------
Agent is Running and Ready
First deinstall agent Using the AgentDeinstall.pl Script
Invoke the AgentDeinstall.pl script to delete the standalone Management Agent and also remove the agent base directory.
$<AGENT_HOME>/perl/bin/perl
<AGENT_HOME>/sysman/install/AgentDeinstall.pl -agentHome <AGENT_HOME>
[oracle@ol6-112-rac2 trace]$ /u01/app/oracle/agent_13c/agent_13.1.0.0.0/perl/bin/perl /u01/app/oracle/agent_13c/agent_13.1.0.0.0/sysman/install/AgentDeinstall.pl -agentHome /u01/app/oracle/agent_13c/agent_13.1.0.0.0
Agent Oracle Home: /u01/app/oracle/agent_13c/agent_13.1.0.0.0
agentHome = /u01/app/oracle/agent_13c/agent_13.1.0.0.0
value of skip flag is false
NOTE: The agent base directory: /u01/app/oracle/agent_13c will be removed after successful deinstallation of agent home.
The command is /u01/app/oracle/agent_13c/agent_13.1.0.0.0/oracle_common/jdk/jre/bin/java -classpath /u01/app/oracle/agent_13c/agent_13.1.0.0.0/oui/modules/OraInstaller.jar:/u01/app/oracle/agent_13c/agent_13.1.0.0.0/oui/modules/emCfg.jar:/u01/app/oracle/agent_13c/agent_13.1.0.0.0/jlib/agentInstaller.jar oracle.sysman.agent.installer.AgentDeinstallation /u01/app/oracle/agent_13c/agent_13.1.0.0.0 /u01/app/oracle/agent_13c /u01/app/oracle/agent_13c/agent_inst
Dec 21, 2020 12:51:59 PM oracle.sysman.agent.installer.AgentInstaller$StreamGobbler run
INFO: Oracle Enterprise Manager Cloud Control 13c Release 1
Dec 21, 2020 12:51:59 PM oracle.sysman.agent.installer.AgentInstaller$StreamGobbler run
INFO: Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
Dec 21, 2020 12:52:11 PM oracle.sysman.agent.installer.AgentInstaller$StreamGobbler run
INFO: Stopping agent ... stopped.
Dec 21, 2020 12:52:11 PM oracle.sysman.agent.installer.AgentInstaller$StreamGobbler run
INFO: Plugin homes:
Dec 21, 2020 12:52:11 PM oracle.sysman.agent.installer.AgentInstaller$StreamGobbler run
INFO: Plugin homes:
Dec 21, 2020 12:52:12 PM oracle.sysman.agent.installer.AgentDeinstallation main
INFO: Creating directory /u01/app/oracle/agent_13c/agent_13.1.0.0.0/install/tmp completed successfully.
Dec 21, 2020 12:52:12 PM oracle.sysman.agent.installer.AgentDeinstallation main
INFO: File /etc/oragchomelist exists.
Dec 21, 2020 12:52:12 PM oracle.sysman.agent.installer.AgentDeinstallation main
INFO: File /etc/oragchomelist is writable.
Dec 21, 2020 12:52:12 PM oracle.sysman.agent.installer.AgentDeinstallation main
INFO: Index :-1 for line : /u01/app/oracle/agent/agent_13.1.0.0.0:/u01/app/oracle/agent/agent_inst
Dec 21, 2020 12:52:12 PM oracle.sysman.agent.installer.AgentDeinstallation main
INFO: Index :-1 for line :
Dec 21, 2020 12:52:12 PM oracle.sysman.agent.installer.AgentDeinstallation main
INFO: Index :0 for line : /u01/app/oracle/agent_13c/agent_13.1.0.0.0:/u01/app/oracle/agent_13c/agent_inst
Dec 21, 2020 12:52:12 PM oracle.sysman.agent.installer.AgentDeinstallation main
INFO: Overwriting the contents since oracle home:/u01/app/oracle/agent_13c/agent_13.1.0.0.0 entry already exists.
The output is Agent Deinstall:agent deintall has been started
Executing status :0
Agent service stopped successfully.
and the exit code is 0
Agent deconfiguration completed successfully. 0
DetachHome Command executed:/u01/app/oracle/agent_13c/agent_13.1.0.0.0/oui/bin/detachHome.sh -silent ORACLE_HOME=/u01/app/oracle/agent_13c/agent_13.1.0.0.0
Launcher log file is /tmp/OraInstall2020-12-21_12-52-17PM/launcher2020-12-21_12-52-17PM.log.
Starting Oracle Universal Installer
Checking swap space: must be greater than 500 MB. Actual 9127 MB Passed
Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required)
'detachHome' was successful.
Logs successfully copied to /u01/app/oraInventory/logs.
Removing other files ...
NOTE: The targets monitored by this Management Agent will not be deleted in the Enterprise Manager Repository by this deinstall script. Make sure to delete the targets manually from the Cloud Control Console for a successful deinstallation.
now Manually remove the targets, which were being monitored by the standalone Management Agent you deinstalled, from the Enterprise Manager
on oms
emcli delete_target -name="<host_name>:<agent_port>" -type="oracle_emd" -delete_monitored_targets
[oracle@oel6-rac01 ~]$ env|grep OMS
OMS_HOME=/u01/app/oracle/middleware
[oracle@oel6-rac01 bin]$ $OMS_HOME/bin/emcli login -username=sysman -password=system123
Login successful
[oracle@oel6-rac01 bin]$ $OMS_HOME/bin/emcli sync
Synchronized successfully
[oracle@oel6-rac01 bin]$ $OMS_HOME/bin/emcli delete_target -name="ol6-112-rac2.localdomain:3872" -type="oracle_emd" -delete_monitored_targets
Target "ol6-112-rac2.localdomain:3872:oracle_emd" deleted successfully
The above step is risky. If you are uninstalling the older version of management agent, it deletes the complete agent home directory which also contains new version of management agent.
LikeLike
Ideally at a time you should have one version of agent . You should install any version agent after uninstalling the first one.
LikeLike