©2015 -
Oracle 12c Enterprise Manager Cloud Control Installation -
Sometimes, you are faced with a situation where you require a management agent to be re-
This is an expounded version of agent de-
PREP TASKS: Delete Agent Targets in OEM
Before you deinstall a Management Agent, you need to delete agent targets in the Oracle EM Cloud Control 12c.
1. Shut down the EM agent in the target host.
$<AGENT_HOME>/bin/emctl stop agent
2. Login to EM from the Oracle Management Server (OMS).
oraem@s11node1:/oem/app/oraem$ emcli login -
Login successful
oraem@s11node1:/oem/app/oraem$
3. Synchronize emcli with the OMS
oraem@s11node1:/oem/app/oraem$ emcli sync
Synchronized successfully
oraem@s11node1:/oem/app/oraem$
4. List all the targets
oraem@s11node1:/oem/app/oraem$ emcli get_targets
Status Status Target Type Target Name
ID
4 Agent Unreachab host pacific.vlabs.net
le
1 Up host oem-
1 Up j2ee_application /EMGC_GCDomain/GCDomain/EMGC_OMS1/e
mgc
1 Up j2ee_application /EMGC_GCDomain/GCDomain/EMGC_OMS1/O
CMRepeater
1 Up j2ee_application /EMGC_GCDomain/GCDomain/EMGC_ADMINS
ERVER/FMW Welcome Page Application(
11.1.0.0.0)
1 Up j2ee_application /EMGC_GCDomain/GCDomain/EMGC_OMS1/e
mpbs
-
ERVER/mds-
-
ERVER/mds-
1 Up oracle_apache /EMGC_GCDomain/instance1/ohs1
1 Up oracle_beacon EM Management Beacon
1 Up oracle_em_service EM Console Service
1 Up oracle_em_service EM Jobs Service
1 Up oracle_emd oem-
4 Agent Unreachab oracle_emd pacific.vlabs.net:3872
le
1 Up oracle_emrep Management Services and Repository
1 Up oracle_emsvrs_sys Management_Servers
-
-
-
s.net_5532
-
-
-
-
4 Agent Unreachab oracle_listener OMRDB11_pacific.vlabs.net
le
1 Up oracle_oms oem-
ervice
1 Up oracle_oms_console oem-
ervice_CONSOLE
1 Up oracle_oms_pbs oem-
ervice_PBS
-
1 Up weblogic_j2eeserver /EMGC_GCDomain/GCDomain/EMGC_OMS1
1 Up weblogic_j2eeserver /EMGC_GCDomain/GCDomain/EMGC_ADMINS
ERVER
oraem@s11node1:/oem/app/oraem$
5. Delete an agent and its targets
syntax:
emcli delete_target -
oraem@s11node1:/oem/app/oraem$ emcli delete_target -
Target "pacific.vlabs.net:3872:oracle_emd" deleted successfully
oraem@s11node1:/oem/app/oraem$
6. List all the targets to confirm the agent and its targets have been deleted.
oraem@s11node1:/oem/app/oraem$ emcli get_targets
Status Status Target Type Target Name
ID
1 Up host oem-
1 Up j2ee_application /EMGC_GCDomain/GCDomain/EMGC_OMS1/e
mgc
1 Up j2ee_application /EMGC_GCDomain/GCDomain/EMGC_OMS1/O
CMRepeater
1 Up j2ee_application /EMGC_GCDomain/GCDomain/EMGC_ADMINS
ERVER/FMW Welcome Page Application(
11.1.0.0.0)
1 Up j2ee_application /EMGC_GCDomain/GCDomain/EMGC_OMS1/e
mpbs
-
ERVER/mds-
-
ERVER/mds-
1 Up oracle_apache /EMGC_GCDomain/instance1/ohs1
1 Up oracle_beacon EM Management Beacon
1 Up oracle_em_service EM Console Service
1 Up oracle_em_service EM Jobs Service
1 Up oracle_emd oem-
1 Up oracle_emrep Management Services and Repository
1 Up oracle_emsvrs_sys Management_Servers
-
s.net_5532
-
-
-
-
1 Up oracle_oms oem-
ervice
1 Up oracle_oms_console oem-
ervice_CONSOLE
1 Up oracle_oms_pbs oem-
ervice_PBS
-
1 Up weblogic_j2eeserver /EMGC_GCDomain/GCDomain/EMGC_OMS1
1 Up weblogic_j2eeserver /EMGC_GCDomain/GCDomain/EMGC_ADMINS
ERVER
oraem@s11node1:/oem/app/oraem$
7. Logout EMCLI
oraem@s11node1:/oem/app/oraem$ emcli logout
Logout successful
oraem@s11node1:/oem/app/oraem$
DEINSTALL AGENT USING SCRIPT: AgentDeinstall.pl
As a pre-
You may refer to the Understanding Agent Directories section to get the idea of what the value is.
WARNING! Taken from the Oracle Doc -
By default, the AgentDeinstall.pl script deinstalls the Management Agent, removes the dependent entries from the inventory, and removes the entire agent base directory. If you want to retain the agent base directory for some reason, then pass the -
1. Invoke the AgentDeinstall.pl script:
Syntax:
$<AGENT_BASE>/core/12.1.0.4.0/perl/bin/perl <AGENT_BASE>/core/12.1.0.4.0/sysman/install/AgentDeinstall.pl -
Example:
My Agent Home:
export MY_AGENT_HOME=/dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0
$MY_AGENT_HOME/perl/bin/perl $MY_AGENT_HOME/sysman/install/AgentDeinstall.pl -
pacific:oradb> $MY_AGENT_HOME/perl/bin/perl $MY_AGENT_HOME/sysman/install/AgentDeinstall.pl -
Agent Oracle Home: /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0
agentHome = /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0
NOTE: The agent base directory: /dsk0/orabin/11gR2/agent12c will be removed after successful deinstallation of agent home.
DetachHome Command executed:/dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/oui/bin/runInstaller -
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 16941 MB Passed
The inventory pointer is located at /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/oraInst.loc
'DetachHome' was successful.
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 16939 MB Passed
The inventory pointer is located at /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/oraInst.loc
The Oracle home '/dsk0/orabin/11gR2/agent12c/sbin' could not be updated as it does not exist.
Deinstall Command executed:/dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/oui/bin/runInstaller -
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 16939 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-
Copyright (C) 1999, 2014, Oracle. All rights reserved.
Starting deinstall
Deinstall in progress (Thursday, July 2, 2015 2:56:50 PM CDT)
Configuration assistant "Agent Deinstall Assistant" succeeded
............................................................... 100% Done.
Deinstall successful
End of install phases.(Thursday, July 2, 2015 2:58:10 PM CDT)
End of deinstallations
Please check '/dsk0/orabin/oraInventory/logs/silentInstall2015-
Can't locate Carp.pm in @INC (@INC contains: /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/perl/lib/5.10.0/i86pc-
pacific:oradb>
2. If you haven't done before hand, manually remove the targets which were being monitored by the Management Agent you deinstalled from the Enterprise Manager Cloud Control console. Refer to the Prep Tasks discussed previously for details.
3. Manually delete the agent base directory.
As noted from the output of the AgenDeinstall.pl script, the AGENT BASE is /dsk0/orabin/11gR2/agent12c.
We can then remove that one if we don't need to re-
rm -