©2015 - 2022 Chad’s Technoworks. Disclaimer and Terms of Use

Chad’s TechnoWorks My Journal On Technology

Information Technology

Oracle 12c Enterprise Manager Cloud Control Installation - page 8

Prev< 1 2 3 4 5 6 7 8  

UNINSTALL MANAGEMENT AGENT

Sometimes, you are faced with a situation where you require a management agent to be re-installed for various reasons; or, perhaps you just wanted to uninstall the management agent since you no longer wanted to monitor the target host, the following are the instructions to deinstall the agent.


This is an expounded version of agent de-installation in reference to: http://docs.oracle.com/cd/E24628_01/install.121/e24089/deinstall_agent.htm


PREP TASKS: Delete Agent Targets in OEM

Before you deinstall a Management Agent, you need to delete agent targets in the Oracle EM Cloud Control 12c.


1. Shut down the EM agent in the target host.


$<AGENT_HOME>/bin/emctl stop agent


2. Login to EM from the Oracle Management Server (OMS).


oraem@s11node1:/oem/app/oraem$ emcli login -username=sysman -password=mypass123

Login successful

oraem@s11node1:/oem/app/oraem$


3. Synchronize emcli with the OMS


oraem@s11node1:/oem/app/oraem$ emcli sync

Synchronized successfully

oraem@s11node1:/oem/app/oraem$


4. List all the targets


oraem@s11node1:/oem/app/oraem$ emcli get_targets

Status  Status           Target Type           Target Name

 ID

4       Agent Unreachab  host                  pacific.vlabs.net

        le

1       Up               host                  oem-vip.vlabs.net

1       Up               j2ee_application      /EMGC_GCDomain/GCDomain/EMGC_OMS1/e

                                               mgc

1       Up               j2ee_application      /EMGC_GCDomain/GCDomain/EMGC_OMS1/O

                                               CMRepeater

1       Up               j2ee_application      /EMGC_GCDomain/GCDomain/EMGC_ADMINS

                                               ERVER/FMW Welcome Page Application(

                                               11.1.0.0.0)

1       Up               j2ee_application      /EMGC_GCDomain/GCDomain/EMGC_OMS1/e

                                               mpbs

-9      n/a              metadata_repository   /EMGC_GCDomain/GCDomain/EMGC_ADMINS

                                               ERVER/mds-sysman_mds

-9      n/a              metadata_repository   /EMGC_GCDomain/GCDomain/EMGC_ADMINS

                                               ERVER/mds-owsm

1       Up               oracle_apache         /EMGC_GCDomain/instance1/ohs1

1       Up               oracle_beacon         EM Management Beacon

1       Up               oracle_em_service     EM Console Service

1       Up               oracle_em_service     EM Jobs Service

1       Up               oracle_emd            oem-vip.vlabs.net:3872

4       Agent Unreachab  oracle_emd            pacific.vlabs.net:3872

        le

1       Up               oracle_emrep          Management Services and Repository

1       Up               oracle_emsvrs_sys     Management_Servers

-9      n/a              oracle_home           Ora11g_dbhome1_1_pacific.vlabs.net

-9      n/a              oracle_home           agent12cR4_2_pacific.vlabs.net

-9      n/a              oracle_home           WebLogicServer10_3_6_0_oem-vip.vlab

                                               s.net_5532

-9      n/a              oracle_home           agent12c1_9_oem-vip.vlabs.net

-9      n/a              oracle_home           common12c1_21_oem-vip.vlabs.net

-9      n/a              oracle_home           oms12c1_3_oem-vip.vlabs.net

-9      n/a              oracle_ias_farm       EMGC_GCDomain

4       Agent Unreachab  oracle_listener       OMRDB11_pacific.vlabs.net

        le

1       Up               oracle_oms            oem-vip.vlabs.net:4889_Management_S

                                               ervice

1       Up               oracle_oms_console    oem-vip.vlabs.net:4889_Management_S

                                               ervice_CONSOLE

1       Up               oracle_oms_pbs        oem-vip.vlabs.net:4889_Management_S

                                               ervice_PBS

-9      n/a              weblogic_domain       /EMGC_GCDomain/GCDomain

1       Up               weblogic_j2eeserver   /EMGC_GCDomain/GCDomain/EMGC_OMS1

1       Up               weblogic_j2eeserver   /EMGC_GCDomain/GCDomain/EMGC_ADMINS

                                               ERVER

oraem@s11node1:/oem/app/oraem$


5. Delete an agent and its targets


syntax:

emcli delete_target -name=”target_host_name:3872″ -type=”oracle_emd” -delete_monitored_targets


oraem@s11node1:/oem/app/oraem$ emcli delete_target -name="pacific.vlabs.net:3872" -type="oracle_emd" -delete_monitored_targets

Target "pacific.vlabs.net:3872:oracle_emd" deleted successfully

oraem@s11node1:/oem/app/oraem$


6. List all the targets to confirm the agent and its targets have been deleted.


oraem@s11node1:/oem/app/oraem$ emcli get_targets

Status  Status           Target Type           Target Name

 ID

1       Up               host                  oem-vip.vlabs.net

1       Up               j2ee_application      /EMGC_GCDomain/GCDomain/EMGC_OMS1/e

                                               mgc

1       Up               j2ee_application      /EMGC_GCDomain/GCDomain/EMGC_OMS1/O

                                               CMRepeater

1       Up               j2ee_application      /EMGC_GCDomain/GCDomain/EMGC_ADMINS

                                               ERVER/FMW Welcome Page Application(

                                               11.1.0.0.0)

1       Up               j2ee_application      /EMGC_GCDomain/GCDomain/EMGC_OMS1/e

                                               mpbs

