Skip Headers
Oracle® Enterprise Manager Cloud Control Advanced Installation and Configuration Guide
12c Release 4 (12.1.0.4)

E24089-34
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

22 Deinstalling Oracle Management Agents

This chapter describes how you can deinstall Oracle Management Agent (Management Agent). In particular, this chapter covers the following:

Note:

On a cluster, ensure that you deinstall the Management Agents from all the nodes one by one. To do so, follow the instructions outlined in this chapter.

Note:

When you deinstall an old Management Agent and install a new Management Agent on the same host, you will lose all historical target information from the Management Repository.

To avoid losing all historical target information, first install the new Management Agent, then run the emcli relocate targets command to hand over the targets from the old Management Agent to the new Management Agent, and then deinstall the old Management Agent.

For information about the emcli relocate targets command, see the Oracle Enterprise Manager Cloud Control Command Line Interface Guide.

22.1 Deinstalling Oracle Management Agents

This section covers the following:

22.1.1 Prerequisites

Before you deinstall a Management Agent, do the following:

  1. Shut down the Management Agent by running the following command from its home. If it is already shut down, then skip this step.

    $<AGENT_HOME>/bin/emctl stop agent

  2. Wait for the Management Agent to go to the down or unreachable state in the Cloud Control console. If it is already in the down or unreachable state, then go to the next step.

  3. Delete the Management Agent targets and their monitored targets (from any host where EM CLI is installed):

    emcli delete_target

    -name="example.com:1836"

    -type="oracle_emd"

    -delete_monitored_targets

    Note:

    For information on EM CLI and instructions to set it up, see Oracle Enterprise Manager Command Line Interface Guide.

22.1.2 Deinstallation Procedure

This section describes the following:

22.1.2.1 (Most Recommended) Deinstalling Oracle Management Agents Using the AgentDeinstall.pl Script

The most recommended and the easiest way of deinstalling Management Agents is to use the AgentDeinstall.pl script. The script orchestrates the deinstallation of not only the Management Agent home but also the dependent homes such as the plug-in homes and the sbin home. This saves time and effort as you do not have to manually and explicitly select each component in a specific order to deinstall them, unlike the other deinstallation methods described in this chapter. The script automates the entire deinstallation operation.

To deinstall a Management Agent using the AgentDeinstall.pl script, follow these steps:

WARNING:

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 -skipRemoval argument to the script. This argument ensures that only the Management Agent home from agent base directory is removed, but the agent base directory and the rest of the subdirectories are retained.

  1. Invoke the AgentDeinstall.pl script:

    $<AGENT_HOME>/perl/bin/perl <AGENT_HOME>/sysman/install/AgentDeinstall.pl -agentHome <AGENT_HOME>

    For example, if you want to deinstall the Management Agent and also remove the agent base directory, then run the following command:

    $/u01/app/Oracle/core/12.1.0.4.0/perl/bin/perl /u01/app/Oracle/core/12.1.0.4.0/sysman/install/AgentDeinstall.pl -agentHome /u01/app/Oracle/core/12.1.0.4.0/

    For example, if you want to deinstall the Management Agent but NOT remove the agent base directory, then run the following command:

    $/u01/app/Oracle/core/12.1.0.4.0/perl/bin/perl /u01/app/Oracle/core/12.1.0.4.0/sysman/install/AgentDeinstall.pl -agentHome /u01/app/Oracle/core/12.1.0.4.0/ -skipRemoval

  2. Manually remove the targets, which were being monitored by the Management Agent you deinstalled, from the Enterprise Manager Cloud Control console.

  3. Manually delete the agent base directory. For information on agent base directory, see Section 2.3.5.

    For UNIX platforms:

    rm -rf <absolute_path_to_install_base_dir>

    For Microsoft Windows platforms:

    del <absolute_path_to_install_base_dir>

Note:

During the Management Agent deinstall process, the Management Agent service is not removed automatically. You must remove it manually after the deinstall, by running the following command:

sc delete <service_name>

22.1.2.2 Deinstalling Oracle Management Agents Using the Installation Wizard in Graphical Mode

To deinstall a Management Agent using the Enterprise Manager Cloud Control Wizard in graphical mode, follow these steps:

Note:

