Skip to content

Make DBA Life Easy

  • Home
  • Blog
  • Investment
  • About
  • Contact
  • Disclaimer
  • Subscribe
Make DBA Life Easy

Tag: useful emcli commands

Most Useful emcli commands in OEM Cloud Control 13c

  • login
$ emcli login -username=sysman -password=pass1234
Login successful

or

$ emcli login -username=sysman
Enter password :

Login successful
  • logout
$ emcli logout
Logout successful
  • Help
$ emcli help

$ emcli help login
emcli>help()

emcli>help('login')
  • Status
$ emcli status

Oracle Enterprise Manager 13c Release 2 EM CLI with Scripting option.
...
..
.
emcli>status()
  • Synchronize with the OMS
$ emcli sync
Synchronized successfully
  • List of target types
[oracle@oemnode1 ~]$ emcli get_target_types
Display Target Type                               | Target Type                                | Is Composite (Y/N)
------------------------------------------------- | ------------------------------------------ | ------------------
ADF Business Components for Java                  | oracle_bc4j                                | N
ASM Disk Group Component                          | asm_diskgroup_component                    | N
...
..
.
oracle_sdpmessagingdriver_xmpp             | N
ZPools                                            | oracle_si_zpool_host                       | N
ZPools                                            | oracle_si_zpool_host_remote                | N
ZPools                                            | oracle_si_zpool_zfssa                      | N
webcenter_portal_app                              | webcenter_portal_app                       | N
$ emcli get_target_types -plugin=oracle.sysman.db

Display Target Type |               Target Type            | Is Composite (Y/N)
-------------------------------- | ------------------------| ------------------
ASM Disk Group Component         | asm_diskgroup_component | N
ASM IO Server                    | osm_ioserver            | N
ASM Proxy                        | osm_proxy               | N
Automatic Storage Management     | osm_instance            | N
Cluster                          | cluster                 | Y
Cluster ASM                      | osm_cluster             | Y
Cluster ASM Disk Group Component | casm_diskgroupcomponent | N
Cluster Database                 | rac_database            | Y
Database Instance                | oracle_database         | N
Database System                  | oracle_dbsys            | Y
Exadata Express Cloud Service    | oracle_pdbexpress       | N
Far Sync Instance                | oracle_farsync          | N
Global Data Services             | gds_cloud               | Y
Global Data Services Pool        | gds_pool                | Y
Global Service Manager           | gds_gsm                 | N
Listener                         | oracle_listener         | N
Oracle Cloud Database Service    | oracle_cloud_dbcs       | Y
Oracle Database Service          | oracle_dbservice        | N
Oracle High Availability Service | has                     | N
Oracle Secure Backup Domain      | osb_server              | N
Pluggable Database               | oracle_pdb              | N
Schema Service                   | oracle_dbsvc            | N
  • Lists all the property names for the target type.
$ emcli get_target_properties -target_type="oracle_database"
Comment
Contact
Cost Center
Customer Service Identifier
Department
Downtime Contact
Environment
LifeCycle Status
Line of Business
Location
Operating System
Platform
Site
Target Version
Target properties fetched successfully
  • Set Target Property Value

    For cluster target types, the value of the target property automatically propagates to all of its member targets. This happens even without the -propagate_to_members parameter. The propagate_to_members parameter is used for aggregate non-cluster targets where the desired behavior is to propagate the target property values to members of the aggregate target. Note that it will propagate to current members of the aggregate, and not targets that are added in the future.

    Note:
    You can only set up and propagate one property at a time to members.

    $ emcli set_target_property_value -property_records=”target_name:target_type:property_name:property_value” [-
    separator=property_records=”sep_string”] [-subseparator=property_records=”subsep_string”] [-input_file=”parameter_tag:file_path”]
    [-propagate_to_members]

    [ ] indicates that the parameter is optional

    $ emcli set_target_property_value property_records=”oggtest:5512:oracle_goldengate:LifeCycleStatus:Test” -propagate_to_members
  • List of Targets
$ emcli get_targets
[oracle@oemnode1 ~]$ emcli get_targets -targets="oracle_listener"
Status  Status           Target Type           Target Name
 ID
1       Up               oracle_listener       LISTENER_racnode2.virtuallab
1       Up               oracle_listener       LISTENER_SCAN3_racnode-cluster
0       Down             oracle_listener       ASMNET1LSNR_ASM_racnode2.virtuallab
1       Up               oracle_listener       LISTENER_racnode1.virtuallab
1       Up               oracle_listener       LISTENER_oemnode1
1       Up               oracle_listener       LISTENER_SCAN2_racnode-cluster
0       Down             oracle_listener       ASMNET1LSNR_ASM_racnode1.virtuallab
1       Up               oracle_listener       LISTENER_SCAN1_racnode-cluster
0       Down             oracle_listener       MGMTLSNR_racnode1.virtuallab
  • List of alerts that are out-of-sync between OEM Agent and the repository for the specified target.
$ emcli get_unsync_alerts -target_type=host -target_name=racnide1
Total number of alerts to be synchronized = 0
  • Blackout

$emcli create_blackout -name="DB_RAC_RACTEST_BLACKOUT" 
 -reason="Mainteneance" -add_targets="RACTEST:rac_database" 
 -schedule="duration:10"
$ emcli get_blackout_details -name="DB_RAC_RACTEST_BLACKOUT"
Status Status ID Run Jobs Next Start          Duration       Reason Frequency Repeat Days Months           Start Time           End Time TZ Region TZ Offset    Type
Started        4       no 2019-12-02 14:00:20    10:00 Mainteneance      once   none none   none  2019-12-02 03:00:20 2019-12-02 13:00:20      UTC    +00:00 Blackout

$ emcli stop_blackout -name="DB_RAC_RACTEST_BLACKOUT"
Blackout "DB_RAC_RACTEST_BLACKOUT" stopped successfully
$ emcli delete_blackout -name="DB_RAC_RACTEST_BLACKOUT"
Blackout "DB_RAC_RACTEST_BLACKOUT" deleted successfully
  • Decommission an agent and delete the respective targets

$ emcli delete_target -name="racnode1:3872" -type="oracle_emd" 
        -delete_monitored_targets -async
Target "racnode1:3872:oracle_emd" deleted successfully
  • Stop and start an agent from OMS

  • Plug-In

[oracle@oemnode1 ~]$ emcli list_plugins_on_agent    \
                 -agent_names=racnode1.virtuallab:3872 -include_discovery
The Agent URL is https://racnode1.virtuallab:3872/emd/main/ -
Plug-in Name                Plugin-id                    Version [revision]

Systems Infrastructure       oracle.sysman.si              13.3.1.0.0
Oracle Home                  oracle.sysman.oh              13.3.0.0.0
Oracle Fusion Middleware     oracle.sysman.emas            13.3.1.0.0*
Systems Infrastructure       oracle.sysman.si              13.3.1.0.0*
Oracle Exadata               oracle.sysman.xa              13.3.1.0.0*
Oracle Database              oracle.sysman.db              13.3.1.0.0*
Oracle Home                  oracle.sysman.oh              13.3.0.0.0*
Oracle Database              oracle.sysman.db              13.3.1.0.0

* Indicates that the plug-in is a discovery plug-in.
[oracle@oemnode1 ~]$emcli list_plugins_on_agent -agent_names='agent,*node*'
[oracle@oemnode1 ~]$ emcli list_plugins_on_agent -all
Importing Manually Downloaded Plug_In
emcli import_update -omslocal -file=p29555092_112000_Generic.zip

Transfer the downloaded file to any managed host in your environment, and run following command to import it to Enterprise Manager.

emcli import_update -host=<hostname> -file=p29555092_112000_Generic.zip <host credential options>
 Importing Plug-In Catalog Archives
[oracle@oemnode1 ~]$ emcli import_update_catalog -file="/tmp/p9348486_112000_Generic.zip" -omslocal
List Plug-Ins
[oracle@racnode1 ~]$ emctl listplugins agent
Deploying Plug-Ins to Management Service
[oracle@oemnode1 ~]$ emcli deploy_plugin_on_server -plugin="oracle.sysman.db:13.3.2.0.0" -repo_backup_taken
Enter repository DB sys password:
Tracking the Deployment Status of Plug-Ins on Oracle Management Service
[oracle@oemnode1 ~]$ emcli get_plugin_deployment_status -plugin_id="oracle.sysman.db:13.3.2.0.0"
Deploying Plug-Ins on Oracle Management Agent
[oracle@oemnode1 ~]$ emcli deploy_plugin_on_agent  \
-agent_names="racnode1.virtuallab:3872"            \
-plugin="oracle.sysman.db:13.3.2.0.0"
Agent side plug-in deployment is in progress
Use "emcli get_plugin_deployment_status -plugin=oracle.sysman.db" 
to track the plug-in deployment status.

  • BIP
