Thursday, October 13, 2016

Manually deinstall EM12C agent

The procedure below will use the Installer to remove the agent software from a host.
Before this step you have to use the OMS 12c console to remove the monitored targets and the Agent from OMS. Alternatively this can be done with the emcli tool , but this is not the scope of the post.

ACTIONS

Login the configured oracle user on the host and check if EM agent is running:

output may be different depending your setup !!

$ ps -ef | grep emagent.nohup
oracle    4006     1  0 Aug30 ?        00:00:01 /u01/app/oracle/product/agent12c/core/12.1.0.2.0/perl/bin/perl /u01/app/oracle/product/agent12c/core/12.1.0.2.0/bin/emwd.pl agent /u01/app/oracle/product/agent12c/agent_inst/sysman/log/emagent.nohup
oracle   16962 10385  0 12:30 pts/0    00:00:00 grep emagent.nohup

Agent is running so you need to stop it.

The highlighted directory is the AGENT_HOME !!

$ /u01/app/oracle/product/agent12c/core/12.1.0.2.0/bin/emctl stop agent
......

Then you have to invoke the installer to remove the software.

$ /u01/app/oracle/product/agent12c/core/12.1.0.2.0/oui/bin/runInstaller -deinstall ORACLE_HOME=/u01/app/oracle/product/agent12c -removeallfiles

After the installer starts you have to follow a specific order to safely remove the software:

1. First remove the plugin homes
They are usually named OraHome[X] where X=1,2... , by selecting the in the installer and press remove

2. Then remove the oracle_sysman_db_....agent_Home0 (if exists)

3. Then remove the sbin12C1 home

4. Finally remove the agent12c1 home

ATTENTION : The names for the previous homes may be different in your setup

Close the installer and then remove the agent base directory to cleanup the leftovers

$ cd /u01/app/oracle/product
$ rm -fr agent12c


No comments:

Post a Comment