oracle10g重建emdbcontrol

oracle 10g重建em db control.
1.drop configuration files and repository run :
emca -deconfig dbcontrol db -repos drop

2. logon sqlplus as user sys or system, and drop the sysman account and mangement objects:
a. drop user sysman cascade;
b. drop role mgmt_user;
c. drop user mgmt_view cascade;
d. drop public synonym mgmt_target_blackouts;
e. drop public synonym setemviewusercontext;

3.create configuration files and repository run
emca -config dbcontrol db -repos create

创建em时,提示的端口号,应为实例的断口号,比如1521,不是em的端口号(比如1158)
em的端口号在这个文件中可以查到10.2.0\db_1\sysman\config\emca.properties

然后,进行em后,界面出来了,但报了一个错:
java.lang.exception: exception in sending request :: null
很多功能不能用,提示重新登录.
在oracle论坛上查到了解决办法:

找到下面的文件
10.2.0\db_1\zyknet_orc2\sysman\config\emd.properties
其中的agenttzregion缺省是gmt,改为你所在的时区即可,例如:
agenttzregion=asia/chungking
关于时区的列表参考:10.2.0\db_1\sysman\admin\supportedtzs.lst
然后,重启oracledbconsole<sid>