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>