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/detachHome.sh -force -allDepHomes -silent ORACLE_HOME=<OLD_ORACLE_HOME> -waitForCompletion -invPtrLoc <ORACLE_HOME>/oraInst.loc

    2. Detach the Oracle common directory.

      <OLD_ORACLE_HOME>/oui/bin/detachHome.sh -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.