EM 12c, EM 13c: delete agent and targets using emcli
It's feasible to delete agents and targets using GUI but can take a lot of work depending on configuration and security. Some of the complexities involve port forwarding and access to web browser which is not always available or simple for Linux, for example. Using command line interface (emcli) is much easier and a demo is shown below. The host being monitored is myhost1. Oracle Management Server (OMS) is omshost. The demo has only two monitored targets (oracle_dbsys, oracle_database) and there may be more depending on environments.
### Source OMS environment oracle@omshost[emrep]$ . oraenv <<< oms ORACLE_SID = [emrep] ? The Oracle base for ORACLE_HOME=/u01/app/product/em12.1.0.3_middleware/oms is /home/oracle/app/oracle ### Login to OMS as sysman user oracle@omshost[oms]$ emcli login -username=sysman Enter password : Login successful ### Sync OMS oracle@omshost[oms]$ emcli sync Synchronized successfully ### Find monitored targets for host (myhost1) oracle@omshost[oms]$ emcli get_targets -format=name:csv|grep myhost1 5,Under Blackout,oracle_database,myhost1 6,Status Pending,oracle_dbsys,myhost1_sys ### Delete monitored target: oracle_database oracle@omshost[oms]$ emcli delete_target -name="myhost1" -type="oracle_database" -delete_monitored_targets -async Target "myhost1:oracle_database" deleted successfully ### Delete monitored target: oracle_dbsys oracle@omshost[oms]$ emcli delete_target -name="myhost1_sys" -type="oracle_dbsys" -delete_monitored_targets -async Target "myhost1_sys:oracle_dbsys" deleted successfully ### Verify monitored targets have been deleted. oracle@omshost[oms]$ emcli get_targets -format=name:csv|grep myhost
Share this
You May Also Like
These Related Stories
Oracle Service Bus (OSB) 12c LDAP Authorization – HTTP 401 (Unauthorized)
Oracle Service Bus (OSB) 12c LDAP Authorization – HTTP 401 (Unauthorized)
Feb 4, 2021
2
min read
Oracle Database 12c Patching: DBMS_QOPATCH, OPATCH_XML_INV, and datapatch
Oracle Database 12c Patching: DBMS_QOPATCH, OPATCH_XML_INV, and datapatch
Jan 20, 2015
12
min read
Creating a single-node EBS 12.1.3 Vision instance from OVM templates
Creating a single-node EBS 12.1.3 Vision instance from OVM templates
Feb 13, 2014
4
min read
No Comments Yet
Let us know what you think