Pages

Thursday 23 February 2012

Oracle 10g EM dbconsole configuration failed with ORA-20001: SYSMAN already exists

While creating dbconsole repository(Oracle Managament repository)  for configuring db console using below command, it fails with error as
"oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-20001: SYSMAN already exists"


#> ./emca -repos create

STARTED EMCA at Feb 23, 2012 10:15:00 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: TESTDB
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:

Do you wish to continue? [yes(Y)/no(N)]: y
Feb 23, 2012 10:20:45 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /orasw/app/oracle/product/10.2.0.3/cfgtoollogs/emca/ TESTDB/emca_2012-02-23_10-15-00-PM.log.
Feb 23, 2012 10:20:48 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Feb 23, 2012 10:20:48 PM oracle.sysman.emcp.EMReposConfig invoke
SEVERE: Error creating the repository
Feb 23, 2012 10:20:48 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Refer to the log file at /orasw/app/oracle/product/10.2.0.3/cfgtoollogs/emca/ TESTDB/emca_repos_create_.log for more details.
Feb 23, 2012 10:20:48 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Error creating the repository
Refer to the log file at /orasw/app/oracle/product/10.2.0.3/cfgtoollogs/emca/ TESTDB/emca_2012-02-23_10-15-00-PM.log for more details.
Could not complete the configuration. Refer to the log file at /orasw/app/oracle/product/10.2.0.3/cfgtoollogs/emca/ TESTDB/emca_2012-02-23_10-15-00-PM.log for more details.
= TESTDB-SANGAM Shared DB server = oracle@testdb.sangam.com /orasw/app/oracle/product/10.2.0.3/bin

When we checked in log /orasw/app/oracle/product/10.2.0.3/cfgtoollogs/emca/ TESTDB/emca_2012-02-23_10-15-00-PM.log, it's found that


Feb 23, 2012 10:20:48 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Feb 23, 2012 10:20:48 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

        at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1467)
        at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeScript(SQLEngine.java:841)
        at oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java:265)
        at oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java:306)
        at oracle.sysman.emcp.EMReposConfig.createRepository(EMReposConfig.java:389)
        at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:191)

Reason:SYSMAN is the user for the dbconsole user and it is already present in your database.During the repository creation the SYSMAN user gets created. 

SQL> select username from dba_users where username='SYSMAN';

USERNAME
------------------------------
SYSMAN

Since it's already exists, it's not allowing you to proceed.

The second reason might be the dbconsole repository is already created in your database.You have to configure the dbconsole from the created repository. 

Solution 

 Drop the existing Oracle Management repository and recreate it as below.

Drop the existing repository as below

#> ./emca -deconfig dbcontrol db -repos drop

STARTED EMCA at Feb 23, 2012 10:27:57 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID:TESTDB
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:

Do you wish to continue? [yes(Y)/no(N)]: y
Feb 23, 2012 10:28:27 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /orasw/app/oracle/product/10.2.0.3/cfgtoollogs/emca/ TESTDB/emca_2012-02-23_10-27-57-PM.log.
Feb 23, 2012 10:28:31 PM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration
WARNING: EM is not configured for this database. No EM-specific actions can be performed.
Feb 23, 2012 10:28:31 PM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...


Note: This will drop the SYSMAN user
SQL> select * from dba_users where username='SYSMAN';

no rows selected

SQL> exit

Create the new Oracle Management repository as below

#> ./emca -repos create

STARTED EMCA at Feb 23, 2012 10:32:43 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: TESTDB
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:

Do you wish to continue? [yes(Y)/no(N)]: y
Feb 23, 2012 10:33:04 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /orasw/app/oracle/product/10.2.0.3/cfgtoollogs/emca/ TESTDB/emca_2012-02-23_10-32-43-PM.log.
Feb 23, 2012 10:33:07 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Feb 23, 2012 10:35:20 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Enterprise Manager configuration completed successfully
FINISHED EMCA at Feb 23, 2012 10:35:20 PM

SQL> select username from dba_users where username='SYSMAN';

USERNAME
------------------------------
SYSMAN


3 comments:

  1. emca -config dbcontrol db
    ----------------------------------
    error
    ------------------------------
    oracle.sysman.emcp.EMConfig perform
    CONFIG: Stack Trace:
    oracle.sysman.emcp.exception.EMConfigException: Erreur lors du dأ�marrage de Database Control
    at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:646)
    at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:224)
    at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:193)
    at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:184)
    at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:486)
    at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1142)
    at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:470)
    at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:419)

    ReplyDelete
  2. after this step service got created ut unable to start. error :cannot locate the path specified

    ReplyDelete
    Replies
    1. Latha, Did you set environment variables. Can you paste complete error.

      Delete