Friday, July 17, 2009

Enterprise Manager Error


emctl start dbconsole 
fails and emdctl.trc has the following
Thread-4135626432 WARN  http: snmehl_connect: connect failed to
(hostname:3938): Connection refused (error = 111)

caused by agentTZRegion pointing to wrong timezone in file (more on metalink note 751634.1)

find a supporting timezone from $ORACLE_HOME/sysman/admin/supportedtzs.lst file

and set the TZ value with
 export TZ=time_zone
ORACLE_HOME/bin/emctl resetTZ agent

emctl start dbconsole

If emctl has never started, when trying to reset the TZ (more on metalink note 388280.1)

ERROR at line 1:
ORA-20233: Invalid agent name hostname:3938
ORA-06512: at "SYSMAN.MGMT_TARGET", line 3737
ORA-06512: at line 1
will occur. This could be confirmed with

select target_name, target_type from mgmt_targets;

To execute mgmt_target.set_agent_tzrgn procedure, there should be a target call 'oracle_emd' in table.

To fix this


and comment the agentTZRegion parameter in the AGENT_HOME/sysman/config/ file. Then reset the agent timezone and start again

emctl resetTZ agent
emdctl validateTZ agent
emctl start dbconsole

Even all of the above it may still not work and following described on the metalink note 821137.1 finally did the trick.

 grant execute on utl_smtp to public;
grant execute on utl_tcp to public;
grant execute on utl_file to public;
grant execute on dbms_sql to public;
grant execute on DBMS_OBFUSCATION_TOOLKIT to public;

2. Delete the files manually

3. create the dbcontrol again
emca -config dbcontrol db -repos create

More infor is available on following metalink notes

Note 278100.1 - How to Drop, Create and Recreate DBconsole in Database R2.
Note 750768.1 - Quick Guide to Avoid Issues in Creating DB Control Using EMCA.