Originally posted on Oracle ... as usual:
If like me, you are addicted to command line, this post will help you to realize useful operation in EM Cloud Control 12c using emcli tool rather than GUI.
You can use emcli when you need to implement batch scripts on your Oracle Management Server (OMS).
- Login to EM
$ emcli login -username=sysman Enter password : Login successful
OR
$ emcli login -username=sysman -password=XXXXXX Login successful
- Synchronize emcli with the OMS
$ emcli sync Synchronized successfully
- Logout EM
$ emcli logout Logout successful
- List all the targets already promoted
$ emcli get_targets Status Status Target Type Target Name ID -9 n/a group OFM 1 Up host xxxdb-prod3.mydomain.com 1 Up host xxxdb-prod2.mydomain.com 1 Up host xxxlgc-prod2.mydomain.com 1 Up host xxxdb-prod1.mydomain.com 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_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 …
View original 364 more words
