D Deleting the Old OMS Home

Central agent is the Oracle Management Agent (Management Agent) that is deployed by default with the first Oracle Management Service (OMS). In Enterprise Manager Cloud Control 12c Release 1 (12.1.0.1) and 12c Release 2 (12.1.0.2), by default the agent base directory of the central agent was maintained inside the Oracle Middleware Home (middleware home). However, in Enterprise Manager Cloud Control 12c Release 3 (12.1.0.3) or higher, Oracle strongly recommended that you maintain the agent base directory outside the middleware home, although you could choose to maintain it inside the middleware home. While upgrading from 12c Release 1 (12.1.0.1) or 12c Release 2 (12.1.0.2) to 12c Release 3 (12.1.0.3) or higher, you had the option of migrating the agent base directory to a location outside the middleware as described in Moving the Central Agent Base Directory Outside Oracle Middleware Home. If you had already migrated the central agent, then you can directly remove the old OMS home. Otherwise, you must first migrate the central agent and then remove the old OMS home.

This appendix describes how you can remove the old OMS home under both these circumstances. In particular, it covers the following:

Deleting the Old OMS Home When the Central Agent Is Still Present in the Old Middleware Home

If you have not already migrated the central agent to a location outside the old middleware home, then you must first migrate the central agent and then remove the old OMS, or in other words the old middleware home. To do so, follow these steps:

  1. Migrate the central agent to a location outside the old middleware home.

    1. Create a list of plug-ins.

      <AGENT_HOME>/perl/bin/perl <AGENT_HOME>/sysman/install/create_plugin_list.pl -instancehome <AGENT_INSTANCE_HOME>

      Here, <AGENT_HOME> represents the current central agent Oracle home, and <AGENT_INSTANCE_HOME> represents the current central agent instance home.

    2. Convert the central agent to a standalone agent.

      <AGENT_HOME>/perl/bin/perl <AGENT_HOME>/sysman/install/AgentMigrate.pl -instanceHome <AGENT_INSTANCE_HOME> -newAgentBaseDir <AGENT_BASE_DIRECTORY>

      Here, <AGENT_HOME> represents the current central agent Oracle home, <AGENT_INSTANCE_HOME> represents the new central agent instance home, and <AGENT_BASE_DIRECTORY> represents the location to which you want to migrate the central agent base directory.

    Note:

    After migrating the central agent, you must deinstall the central agent. For information on how to deinstall the central agent, refer Deinstalling Oracle Management Agents.
  2. Remove the old OMS home, or in other words the old middleware home.

    Note:

    If your old OMS home version is 13c release 1, then ignore steps a, b and follow only steps c, d.
    1. Detach the old OMS home.

      <OLD_ORACLE_HOME>/oui/bin/runInstaller -detachHome -force -allDepHomes -silent ORACLE_HOME=<OLD_ORACLE_HOME> -waitForCompletion -invPtrLoc <ORACLE_HOME>/oraInst.loc

      -bash: ./runInstaller: No such file or directory

    2. Detach the Oracle common directory.

      <OLD_ORACLE_HOME>/oui/bin/runInstaller -detachHome -force -allDepHomes -silent ORACLE_HOME=<OLD_MW_HOME>/oracle_common -waitForCompletion -invPtrLoc <OLD_MW_HOME>/oraInst.loc

    3. Check whether any processes are running from the old middleware home.

      ps -ef | grep <OLD_MW_HOME>

    4. If no processes are running from the old middleware home, then delete the old middleware home.

      rm -rf <OLD_ORACLE_HOME>

    Note:

    During the process of detaching the home (step a and b), you may receive a message "The Oracle home '<oracle home>' could not be updated as it does not exist." You can ignore this message.

Deleting the Old OMS Home When the Central Agent Is Migrated to a Location Outside the Old Middleware Home

If you have already migrated the central agent to a location outside the old middleware home, first deinstall the central agent, and then you can directly remove the old OMS, or in other words the old middleware home. To do so, follow these steps:

Note:

To deinstall the central agent, refer Deinstalling Oracle Management Agents.

If your old OMS home version is 13c release 1, then ignore steps 1, 2, and follow only steps 3, 4.
  1. Detach the old OMS home.

    <OLD_ORACLE_HOME>/oui/bin/runInstaller -detachHome -force -allDepHomes -silent ORACLE_HOME=<OLD_ORACLE_HOME> -waitForCompletion -invPtrLoc <OLD_ORACLE_HOME>/oraInst.loc

  2. Detach the Oracle common directory.

    <OLD_ORACLE_HOME>/oui/bin/runInstaller -detachHome -force -allDepHomes -silent ORACLE_HOME=<OLD_MW_HOME>/oracle_common -waitForCompletion -invPtrLoc <OLD_MW_HOME>/oracle_common/oraInst.loc

  3. Check whether any processes are running from the old middleware home.

    ps -ef | grep <OLD_MW_HOME>

  4. If no processes are running from the old middleware home, then delete the old middleware home.

    rm -rf <OLD_MW_HOME>

    Note:

    During the process of detaching the home (step 1, 2), you may receive a message "The Oracle home '<oracle home>' could not be updated as it does not exist." You can ignore this message.