Useful emcli commands in EM Cloud Control 12c

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 post 364 more words

Advertisements

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