Find us on Google+ Google+

January 8, 2010

emctl commands

EMCTL:   -- Enterprise Manager Control, in Oracle


EMCTL @ normal (Oracle Management) Agent
emctl start agent
./emctl start agent
emctl stop agent
./emctl stop agent
emctl status agent

emctl status agent -secure [-omsurl http://oms-hostname:oms-unsecure-port/em/*]
./emctl status agent
./emctl status agent cpu -depth 10

emctl upload agent
./emctl upload agent
emctl reload agent
emctl reload agent dynamicproperties [Target_name:Target_Type]....
./emctl reload agent
./emctl reload agent dynamicproperties

emctl clearstate agent
./emctl clearstate agent
emctl config agent options_options
emctl config agent updateTZ
emctl config agent getTZ
emctl config agent credentials [Target_name[:Target_Type]]
./emctl config agent listtargets
emctl resetTZ agent
emctl relocate_target agent target_name target_type [name1=value1]* [-force]

emctl getversion
emctl getversion agent
emctl dumpstate agent component_name . . .
emctl gensudoprops
emctl clearsudoprops
emctl switchOMS repos_Url
emctl verifykey
emctl verifykey

emctl start blackout Blackout_name [-nodeLevel] [Target_name[:Target_Type]].... [-d Duration_in_days] [-nowait]
./emctl start blackout blk
./emctl start blackout blk -nodeLevel
./emctl start blackout blk -nodeLevel -d 3:00
emctl stop blackout Blackout_name [-nowait]
./emctl stop blackout blk
emctl status blackout [Target_name[:Target_Type]]....
./emctl status blackout

emctl getemhome
emctl ilint
emctl annotateconfigfiles agent [template_files_dir config_files_dir]
emctl start subagent
emctl stop subagent
emctl status subagent

emctl secure agent [registration password] [-emdWalletSrcUrl url]
emctl secure agent -emdWalletSrcUrl  https://example.com:4900/empbs/upload
emctl unsecure agent
emctl secure add_trust_cert -trust_certs_loc loc
emctl secure add_trust_cert_to_jks [-password password -trust_certs_loc loc -alias alias]

emctl start dbconsole
emctl stop dbconsole
emctl status dbconsole

emctl secure dbconsole
emctl secure status dbconsole
emctl secure dbconsole -sysman_pwd sysman_password [-passwd_file passwordfile_location] [-host hostname] [-sid service_name] [-reset]
 [-secure_port secure_port] [-root_dc root_dc] [-root_country root_country] [-root_state root_state] [-root_loc root_loc] 
 [-root_org root_org] [-root_unit root_unit] [-root_email root_email]
emctl unsecure dbconsole
emctl setpasswd dbconsole

emctl config emkey -emkeyfile emkey.ora_path [-force] [-sysman_pwd sysman_password]
emctl config emkey -emkey [-emkeyfile emkey.ora_path] [-force] [-sysman_pwd sysman_password]
emctl config emkey -repos [-emkeyfile emkey.ora_path] [-force] [-sysman_pwd sysman_password]
emctl config emkey -remove_from_repos [-sysman_pwd sysman_password]
emctl config emkey -copy_to_repos [-sysman_pwd sysman_password]
emctl status emkey [-sysman_pwd sysman_password]
emctl status emkey

emctl upgrade -cluster

EMCTL @ (Oracle Management) Agent on OMS server



emctl start | getversion oms    -- OMS -> Oracle Management Server
./emctl start oms
./emctl start oms -all

emctl stop oms [-all] [-force] 
./emctl stop oms
./emctl stop oms -all
./emctl stop oms -all -force

emctl status oms
emctl status oms -details
./emctl status oms
emctl status oms -details

emctl config oms sso -host ssoHost -port ssoPort -sid ssoSid -pass ssoPassword -das dasURL -u user
       emctl config oms loader -shared -dir [-sysman_pwd ]
       emctl config oms -list_repos_details
       emctl config oms -store_repos_details (-repos_host -repos_port -repos_sid | -repos_conndesc ) -repos_user [-repos_pwd ] [-no_check_db]
             Connect descriptor should be enclosed in quotes. eg: '""' or "''"
       emctl config oms -change_repos_pwd [-change_in_db] [-old_pwd ] [-new_pwd ] [-use_sys_pwd [-sys_pwd ]] 
           -change_in_db This option will change in repository too. If not specified, only Credential Store will be updated
       emctl config oms -change_repos_pwd
       emctl config oms -change_view_user_pwd [-sysman_pwd ] [-user_pwd ] [-auto_generate]
           -auto_generate This option will generate random password.
       emctl getmessagedetails oms -id=[EM-]#####
emctl pingOMS

Register Targettype Usage : 
emctl register oms targettype [-o ] [ ] OR 
emctl register oms targettype [-o ] [

The provided must be the xml file name with the absolute path and not with relative path.
The will be prompted if not provided on the command line.
-o option generates the SQL file into the and does not register the target type into the repository. Hence repository details and -o option are exclusive and cannot be passed simultaneously.
should have file extension as '.sql'.
EM Key Commands Usage : 
emctl status emkey [-sysman_pwd ]
emctl config emkey -copy_to_credstore [-sysman_pwd ]
emctl config emkey -copy_to_repos [-sysman_pwd ]
emctl config emkey -remove_from_repos [-sysman_pwd ]
emctl config emkey -copy_to_file_from_credstore -admin_host -admin_port -admin_user [-admin_pwd ] [-repos_pwd ] -emkey_file
emctl config emkey -copy_to_file_from_repos (-repos_host -repos_port -repos_sid | -repos_conndesc ) -repos_user [-repos_pwd ] [-admin_pwd ] -emkey_file
emctl config emkey -copy_to_credstore_from_file -admin_host -admin_port -admin_user [-admin_pwd ] [-repos_pwd ] -emkey_file
emctl config emkey -copy_to_repos_from_file (-repos_host -repos_port -repos_sid | -repos_conndesc ) -repos_user [-repos_pwd ] [-admin_pwd ] -emkey_file

Secure OMS Usage : 
emctl secure oms [-sysman_pwd ] [-reg_pwd ]
[-host ] [-slb_port ] [-slb_console_port ]
[-reset] [-console] [-lock] [-lock_console] [-secure_port ] [-upload_http_port ]
[-root_dc ] [-root_country ] [-root_email ]
[-root_state ] [-root_loc ] [-root_org ] [-root_unit ]
[-wallet -trust_certs_loc ] [-wallet_pwd ]
[-key_strength ] [-cert_validity ] [-protocol ]
Valid values for are the allowed values for Apache's SSLProtocol directive
emctl secure oms -host oemoms
emctl secure setpwd [authpasswd] [newpasswd]
emctl secure setpwd
emctl secure setpwd pwd newpwd
emctl secure sync
emctl secure lock [-sysman_pwd ] [-console] [-upload]
emctl secure lock -console
emctl secure unlock [-sysman_pwd ] [-console] [-upload]
emctl secure unlock -console
emctl secure console -wallet [-wallet_pwd ]
emctl secure create_admin_creds_wallet [-admin_pwd ] [-nodemgr_pwd ]

Dump Usage : 
emctl dump omsthread 
emctl dump [-log] repos OR 
emctl dump [-log] repos  

EM Connector Commands Usage : 
emctl register_connector connector [-dd ] [-repos_pwd ]
-dd Connector Deployment Descriptor File(full path)
-repos_pwd Enterprise Manager Root (SYSMAN) Password

emctl register_template connector [-t
-t Template(full path)
-repos_pwd Enterprise Manager Root (SYSMAN) Password
-ctname Connector Type Name
-cname Connector Name
-iname Template Internal Name
-tname Template Name Displayed
-ttype Template Type
1 - inbound transformation
2 - outbound transformation
3 - XML outbound transformation
-d Description

emctl extract_jar connector [-jar ] [-cname ]
-jar Connector Jar File(full path)
-cname Connector Name

HAConfig Commands Usage: 

emctl exportconfig oms [-sysman_pwd
      [-dir ]     Specify directory to store backup file 
      [-oms_only]             Specify OMS-only backup on Admin Server host 
      [-keep_host]            Specify to backup hostname if no slb defined 
                              (Use this option only if recovery will be done on machine that responds to this hostname)
emctl exportconfig oms -dir  
emctl importconfig oms [-sysman_pwd ] [-reg_pwd
      -file     Required backup file to import from 
      [-no_resecure]          Specify not to resecure oms after import (default is to resecure after import) 
emctl config emrep [-sysman_pwd
      [-agent ]    Specify new destination agent for emrep target 
      [-conn_desc []] 
                              Update Connect Descriptor with value if specified, else from value stored in emoms.properties 
emctl config repos [-sysman_pwd
      [-agent ]    Specify new destination agent for repository target 
      [-host ]      Specify new hostname for repository target 
      [-oh ] Specify new OracleHome for repository target 
      [-conn_desc []] 
                              Update Connect Descriptor with value if specified, else from value stored in emoms.properties 
emctl enroll oms [-as_host ] Specify admin server to enroll the oms 
                 [-as_port ] Specify admin server secure port 
                 [-as_pwd ] Specify admin server password 
                 [-nm_pwd ] Specify nodemanager password 

Following Commands Valid on NT Only: 
emctl create service [-user ] [-pwd ] -name     Name of service to be created 
emctl delete service -name     Name of service to be deleted 

Emctl Resync Commands Usage:
       emctl resync repos (-full|-agentlist "agent names") [-name "resync name"] [-sysman_pwd "sysman password"]
       emctl abortresync repos (-full|-agentlist "agent names") -name "resync name" [-sysman_pwd "sysman password"]
       emctl statusresync repos -name "resync name"

Emctl Configuration management Commands Usage:
       emctl get property [-sysman_pwd "sysman password"] -name
emctl get property -name oracle.sysman.core.notification.short_format_length
emctl get property -name admin_groups_height_limit
       emctl set property [-sysman_pwd "sysman password"] -name -value [-module (default emoms)]
       emctl set property [-sysman_pwd "sysman password"] -file [-module (default emoms)]
./emctl set property -name "em.security.auth.autoprovisioning" -value "true"
emctl set property -name oracle.sysman.core.notification.os_cmd_timeout value 30
emctl set property -name oracle.sysman.core.notification.short_format -value both
       emctl delete property [-sysman_pwd "sysman password"] -name
       emctl list properties [-sysman_pwd "sysman password"] [-module ]

Partool Commands Usage : 

       emctl partool -parFile -force(optional)
       emctl partool -parFile -force(optional) -ssPasswd
       emctl partool -parDir



-force(optional)
       emctl partool export -guid -file -displayName -description -metadataOnly(optional)
       emctl partool check
       emctl partool help

  -repPasswd           Repository Password
  -force                           force the swlib entities to be created/reuploaded, if already present creates a new revision
  -check                           check if Software Library is configured
  -file                     PAR file
  -verbose                         verbose mode
  -help                            display this help message
  -displayName       PAR file name
  -parDir


                    Directory where par files are located
  -metadataOnly                    flag for metadata-only exports
  -guid                     Procedure GUID to export. To export multiple procedures provide the GUIDs separated by "," 
  -parFile                   path of par file
  -description       PAR file description
  -ssPasswd   is optional. An Oracle Wallet is created with specified password to store the value of the secret property in the exported software library entity. User must use the same password while importing the PAR file in a new repository.

./emctl control agent runCollection :oracle_exadata_hc ExadataResults

emctl listplugins agent -type all

Related Articles: emca commands emcli commands 
opatchauto utility