Deinstall the components in the order described in this procedure. Otherwise, the installation wizard displays an error.
  1. Invoke the installer from the Management Agent home by running the following command:

    $<AGENT_HOME>/oui/bin/runInstaller -deinstall ORACLE_HOME=<absolute_path_to_agent_home> [-removeallfiles] [-invPtrLoc <absolute_path_to_oraInst.loc>]

    For example,

    /u01/app/oracle/agent/core/12.1.0.4.0/oui/bin/runInstaller -deinstall ORACLE_HOME=/u01/app/oracle/agent/core/12.1.0.4.0/ -removeallfiles

    Note:

    • You can invoke the installer even from the directory where you downloaded the software. For example, <software_location>/.

    • When you run runInstaller -help, you will see the option -nowarningonremovefiles listed. This option is currently not supported and has no effect even if you use it.

    • The -invPtrLoc parameter is supported only on UNIX platforms, and not on Microsoft Windows platforms.

    • For Microsoft Windows, invoke the setup.exe file.

    Note:

    When you invoke runInstaller or setup.exe, if the Enterprise Manager Cloud Control Installation Wizard does not appear, then it is possible that you do not have access to the /stage directory.

    There is a classpath variable that the installation wizard computes for OPatch as ../stage/Components/, and when the TEMP variable is set to /tmp, the installation wizard tries to look for the opatch JAR file in the /tmp/../stage directory, which is equivalent to /stage. However, if you do not have the permission on /stage, then the installation wizard can hang. Under such circumstances, verify if you have access to the /stage directory. If you do not have access to it, then set the TEMP variable to a location where the install user has access to, and then relaunch the installation wizard.

  2. In the installation wizard, click Installed Products.

  3. On the Inventory screen, select the plug-in homes under the required Management Agent home, then click Remove.

  4. On the Inventory screen, select the sbin home, and click Remove.

  5. On the Inventory screen, select the Management Agent, and click Remove.

  6. Manually delete the agent base directory. For information on installation base directory, see Section 2.3.5.

    For UNIX platforms:

    rm -rf <absolute_path_to_agent_base_dir>

    For Microsoft Windows platforms:

    del <absolute_path_to_agent_base_dir>

22.1.2.3 Deinstalling Oracle Management Agent Using the Installation Wizard in Silent Mode

To deinstall a Management Agent using the Enterprise Manager Cloud Control Installation Wizard in silent mode, follow these steps:

Note:

Deinstall the components in the order described in this procedure. Otherwise, the installation wizard displays an error.
  1. Deinstall the plug-in homes:

    $<AGENT_HOME>/oui/bin/runInstaller -deinstall -silent "REMOVE_HOMES={absolute_path_to_plug-in_home}" ORACLE_HOME=<absolute_path_to_agent_home> [-removeallfiles] [-invPtrLoc <absolute_path_to_oraInst.loc>]

    Note:

    • When you run runInstaller -help, you will see the option -nowarningonremovefiles listed. This option is currently not supported and has no effect even if you use it.

    • On Microsoft Windows, invoke the setup.exe file.

    • The -invPtrLoc parameter is supported only on UNIX platforms, and not on Microsoft Windows platforms.

    • To deinstall multiple plug-ins, enter the plug-in homes separated by a comma.

    For example,

    /home/oracle/agent/core/12.1.0.4.0/oui/bin/runInstaller -deinstall -silent "REMOVE_HOMES={/home/oracle/agent/plugins/oracle.sysman.emas.oms.plugin_12.1.0.2.0,/home/oracle/agent/plugins/oracle.sysman.emct.oms.plugin_12.1.0.2.0}" ORACLE_HOME=/home/oracle/agent/core/12.1.0.4.0 -removeAllFiles -invPtrLoc /home/oracle/agent/core/12.1.0.4.0/oraInst.loc

  2. Deinstall the sbin home:

    $<AGENT_HOME>/oui/bin/runInstaller -deinstall -silent "REMOVE_HOMES={absolute_path_to_sbin_directory}" ORACLE_HOME=<absolute_path_to_agent_home> [-removeAllFiles] [-invPtrLoc <absolute_path_to_oraInst.loc>]

    For example,

    /home/oracle/agent/core/12.1.0.4.0/oui/bin/runInstaller -deinstall -silent "REMOVE_HOMES={/home/oracle/agent/sbin}" ORACLE_HOME=/home/oracle/agent/core/12.1.0.4.0 -removeAllFiles -invPtrLoc /home/oracle/agent/core/12.1.0.4.0/oraInst.loc

  3. Deinstall the Management Agent:

    $<AGENT_HOME>/oui/bin/runInstaller -deinstall -silent "REMOVE_HOMES={absolute_path_to_agent_oracle_home}" ORACLE_HOME=<absolute_path_to_agent_home> -removeAllFiles -invPtrLoc <absolute_path_to_oraInst.loc>

    For example,

    /home/oracle/agent/core/12.1.0.4.0/oui/bin/runInstaller -deinstall -silent "REMOVE_HOMES={/home/oracle/agent/core/12.1.0.4.0}" ORACLE_HOME=/home/oracle/agent/core/12.1.0.4.0 -removeAllFiles -invPtrLoc /home/oracle/agent/core/12.1.0.4.0/oraInst.loc

  4. Manually delete the agent base directory. For information on agent base directory, see Section 2.3.5.

    For UNIX platforms:

    rm -rf <absolute_path_to_install_base_dir>

    For Microsoft Windows platforms:

    del <absolute_path_to_install_base_dir>

22.1.2.4 Deinstalling Shared Agents

To deinstall a Shared Agent, run the following command from the Master Agent home that is visible on the host where your Shared Agent is installed:

$<AGENT_HOME>/perl/bin/perl <AGENT_HOME>/sysman/install/NFSAgentDeInstall.pl AGENT_INSTANCE_HOME=<absolute_path_to_agent_instance_home> ORACLE_HOME=<absolute_path_to_agent_home>

For example,

/home/john/software/oracle/agent/core/12.1.0.4.0/perl/bin/perl /home/john/software/oracle/agent/core/12.1.0.4.0/sysman/install/NFSAgentDeInstall.pl AGENT_INSTANCE_HOME=/home/john/software/oracle/agent/agent_inst ORACLE_HOME=/home/john/software/oracle/agent/core/12.1.0.4.0

Note:

If you encounter an error while deinstalling the Shared Agent, then refer to Section J.4.

22.1.2.5 Deinstalling Oracle Management Agent Installed Using an RPM File

To deinstall a Management Agent that was installed using a .rpm file, ensure that you have Resource Package Manager (RPM) installed on the Management Agent host, then follow these steps:

  1. Run the following command on the Management Agent host to obtain the RPM name:

    rpm -qa | grep oracle-agt

  2. Run the following command as a root user to deinstall the Management Agent:

    rpm -e <rpm_name>

    Here, <rpm_name> is the RPM name that is displayed in the output of the command you ran in Step 1.

22.1.3 After You Deinstall

After you deinstall the Management Agent, follow these steps:

  1. (Only for Graphical Mode) Verify whether the Oracle homes and other directories were successfully deinstalled. To do so, follow these steps:

    1. Invoke the installation wizard by running the following command from the Management Agent home:

      <DVD>/runInstaller

      Note:

      On Microsoft Windows, invoke the setup.exe file.
    2. In the installation wizard, on the My Oracle Support Details screen, click Installed Products.

    3. On the Inventory screen, check whether or not the Oracle homes and other directories you deinstalled appear. If the deinstallation was successful, then those Oracle homes and directories should not appear.

  2. The Oracle homes you deinstalled are deregistered from the central inventory. However, some files might still remain in these Oracle homes. If they do, you can manually delete them.

    You must also manually delete the auto-startup script called gcstartup which will be present under /etc/init.d directory.

    Note:

    These auto-start scripts are not available on Microsoft Windows.
  3. If you deinstalled on a Microsoft Windows platform, then follow these steps. Ensure that you are logged in as a user with Administrator privileges on that host.

    Remove Entries from Microsoft Windows Registry

    1. Start the registry editor by selecting Start and then Run. Type regedit and click OK.

    2. In the Registry Editor window, in the left pane, expand HKEY_LOCAL_MACHINE, SOFTWARE, and then Oracle. Under the Oracle directory, delete the following:

      (a) KEY_agent12gn

      (b) KEY_sbin12gn

      Note:

      Here, n refers to a numeral indicating the agent instance. For example, KEY_sbin12g9 for the first agent installation.
    3. Expand HKEY_LOCAL_MACHINE, SOFTWARE, Oracle, and then Sysman. Under the Sysman directory, delete the Management Agent service. For example, Oracleagent12g9Agent.

    4. Expand HKEY_LOCAL_MACHINE, SYSTEM, CurrentControlSet, and then Services. Under the Services directory, delete the Management Agent keys.

    5. Expand HKEY_LOCAL_MACHINE, SYSTEM, ControlSet002, and then Services. Under the Services directory, delete the Management Agent service.

    6. Close the registry editor.

    Clean Up Environment Settings

    1. Open the Environment Variables window.

      On Microsoft Windows NT, select Start, Settings, Control Panel, System, and then Environment.

      On Microsoft Windows XP or 2000, select select Start, Settings, Control Panel, System, Advanced, and then Environment Variables.

    2. In the System Variables section, click the variable PATH and modify the value.

    3. Delete Management Agent home.

    4. Click Apply and then click OK.

    5. Close the Control Panel window.

    6. Restart the host.

22.2 Deinstalling or Undeploying Only Plug-ins from the Oracle Management Agent

If you want to deinstall or undeploy only the plug-ins from the Management Agent, and not the Management Agent itself, then use the Plug-ins page within the Enterprise Manager Cloud Control Console. For instructions, see the Oracle Enterprise Manager Cloud Control Administrator's Guide. Do NOT use runInstaller to undeploy only the plug-ins.