This manuel describes a number of useful commands for use with Oracle Enterprise Manager 12c. Emcli can be used to implement batch Oracle scripts on your Management Server (OMS)
Commands
- Log on the OMS 12c server
/u01/app/oracle/product/middleware/oms/bin
1 2 3 |
oracle> /u01/app/oracle/product/middleware/oms/bin/emcli login -username=sysman Enter password : Login successful |
or
1 2 |
oracle> /u01/app/oracle/product/middleware/oms/bin/emcli login -username=sysman -password=<pass_word> Login successful |
- Synchronize emcli with the Oracle Management Server.
1 2 |
oracle> /u01/app/oracle/product/middleware/oms/bin/emcli sync Synchronized |
- Log out Oracle Management Server.
1 2 |
oracle> emcli logout Logout successful |
- Remove specifictarget.
1 |
oracle> /u01/app/oracle/product/middleware/oms/bin/emcli delete_target -name="<name>" -type="<type>" |
- Remove a agent and all of its objects.
1 |
oracle> /u01/app/oracle/product/middleware/oms/bin/emcli delete_target -name="***lgc-productie.mydomain.com:3872" -type="oracle_emd" -delete_monitored_targets |
- Gives a list of all promoted components.
1 |
oracle> /u01/app/oracle/product/middleware/oms/bin/emcli get_targets |
- Plugin deployment (OMS / agent)
1 2 3 4 5 6 7 8 |
-- Oracle Database plugin oracle> /u01/app/oracle/product/middleware/oms/bine/mcli get_plugin_deployment_status -plugin_id=oracle.sysman.db -- Oracle Fusion Middleware plugin oracle> /u01/app/oracle/product/middleware/oms/bin/emcli get_plugin_deployment_status -plugin_id=oracle.sysman.emas -- My Oracle Support plugin oracle> emcli get_plugin_deployment_status -plugin_id=oracle.sysman.mos |
- Import a update in the software library.
1 |
oracle> emcli import_update -file="file.zip" -omslocal |
- Deploy a plugin in the OMS
1 |
oracle> /u01/app/oracle/product/middleware/oms/bin/emcli deploy_plugin_on_server -plugin=oracle.sysman.db -sys_password=<pass_word> |
- Deploy a plugin on EM agent(s).
1 |
oracle> /u01/app/oracle/product/middleware/oms/bin/emcli deploy_plugin_on_agent -plugin="oracle.sysman.db" -agent_names="***db-prod1.mydomain.com:3872;xxxdb-prod2.mydomain.com:3872" |
- List of available agents in the software library.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
oracle> /u01/app/oracle/product/middleware/oms/bin/emcli get_supported_platforms About to access self-update code path to retrieve the platforms list.. Getting Platforms list ... ----------------------------------------------- Version = 12.1.0.2.0 Platform = Microsoft Windows x64 (64-bit) ----------------------------------------------- Version = 12.1.0.2.0 Platform = Microsoft Windows (32-bit) ----------------------------------------------- Platforms list displayed successfully. |
- Download a agent from the software library (agentDeploy.sh)
1 |
oracle> /u01/app/oracle/product/middleware/oms/bin/emcli get_agentimage -destination=/home/oracle -platform="Microsoft Windows x64 (64-bit)" -version="12.1.0.2.0" |
- Set the monitoring credentials for a specific target, example from a database instance.
1 |
oracle> /u01/app/oracle/product/middleware/oms/bin/emcli set_credential -target_type=oracle_database -target_name="AREA51" -credential_set=DBCredsMonitoring -user=sysman -column="Role:SYSDBA;UserName:sys;password:<pass_word>" -monitoring |
Please let me know if this manual ‘Oracle Enterprise Manager 12c EMCLI commands’ was usefull to you. If there are errors or you have suggestions regarding this manual, please let me know.
No rights can be derived from this manual
Regards,
Maarten