Apr 5, 2016

EM Configuration issue.

bash-4.1$ emctl
EM Configuration issue. /opt/usr01/app/usr01/product/11.2.0/dbhome_1/<hostname>_orcl not found.

For above error saying missing _orcl directory, search for _orcl folder in your /opt/usr01/app/usr01/product/11.2.0/dbhome_1 and set the actual required hostname to ORACLE_HOSTNAME (typically It would be localhost)

bash-4.1$ export ORACLE_HOSTNAME=localhost
bash-4.1$ emctl (now works fine)
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
   Oracle Enterprise Manager 10g Database Control commands:
        emctl start | stop dbconsole
        emctl status | secure | setpasswd dbconsole
        emctl config dbconsole -heap_size <size_value> -max_perm_size <size_value>
       emctl status agent
       emctl status agent -secure [-omsurl <http://<oms-hostname>:<oms-unsecure-port>/em/*>]
       emctl getversion
       emctl reload | upload | clearstate | getversion agent
       emctl reload agent dynamicproperties [<Target_name>:<Target_Type>]....
       emctl config agent <options>
       emctl config agent updateTZ
       emctl config agent getTZ
       emctl resetTZ agent
       emctl config agent credentials [<Target_name>[:<Target_Type>]]
       emctl gensudoprops
       emctl clearsudoprops
 Blackout Usage :
       emctl start blackout <Blackoutname> [-nodeLevel] [<Target_name>[:<Target_Type>]].... [-d <Duration>]
       emctl stop blackout <Blackoutname>
       emctl status blackout [<Target_name>[:<Target_Type>]]....