Posted in 2016

Remove EM Agent from RAC nodes simplified

Well, yesterday Oracle published the new 12.2 documentation, it’s incredible how Oracle innovates their products.. it’s magical.. OK, enough dreaming, we have to learn something. To remove an Agent from Cloud Control 12.1.0.5 (and agents older then 12.1.0.3) you can use these steps:

  1. Stop Agent on the Host

    oracle@rac2:/u01/app/oracle/ [oracle] emctl stop agent
    Oracle Enterprise Manager Cloud Control 12c Release 5
    Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
    Stopping agent ..... stopped.

  2. On the Cloud Control Host delete the Target host:

    oracle@infra:~/ [oms11107] emcli delete_target -name="rac2.example.com:3872" 
    -type="oracle_emd" -delete_monitored_targets -async
    Target "rac2.example.com:3872:oracle_emd" deleted successfully
    

  3. Delete the Agent:

    oracle@rac2:/u01/app/oracle/ [oracle] /u01/app/oracle/agent12.1/core/12.1.0.5.0/perl/bin/perl
     /u01/app/oracle/agent12.1/core/12.1.0.5.0/sysman/install/AgentDeinstall.pl 
    -agentHome /u01/app/oracle/agent12.1/core/12.1.0.5.0
    
     Agent Oracle Home: /u01/app/oracle/agent12.1/core/12.1.0.5.0
    
    agentHome = /u01/app/oracle/agent12.1/core/12.1.0.5.0
    
    NOTE: The agent base directory: /u01/app/oracle/agent12.1 will be removed after successful deinstallation of agent home.
    
     DetachHome Command executed:/u01/app/oracle/agent12.1/core/12.1.0.5.0/oui/bin/runInstaller -detachHome 
    -force -depHomesOnly -silent ORACLE_HOME=/u01/app/oracle/agent12.1/core/12.1.0.5.0 
    -waitForCompletion -invPtrLoc /u01/app/oracle/agent12.1/core/12.1.0.5.0/oraInst.loc
    Starting Oracle Universal Installer...
    
    Checking swap space: must be greater than 500 MB.   Actual 32768 MB    Passed
    The inventory pointer is located at /u01/app/oracle/agent12.1/core/12.1.0.5.0/oraInst.loc
    'DetachHome' was successful.
    Starting Oracle Universal Installer...
    
    Checking swap space: must be greater than 500 MB.   Actual 32768 MB    Passed
    The inventory pointer is located at /u01/app/oracle/agent12.1/core/12.1.0.5.0/oraInst.loc
    The Oracle home '/u01/app/oracle/agent12.1/sbin' could not be updated as it does not exist.
    
    
    Deinstall Command executed:/u01/app/oracle/agent12.1/core/12.1.0.5.0/oui/bin/runInstaller -deinstall 
    -silent "REMOVE_HOMES={/u01/app/oracle/agent12.1/core/12.1.0.5.0}" -waitForCompletion -removeAllFiles 
    -invPtrLoc /u01/app/oracle/agent12.1/core/12.1.0.5.0/oraInst.loc
    Starting Oracle Universal Installer...
    
    Checking swap space: must be greater than 500 MB.   Actual 32768 MB    Passed
    Oracle Universal Installer, Version 11.1.0.13.0 Production
    Copyright (C) 1999, 2015, Oracle. All rights reserved.
    
    Starting deinstall
    
    Deinstall in progress (Tuesday, October 18, 2016 10:20:39 AM CEST)
    Configuration assistant "Agent Deinstall Assistant" succeeded
    ............................................................... 100% Done.
    
    Deinstall successful
    
    End of install phases.(Tuesday, October 18, 2016 10:20:47 AM CEST)
    End of deinstallations
    Please check '/u01/app/oraInventory/logs/silentInstall2016-10-18_10-20-36AM.log' for more details.
    
    oracle@infra:~/ [oms11107] emcli delete_target -name="rac1.example.com:3872" -type="oracle_emd" 
    -delete_monitored_targets -async
    Target "rac1.example.com:3872:oracle_emd" deleted successfully
    

    And now on the second node and voila, the agents are gone on a RAC.

Advertisements

Author:

Database administrator who loves to work with Oracle software. (Sometimes not)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s