-9      n/a              metadata_repository   /EMGC_GCDomain/GCDomain/EMGC_ADMINS

                                               ERVER/mds-sysman_mds

-9      n/a              metadata_repository   /EMGC_GCDomain/GCDomain/EMGC_ADMINS

                                               ERVER/mds-owsm

1       Up               oracle_apache         /EMGC_GCDomain/instance1/ohs1

1       Up               oracle_beacon         EM Management Beacon

1       Up               oracle_em_service     EM Console Service

1       Up               oracle_em_service     EM Jobs Service

1       Up               oracle_emd            oem-vip.vlabs.net:3872

1       Up               oracle_emrep          Management Services and Repository

1       Up               oracle_emsvrs_sys     Management_Servers

-9      n/a              oracle_home           WebLogicServer10_3_6_0_oem-vip.vlab

                                               s.net_5532

-9      n/a              oracle_home           agent12c1_9_oem-vip.vlabs.net

-9      n/a              oracle_home           common12c1_21_oem-vip.vlabs.net

-9      n/a              oracle_home           oms12c1_3_oem-vip.vlabs.net

-9      n/a              oracle_ias_farm       EMGC_GCDomain

1       Up               oracle_oms            oem-vip.vlabs.net:4889_Management_S

                                               ervice

1       Up               oracle_oms_console    oem-vip.vlabs.net:4889_Management_S

                                               ervice_CONSOLE

1       Up               oracle_oms_pbs        oem-vip.vlabs.net:4889_Management_S

                                               ervice_PBS

-9      n/a              weblogic_domain       /EMGC_GCDomain/GCDomain

1       Up               weblogic_j2eeserver   /EMGC_GCDomain/GCDomain/EMGC_OMS1

1       Up               weblogic_j2eeserver   /EMGC_GCDomain/GCDomain/EMGC_ADMINS

                                               ERVER

oraem@s11node1:/oem/app/oraem$


7. Logout EMCLI


oraem@s11node1:/oem/app/oraem$ emcli logout

Logout successful

oraem@s11node1:/oem/app/oraem$



DEINSTALL AGENT USING SCRIPT: AgentDeinstall.pl


As a pre-requisite you need to get the details of your AGENT HOME directory.

You may refer to the Understanding Agent Directories section to get the idea of what the value is.


WARNING! Taken from the Oracle Doc -

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:


Syntax:

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


Example:


My Agent Home:

export MY_AGENT_HOME=/dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0


$MY_AGENT_HOME/perl/bin/perl $MY_AGENT_HOME/sysman/install/AgentDeinstall.pl -agentHome /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0 -skipRemoval


pacific:oradb> $MY_AGENT_HOME/perl/bin/perl $MY_AGENT_HOME/sysman/install/AgentDeinstall.pl -agentHome /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0 -skipRemoval



 Agent Oracle Home: /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0


agentHome = /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0


NOTE: The agent base directory: /dsk0/orabin/11gR2/agent12c will be removed after successful deinstallation of agent home.



 DetachHome Command executed:/dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/oui/bin/runInstaller -detachHome -force -depHomesOnly -silent ORACLE_HOME=/dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0 -waitForCompletion -invPtrLoc /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/oraInst.loc

Starting Oracle Universal Installer...


Checking swap space: must be greater than 500 MB.   Actual 16941 MB    Passed

The inventory pointer is located at /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/oraInst.loc

'DetachHome' was successful.

Starting Oracle Universal Installer...


Checking swap space: must be greater than 500 MB.   Actual 16939 MB    Passed

The inventory pointer is located at /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/oraInst.loc

The Oracle home '/dsk0/orabin/11gR2/agent12c/sbin' could not be updated as it does not exist.



Deinstall Command executed:/dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/oui/bin/runInstaller -deinstall -silent "REMOVE_HOMES={/dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0}" -waitForCompletion -removeAllFiles -invPtrLoc /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/oraInst.loc

Starting Oracle Universal Installer...


Checking swap space: must be greater than 500 MB.   Actual 16939 MB    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-07-02_02-56-16PM. Please wait ...Oracle Universal Installer, Version 11.1.0.12.0 Production

Copyright (C) 1999, 2014, Oracle. All rights reserved.


Starting deinstall



Deinstall in progress (Thursday, July 2, 2015 2:56:50 PM CDT)

Configuration assistant "Agent Deinstall Assistant" succeeded

............................................................... 100% Done.


Deinstall successful


End of install phases.(Thursday, July 2, 2015 2:58:10 PM CDT)

End of deinstallations

Please check '/dsk0/orabin/oraInventory/logs/silentInstall2015-07-02_02-56-16PM.log' for more details.

Can't locate Carp.pm in @INC (@INC contains: /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/perl/lib/5.10.0/i86pc-solaris-thread-multi-64 /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/perl/lib/5.10.0 /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/perl/lib/site_perl/5.10.0/i86pc-solaris-thread-multi-64 /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/perl/lib/site_perl/5.10.0 .) at /dsk0/orabin/11gR2/agent12c/core/12.1.0.4.0/perl/lib/5.10.0/File/Path.pm line 32.

pacific:oradb>



2. If you haven't done before hand, manually remove the targets which were being monitored by the Management Agent you deinstalled from the Enterprise Manager Cloud Control console. Refer to the Prep Tasks discussed previously for details.


3. Manually delete the agent base directory.


   As noted from the output of the AgenDeinstall.pl script, the AGENT BASE is /dsk0/orabin/11gR2/agent12c.

   We can then remove that one if we don't need to re-purpose that directory:

   

   rm -rf /dsk0/orabin/11gR2/agent12c