Monday, February 13, 2017

Manually deleting o.e.m agents using emcli # oem # 12.1.0.5


from $OMS_HOME/bin directory we have "emcli" utility 
we can use "emcli" utility, to remove agents manually 

Manually deleting o.e.m agents using emcli # oem # 12.1.0.5

[oracle@em12c bin]$ ./emcli  version
Oracle Enterprise Manager 12c EM CLI Version 12.1.0.5.0

[oracle@em12c bin]$ pwd
/u01/app/oracle/oms12cr5/oms/bin

[oracle@em12c bin]$ ls -ltr emcli
-rwxr-xr-x. 1 oracle dba 15039 Feb  2 02:36 emcli
[oracle@em12c bin]$ ./emcli login -username=sysman -password=Welcome123
Login successful

[oracle@em12c bin]$ ./emcli sync
Synchronized successfully

[oracle@em12c bin]$ ./emcli  version
Oracle Enterprise Manager 12c EM CLI Version 12.1.0.5.0

[oracle@em12c bin]$ ./emcli get_targets
…..
….
output omitted …
4       Agent Unreachable   oracle_emd            192.168.1.242:3872                                                                                        
4       Agent Unreachable   oracle_emd            192.168.1.212:3872                                                                                      
4       Agent Unreachable   oracle_emd            192.168.1.150:3872                                                                                        
4       Agent Unreachable   oracle_emd            192.168.1.185:3872                                                                                     
4       Agent Unreachable   oracle_emd            192.168.1.109:3872                                                                           

./emcli delete_target -name="192.168.1.242:3872" \-type="oracle_emd" -delete_monitored_targets
./emcli delete_target -name="192.168.1.212:3872" \-type="oracle_emd" -delete_monitored_targets
./emcli delete_target -name="192.168.1.150:3872" \-type="oracle_emd" -delete_monitored_targets
./emcli delete_target -name="192.168.1.185:3872" \-type="oracle_emd" -delete_monitored_targets
./emcli delete_target -name="192.168.1.109:3872" \-type="oracle_emd" -delete_monitored_targets

[oracle@em12c bin]$ ./emcli delete_target -name="192.168.1.178:3872" \-type="oracle_emd" -delete_monitored_targets
Target "192.168.1.178:3872:oracle_emd" deleted successfully


###

References#

https://laurent-leturgez.com/2012/06/11/useful-emcli-commands-in-em-cloud-control-12c/
http://blog.dbi-services.com/oracle-cloud-control-12c-removing-an-agent-is-much-easier-in-oem-12104/
http://www.gokhanatil.com/2013/02/how-to-manually-remove-the-enterprise-manager-gridcloud-control-agent.html

Querys to monitor RAC

following few  Query's will help to find out culprits-  Query to check long running transaction from last 8 hours  Col Sid Fo...