ORA-20001错误

来源:互联网 发布:苹果原装数据线淘宝 编辑:程序博客网 时间:2024/04/28 19:21

APPLIES TO:

Enterprise Manager for Oracle Database - Version 10.1.0.2 to 11.2.0.3 [Release 10.1 to 11.2]
Information in this document applies to any platform.
***Checked for relevance on 16-Feb-2013***

SYMPTOMS

While executing the Enterprise Manager Configuration Assistant (EMCA) command (emca -config dbcontrol db -repos create) to create the DBConsole repository, the following error is reported to the screen:-

Do you wish to continue? [yes(Y)/no(N)]: yes
<timestamp> oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at <ORACLE_HOME>\cfgtoollogs\emca\<sid>\emca_<timestamp>.log.
<timestamp> oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
<timestamp> oracle.sysman.emcp.EMReposConfig invoke
SEVERE: Error creating the repository
<timestamp> oracle.sysman.emcp.EMReposConfig invoke
INFO: Refer to the log file at <ORACLE_HOME>\cfgtoollogs\emca\<sid>\emca_repos_create_<date>.log for more details.
<timestamp> oracle.sysman.emcp.EMConfig perform
SEVERE: Error creating the repository
Refer to the log file at <ORACLE_HOME>\cfgtoollogs\emca\<sid>\emca_<timestamp>.log for more details.
Could not complete the configuration. Refer to the log file at <ORACLE_HOME>\cfgtoollogs\emca\<sid>\emca\
emca_<timiestamp>.log for more details


in $ORACLE_HOME/cfgtoollogs/emca/<sid>/emca_<timestamp>.log (10.2.X) or $ORACLE_BASE/cfgtoollogs/emca/<sid>/emca_<timestamp>.log (11.x), the following can be seen:-

INFO: Creating the EM repository (this may take a while) ...
May 25, 2010 2:21:30 PM 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

SEVERE: Error creating the repository
May 25, 2010 2:21:30 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Refer to the log file at <ORACLE_HOME>/cfgtoollogs/emca/<sid>/emca_repos_create_<date>.log for more details.


emca_repos_create_<date>.log shows

DECLARE
*
ERROR at line 1:
ORA-20001: SYSMAN already exists..
ORA-06512: at line 17

CAUSE

This is caused by the fact that the DBConsole repository already exists for this database.  This can also sometimes be seen if the dbconsole has been previously dropped (including the repository), but for some reason the SYSMAN account may not have been completely removed as part of the drop process.

SOLUTION

1.  Since the repository already exists, it is only necessary to create the configuration files using:-

emca -config dbcontrol db

and provide answers to the prompts.

2.  Alternatively,  if it is deemed preferrable to create a fresh dbconsole,  the existing dbconsole repository (including sysman schema) needs to be dropped first. To drop the existing repository please follow below steps. 

a. Drop the existing repository

emca -deconfig dbcontrol db -repos drop


For more details Refer Note 278100.1  How To Drop, Create And Recreate DB Control In A 10g Database . Repository can be dropped either using above emca command or manually as explained in <>

Note : Above emca -drop command requires the database to be quiesced. This means that, temporarily, no operations are possible on the database and new users cannot login. 
Refer Note 375946.1 Running EMCA Results in Database quiesce And No New Connections or Operations Can Be Performed During the DB Control Repository Creation


b. Once the DBconsole repository is dropped run the emca command to create the dbconsole 

emca -config dbcontrol db -repos create


原创粉丝点击