EMCLI COMMAND DBACLASS
EMCLI useful commands. Enteprise manager command line interface. Oem 12c cloud control.
oracle monitoringintermediate
by OracleDba
14 views
EMCLI useful commands. Enteprise manager command line interface. Oem 12c cloud control.
1
./emcli login -username=SYSMAN12
./emcli login -username=SYSMAN
./emcli sync123
./emcli get_targets
./emcli get_targets -targets="oracle_database"12
./emcli delete_target -name="B2BOMT2" -type="oracle_database"
Target "B2BOMT2:oracle_database" deleted successfully1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
./emcli describe_job_type -job_type=RunAutoDiscovery > inputs.prop
# Description: (Optional) The user specified name of the job
name=AUTO_DISC
# Description: (Optional) The job type for this job
type=RunAutoDiscovery
# Description: (Optional) The user specified description of the job
description=
# Description: The job owner. The job owner is the user who creates the job.
# Default: the logged in user
# The job owner information displayed here is for documentation only and user is not expected to change it.
owner=
# Description: (Optional) The kind of job
# Legal Values: active, library
kind=
# Fill in the target list before submitting.
# For Example:
# target_list=MyTarget:cluster
target_list=172.20.294.137:host
# Description: The type of targets to use for this job
targetType=host
# Description: (Optional) Notify the job owner when a selected state occurs
# Allowed Values: SCHEDULED, RUNNING, ACTION_REQUIRED, SUSPENDED, SUCCEEDED, PROBLEMS
notification=
# Description: (Optional) The run time properties for the job
properties=
./emcli create_job -input_file=property_file:inputs.prop
Creation of job "AUTO_DISC" was successful.
The following properties were not set to any value and were ignored: description, owner, kind, notification, properties
emcli get_jobs -name=AUTO_DISC
Name Type Job ID Execution ID Scheduled Completed TZ Offset Status Status ID Owner Target Type Target Name
AUTO_DISC RunAutoDiscovery 4A115DB150B74968E0540010E01F328C 4A115DB150BA4968E0540010E01F328C 2017-03-06 17:03:55 none GMT+03:00 Running 2 SYSMAN host 172.20.294.137
./emcli get_job_execution_detail -execution=4A115DB150BA4968E0540010E01F328C -xml -showOutput
emcli get_jobs -name=AUTO_DISC
Name Type Job ID Execution ID Scheduled Completed TZ Offset Status Status ID Owner Target Type Target Name
AUTO_DISC RunAutoDiscovery 4A115DB150B74968E0540010E01F328C 4A115DB150BA4968E0540010E01F328C 2017-03-06 17:03:55 2017-03-06 17:05:22 GMT+03:00 Succeeded 5 SYSMAN host 172.20.204.13712345
./emcli add_target -name=”ORACLE_SID” -type=”oracle_database” -host=”$oemhost” -credentials=”UserName:dbsnmp;password:dbsnmp_password;Role:Normal” -properties=”SID:ORACLE_SID;Port:1521;OracleHome:;MachineName:\”
./emcli add_target -name="CRMB2RT" -type="oracle_database" -host="172.29.284.137" -credentials="UserName:dbsnmp;password:oracle4u;Role:Normal" -properties="SID:CRMB2RT;Port:1543;OracleHome:/oracle/app/oracle/product/12.1.0.2_B2R/dbhome_1;MachineName:dbac61-1"
Target "CRMB2RT:oracle_database" added successfully123456789101112131415
./emcli list_plugins_on_server
OMS name is dbadev64.dba.com.sa:4889_Management_Service
Plug-in Name Plugin-id Version [revision]
Oracle Audit Vault oracle.em.soav 12.1.0.4.0
Oracle GoldenGate oracle.fmw.gg 13.1.1.0.0
Oracle Cloud Framework oracle.sysman.cfw 13.2.1.0.0
Oracle Database oracle.sysman.db 13.2.1.0.0
Oracle Fusion Middleware oracle.sysman.emas 13.2.1.0.0
Oracle Fusion Applications oracle.sysman.emfa 13.2.1.0.0
Oracle Siebel oracle.sysman.empa 13.1.1.0.0
Oracle ORAchk Healthchecks oracle.sysman.orhc 13.1.1.0.0
Systems Infrastructure oracle.sysman.si 13.2.1.0.0
Oracle Exadata oracle.sysman.xa 13.2.1.0.0123456
./emcli list_plugins_on_agent -agent_names="172.25.224.2:3872"
The Agent URL is https://172.20.204.2:3872/emd/main/ -
Plug-in Name Plugin-id Version [revision]
Oracle Home oracle.sysman.oh 13.2.0.0.0
Oracle Database oracle.sysman.db 13.2.1.0.012345678910111213141516171819
./emcli create_blackout -name="db_blackout_phase1" -reason="patching" -add_targets="DBATEST:oracle_database" -schedule="duration:30"
Blackout "db_blackout_phase1" created successfully
emcli create_blackout -name="DBACLASS_MULTDB_BLACKOUT" -reason="psu patchcing" -add_targets="DBATEST1:oracle_database;DBATEST2:oracle_database" -schedule="duration:30"
./emcli create_blackout -name="DBACLASS_HOST_BLACKOUT" -reason="OS PATCHING OUTAGE" -add_targets="localhost.dbaclass.com:host" -schedule="duration:60" -propagate_targets
Blackout "DBACLASS_HOST_BLACKOUT" created successfully
emcli create_blackout -name="DBACLASS_RAC_BLACKOUT" -reason="Mainteneance" -add_targets="instance_name:oracle_database;cluster_name:rac_database" -schedule="duration:60"
./emcli get_blackout_details -name="BLACK_OUT_NAME"
./emcli get_blackout_details -name="db_blackout_phase1"
./emcli stop_blackout -name="db_blackout_phase1"
Blackout "db_blackout_phase1" stopped successfully
./emcli delete_blackout -name="db_blackout_phase1"
Blackout "db_blackout_phase1" deleted successfully123
./emcli delete_target -name="dbahost-local:3872" -type="oracle_emd" -delete_monitored_targets
Target "dbahost-local:3872:oracle_emd" deleted successfully12345678910111213141516171819
/data/app/oracle/oms13c/bin$ ./emcli stop_agent -agent_name="dbahost-local:3872" -host_username=oracle
Host User password:
The Shut Down operation is in progress for the Agent: dbahost-local:3872
The Agent "dbahost-local:3872" has been stopped successfully.
---------------------
Operation Output
---------------------
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.Stopping agent ... stopped.
./emcli start_agent -agent_name="dbahost-local:3872" -host_username=oracle
Host User password:
The Start Up operation is in progress for the Agent: dbahost-local:3872
The Agent "dbahost-local:3872" has been started successfully.
---------------------
Operation Output
---------------------
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.Starting agent ..................................... started.12345678
./emcli update_db_password -target_name="B2CCRMT2" -target_type="oracle_database" -user_name="dbsnmp" -change_at_target=yes
Enter value for old_password :
Enter value for new_password :
Enter value for retype_new_password :
Successfully submitted a job to change the password in Enterprise Manager and on the target database: "B2CCRMT2"
Execute "emcli get_jobs -job_id=50A66C2EF0EB6E7AE0540010E01F328C" to check the status of the job.
Search for job name "CHANGE_PWD_JOB_1496046676449" on the Jobs home page to check job execution details.Please to add comments
No comments yet. Be the first to comment!