Start BIP only

$ emctl start oms -bip_only
Oracle Enterprise Manager Cloud Control 13c Release 4
Copyright (c) 1996, 2020 Oracle Corporation.  All rights reserved.
Starting BI Publisher Server only.
Starting BI Publisher Server ...
BI Publisher Server Successfully Started
BI Publisher Server is Up
Check BIP status

$ emctl status oms -bip_only
Oracle Enterprise Manager Cloud Control 13c Release 4
Copyright (c) 1996, 2020 Oracle Corporation.  All rights reserved.
BI Publisher Server is Up
stop BIP only

$ emctl stop oms -bip_only
Oracle Enterprise Manager Cloud Control 13c Release 4
Copyright (c) 1996, 2020 Oracle Corporation.  All rights reserved.
Stopping BI Publisher Server...
BI Publisher Server Successfully Stopped
BI Publisher Server is Down
Unknown's avatarAuthor dbalifeeasyPosted on April 25, 2020October 10, 2023Categories OEM13cTags emcli login, emcli logout, emcli status, emcli sync, useful emcli commandsLeave a comment on Most Useful emcli commands in OEM Cloud Control 13c

Google Translate

SEARCH

Calendar

September 2025
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  
« Aug    

Archives

Blog Stats

  • 1,399,987 hits

Categories

  • AWS (9)
  • GoldenGate (12)
    • Config (2)
    • Docs (1)
    • Exam & Interview Q/A (1)
    • How To (1)
    • Install and Upgrade (2)
    • JAgent (1)
    • OGG ERROR (4)
  • Linux (29)
  • MySQL (4)
    • Install and Upgrade (3)
    • Startup and Shutdown (1)
  • Oracle (627)
    • 12c/13c/18c/19c/20x New Features (9)
    • ADR (2)
    • ASM (34)
    • AWR (5)
    • BI Report (3)
    • CDB/PDB (25)
    • CHM (14)
    • Client (14)
    • CMU (2)
    • Configuration (30)
    • Corruptions (3)
    • DataGuard (59)
    • DataPump (17)
    • dbms_scheduler (6)
    • Exadata & ExaCC (10)
    • FLASHBACK (5)
    • GI and RAC (127)
    • Globalization (1)
    • Install Upgrade and Patches (70)
    • JAVA (2)
    • Materialized View (7)
    • OCI (5)
      • ADW / ATP (3)
      • Object Storage (1)
      • Veridata (1)
    • OEM( Oracle Enterprise Manager) (94)
      • OEM 12c (9)
      • OEM13c (87)
    • ORA- ERRORS (65)
    • oracle advanced compression (4)
    • ORMB (13)
    • Partitioning (12)
    • Performance Tunning (28)
    • RMAN Restore and Recovery (28)
    • Security (13)
    • Services (2)
    • SQL Net (16)
    • SQL Scripts For DBA (27)
    • Statistics (1)
    • TDE (7)
    • TOOLS( AHF TFA ORAchk EXAchk ) (6)
    • TTS (1)
    • Upgrade (1)
    • User Privileges and Roles (18)
    • Weblogic (1)
  • PostgreSQL (31)
    • Client (4)
    • Extension (6)
    • Install and Upgrade (8)
    • Migration (4)
    • Objects (4)
    • Performance Tuning (1)
    • Privileges (1)
    • SQL Scripts for DBA (4)
    • Vacuum (4)
  • Premium Content (231)
  • SQL Server (27)
    • Always On (3)
    • Backup and Restore (2)
    • Client (1)
    • Install Patch and Upgrade (4)
    • Security (3)
    • Space (2)
    • SQL Scripts for DBA (6)
    • SSMA (4)
    • Versions (2)
  • VirtualBox (14)
  • Windows (15)

Meta

  • Create account
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.com
  • Home
  • Blog
  • Investment
  • About
  • Contact
  • Disclaimer
  • Subscribe
Make DBA Life Easy Blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • Make DBA Life Easy
    • Join 57 other subscribers
    • Already have a WordPress.com account? Log in now.
    • Make DBA Life Easy
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar