Skip to content

Make DBA Life Easy

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

Tag: emcli login

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
  • 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
Advertisement
Author dbalifeeasyPosted on April 25, 2020May 3, 2022Categories OEM13cTags emcli login, emcli logout, emcli status, emcli sync, useful emcli commandsLeave a comment on Most Useful emcli commands in OEM Cloud Control 13c

Change a Target Owner in OEM 13c Cloud Control

The syntax of changing a target owner in OEM 13c cloud control is :

$emcli change_target_owner -target="target_name:target_type" 
-owner="current_target_owner_name" -new_owner="new_owner_name"

The target_name and target_type can be gotten through :

$emctl config agent listtargets

Below example is to change the owner of a listener from “SYSMAN” to “TETSUSER”:

$ emcli login -username='sysman'
Enter password

Login successful

$ emcli sync
Synchronized successfully

$ emcli change_target_owner -target="LISTENER_racnode1:oracle_listener" 
  -owner="SYSMAN" -new_owner="TESTUSER"

Changed the target(s) owner successfully.
Author dbalifeeasyPosted on February 7, 2018July 13, 2020Categories OEM13cTags Change a Target Owner in OEM 13c, emcli change_target_owner -target="target_name:target_type"  -owner="current_target_owner_name" -new_owner="new_owner_name", emcli login, emcli sync, emctl config agent listtargetsLeave a comment on Change a Target Owner in OEM 13c Cloud Control

Google Translate

SEARCH

Calendar

March 2023
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  
« Jan    

Archives

Blog Stats

  • 1,157,708 hits

Categories

  • AWS (9)
  • GoldenGate (6)
    • Config (2)
    • Docs (1)
    • Exam & Interview Q/A (1)
    • Install and Upgrade (2)
  • Linux (26)
  • MySQL (4)
    • Install and Upgrade (3)
    • Startup and Shutdown (1)
  • Oracle (535)
    • 12c/13c/18c/19c/20x New Features (9)
    • ADR (2)
    • ASM (27)
    • AWR (5)
    • CDB/PDB (18)
    • CHM (14)
    • Client (10)
    • CMU (2)
    • Configuration (25)
    • Corruptions (3)
    • DataGuard (52)
    • DataPump (17)
    • dbms_scheduler (6)
    • Exadata & ExaCC (10)
    • FLASHBACK (2)
    • GI and RAC (109)
    • Globalization (1)
    • Install Upgrade and Patches (64)
    • JAVA (2)
    • Materialized View (7)
    • OEM( Oracle Enterprise Manager) (79)
      • OEM 12c (8)
      • OEM13c (72)
    • ORA- ERRORS (55)
    • oracle advanced compression (4)
    • ORMB (13)
    • Partitioning (12)
    • Performance Tunning (28)
    • RMAN Restore and Recovery (20)
    • Security (10)
    • SQL Net (16)
    • SQL Scripts For DBA (25)
    • TDE (6)
    • TOOLS( AHF TFA ORAchk EXAchk ) (6)
    • TTS (1)
    • User Privileges and Roles (16)
  • 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 (229)
  • SQL Server (26)
    • Always On (3)
    • Backup and Restore (2)
    • Client (1)
    • Install Patch and Upgrade (4)
    • Security (2)
    • Space (2)
    • SQL Scripts for DBA (6)
    • SSMA (4)
    • Versions (2)
  • VirtualBox (14)
  • Windows (15)

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.com
  • Home
  • Blog
  • Investment
  • About
  • Contact
  • Disclaimer
  • Subscribe
Make DBA Life Easy Blog at WordPress.com.
  • Follow Following
    • Make DBA Life Easy
    • Join 48 other followers
    • Already have a WordPress.com account? Log in now.
    • Make DBA Life Easy
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar