http://blog.itpub.net/14941137/viewspace-660514/
今天在安装11g(11.1.0.7.0)数据库之后,通过emca -config dbcontrol db -repos create 命令手工创建em的时候报错,查看日志后发现有以下错误:
CONFIG: Spooling to C:\app\Administrator\cfgtoollogs\emca\orcl\emca_repos_create_2009_01_16_06_44_13.log
Jan 16, 2009 6:44:13 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jan 16, 2009 6:44:13 AM oracle.sysman.emcp.EMReposConfig createRepository
CONFIG: ORA-20001: SYSMAN already exists..
ORA-06512: at line 17
oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-20001: SYSMAN already exists..
ORA-06512: at line 17
Jan 16, 2009 6:44:13 AM oracle.sysman.emcp.EMReposConfig invoke
SEVERE: Error creating the repository
Jan 16, 2009 6:44:13 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Refer to the log file at C:\app\Administrator\cfgtoollogs\emca\orcl\emca_repos_create_.log for more details.
Jan 16, 2009 6:44:13 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Error creating the repository
Refer to the log file at C:\app\Administrator\cfgtoollogs\emca\orcl\emca_2009_01_16_06_43_53.log for more details.
Jan 16, 2009 6:44:13 AM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: Error creating the repository
经过同事提醒,才知道自己犯了一个很白痴的错误,在手工创建EM之前,需要先要删除EM配置信息:
具体操作如下:
1、使用emca -deconfig dbcontrol db命令删除配置
2、使用emca -repos drop删除repository
3、使用emca -config dbcontrol db -repos create 创建Database Control。
以上操作,也适用于10g