MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Reconfigure Oracle EM

with 186 comments

One mistake can lead to a lot of work. When you’ve installed Oracle Database 11g, you can’t change the Windows Hostname without reinstalling Oracle Enterprise Manager. If you’re trying to resolve an ORACLE_UNQNAME problem, check another post of mine for that answer.

These are the steps:

1. Change the %ORACLE_HOME%\network\admin\listener.ora file from an IP number to machine name.

2. Change the %ORACLE_HOME%\network\admin\tnsnames.ora file from an IP number to a machine name.

3. Change the C:\WINDOWS\System32\drivers\etc\hosts file by adding this line beneath the default localhost line (for the new Hostname value):

127.0.0.1       localhost
172.16.113.128  mclaughlin11g mclaughlin11g.techtinker.com

4. Change the Windows hostname by navigating: Start > Control Panel > System (classic view) from the random assignment of VMWare Fusion.

5. Reboot the machine to set the networking. Unlock the SYSMAN account because it ensures that emca can drop it and all dependencies. Then, drop the em configuration with the following commands.

C:\Data> set ORACLE_SID=orcl
C:\Data> emca -deconfig dbcontrol db -repos drop

6. You’ll receive the following prompts, enter the Oracle SID and Port number without double quotes but you must enter all passwords with double quotes (at least in Oracle Database 11g):

Oracle Database 11gR1

STARTED EMCA at Jul 13, 2008 8:26:42 AM
EM Configuration Assistant, Version 11.1.0.5.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
 
Enter the following information:
Database SID: orcl
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y

Oracle Database 11gR2

STARTED EMCA at Sep 3, 2012 7:40:07 PM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
 
Enter the following information:
Database SID: orcl
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
 
Do you wish to continue? [yes(Y)/no(N)]: y

7. If you failed to unlock the SYSMAN account in step #5, you should drop the SYSMAN user manually. If you don’t drop the SYSMAN schema, you’ll raise an error when you try to recreate it:

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

The Java stack trace will look like this, more or less based on version and release:

at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1530)
at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeScript(SQLEngine.java:880)
at oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java
at oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java
at oracle.sysman.emcp.EMReposConfig.createRepository(EMReposConfig.java:492)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:218)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:147)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:222)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:535)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1215)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:519)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:468)

Drop the user and dependent on version a few other objects, like:

DROP USER sysman CASCADE;
DROP PUBLIC SYNONYM setemviewusercontext;
DROP ROLE mgmt_user;
DROP PUBLIC SYNONYM mgmt_target_blackouts;
DROP USER mgmt_view;

8. You can then create the em environment with the following syntax:

C:\Data> emca -config dbcontrol db -repos create

9. Again, you’ll receive the following prompts, enter the Oracle SID and Port number without double quotes but you must enter all passwords with double quotes (at least in Oracle Database 11g):

STARTED EMCA at Jul 13, 2008 8:28:48 AM
EM Configuration Assistant, Version 11.1.0.5.0 Production
Copyright (c) 2003, 2005, Oracle.  ALL rights reserved.
 
Enter the following information:
DATABASE SID: orcl
Listener port NUMBER: 1521
Password FOR SYS USER:
Password FOR DBSNMP USER:
Password FOR SYSMAN USER:
Password FOR SYSMAN USER: Email address FOR notifications (optional):
Outgoing Mail (SMTP) server FOR notifications (optional):
-----------------------------------------------------------------
 
You have specified the following settings
 
DATABASE ORACLE_HOME ................ C:\app\Administrator\product\11.1.0\db_1
 
LOCAL hostname ................ mclaughlin11g
Listener port NUMBER ................ 1521
DATABASE SID ................ orcl
Email address FOR notifications ...............
Outgoing Mail (SMTP) server FOR notifications ...............
 
-----------------------------------------------------------------
 
Do you wish TO continue? [yes(Y)/no(N)]: y

A note to me, remember haste makes waste. I’m just glad that rebuilding the MarkLogic server was easy.

Written by maclochlainn

July 13th, 2008 at 9:40 am

Posted in Uncategorized

186 Responses to 'Reconfigure Oracle EM'

Subscribe to comments with RSS or TrackBack to 'Reconfigure Oracle EM'.

  1. Hello maclochlainn,

    your procedure is good, I was trying to configure EMCA from many days :(. After following your steps I successfully configured it, Thanks 🙂

    I have doubts regarding the procedure…
    1) is it advisable/permissible to edit “System32” file?
    2) reboot a production server for changes to come in effect?

    Kindly clear my doubts as I configured on my local machine…
    thanks:)

    Mohib

    2 Apr 13 at 3:56 am

  2. You need to enter the IP resolution in the hosts file, but you don’t need to reboot the server for that to take effect.

    maclochlainn

    2 Apr 13 at 9:40 am

  3. Thanks. That worked for me too.

    Gaurav

    2 Apr 13 at 10:28 am

  4. Hi, i successfully configured in 1 system, but on my laptop it says I wont get configured… i will paste files for your reference, kindly help me out..

    actually i did procedure as mentioned by you, ie; drop, i did it, got errors then drop sysman etc then i created..

    Microsoft Windows [Version 6.2.9200]
    (c) 2012 Microsoft Corporation. All rights reserved.

    C:\Users\Mohib>set ORACLE_SID=oracle

    C:\Users\Mohib>emca -config dbcontrol db -repos create

    STARTED EMCA at Apr 7, 2013 2:39:55 PM
    EM Configuration Assistant, Version 11.1.0.5.0 Production
    Copyright (c) 2003, 2005, Oracle. All rights reserved.

    Enter the following information:

    Database SID: oracle
    Database Control is already configured for the database oracle
    You have chosen to configure Database Control for managing the database oracle
    This will remove the existing configuration and the default settings and perform
     a fresh configuration
    Do you wish to continue? [yes(Y)/no(N)]: yes
    Listener port number: 1521
    Password for SYS user:
    Password for DBSNMP user:
    Password for SYSMAN user:
    Password for SYSMAN user: Email address for notifications (optional):
    Outgoing Mail (SMTP) server for notifications (optional):
    -----------------------------------------------------------------
     
    You have specified the following settings
     
    Database ORACLE_HOME ................ F:OracleappMohibproduct11.1.0db_1
     
    Local hostname ................ hppc
    Listener port number ................ 1521
    Database SID ................ oracle
    Email address for notifications ...............
    Outgoing Mail (SMTP) server for notifications ...............
     
    -----------------------------------------------------------------
    Do you wish to continue? [yes(Y)/no(N)]: yes
    Apr 7, 2013 2:40:21 PM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at F:OracleappMohibcfgtoollogsemcaoracleemca_2013_04_07_14_39_5.log.
    Apr 7, 2013 2:40:22 PM oracle.sysman.emcp.util.FileUtil backupFile
    WARNING: Could not backup file F:OracleappMohibproduct11.1.0db_1sysmanconfigemd.properties
    Apr 7, 2013 2:40:22 PM oracle.sysman.emcp.util.FileUtil backupFile
    WARNING: Could not backup file F:OracleappMohibproduct11.1.0db_1sysmanconfigemoms.properties
    Apr 7, 2013 2:40:22 PM oracle.sysman.emcp.util.FileUtil backupFile
    WARNING: Could not backup file F:OracleappMohibproduct11.1.0db_1sysmanemdtargets.xml
    Apr 7, 2013 2:40:23 PM oracle.sysman.emcp.util.DBControlUtilstopOMS
    INFO: Stopping Database Control (this may take a while) ...
    Apr 7, 2013 2:40:23 PM oracle.sysman.emcp.EMReposConfig createRepository
    INFO: Creating the EM repository (this may take a while) ...
    Apr 7, 2013 2:42:27 PM oracle.sysman.emcp.EMReposConfig invoke
    SEVERE: Error creating the repository
    Apr 7, 2013 2:42:27 PM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Refer to the log file at F:OracleappMohibcfgtoollogsemcaoracleemca_
    repos_create_.log for more details.
    Apr 7, 2013 2:42:27 PM oracle.sysman.emcp.EMConfig perform
    SEVERE: Error creating the repository
    Refer to the log file at F:OracleappMohibcfgtoollogsemcaoracleemca_2013_04_07_14_39_55.log for more details.
    Could not complete the configuration. Refer to the log file at F:OracleappMohibcfgtoollogsemcaoracleemca_2013_04_07_14_39_55.log for more details.
    #################hosts file#############
    localhost name resolution is handled within DNS itself.
    #	127.0.0.1       localhost
    #	172.16.113.128  mclaughlin11g mclaughlin11g.techtinker.com
    ###################listener.ora###########
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
          (ADDRESS = (PROTOCOL = TCP)(HOST = hppc)(PORT = 1521))
        )
      )
     
    ##############tnsnames.ora############
    ORACLE =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = hppc)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = oracle)
        )
      )
     
    LISTENER_ORACLE =
      (ADDRESS = (PROTOCOL = TCP)(HOST = hppc)(PORT = 1521))

    if any more info needed plz let me know….

    Mohib

    7 Apr 13 at 3:21 am

  5. Mohib, It appears that it fails on configuration of the Windows Oracle Service. Did you attempt a previous installation? If so, you need to recover a prior registry and try again. You should always backup your registry before installing Oracle because if something goes one the registry doesn’t get properly cleaned up. A damaged registry would cause a failure like the you’ve encountered.

    maclochlainn

    7 Apr 13 at 11:00 am

  6. yes i had tried to configure EM before…ok so what should i do next?

    Mohib

    7 Apr 13 at 11:45 am

  7. Unfortunately, if you didn’t keep a backup of the Windows Registry, you should re-install the Windows Operating System or manually cleanup all residual Oracle values from the Windows Registry.

    maclochlainn

    7 Apr 13 at 2:33 pm

  8. its better to try with Oracle values in windows registry rather than reinstalling windows….ok “cleanup all residual Oracle values from the Windows Registry” in the sense should i deinstall oracle and again reinstall(with deleting oracle respective folder in windows registry)?
    thanks for your patience 🙂

    Mohib

    8 Apr 13 at 12:11 am

  9. Yes, if you’re going to cleanup the registry you should first try to uninstall Oracle, and then delete all the physical files. After that, you should cleanup the registry.

    maclochlainn

    8 Apr 13 at 12:19 am

  10. Thanks 🙂 it worked!! just deleted everything of Oracle (2 DB’s) n removed Oracle folder from registry n then installed fresh Oracle, got the “EM URL” after setup/installation was complete 😉

    Mohib

    8 Apr 13 at 8:56 pm

  11. Just finished a fresh 11gr2 install on Windows 7 32 bit. Static IP prior to dbms install seems to be critical. The web connection to default ORCL db works fine (1158) but I can’t connect to my one locally created (5500) db. Just doesn’t want to find anything at that port. This is not the certificate error – just can’t find it. Any ideas? Thanks.

  12. I’m having problems with step 6. There is an exception being thrown when I try to enter my SYS password. See below. I’m a novice when it comes to DBA activities, but trying to learn, so let me know if you need any other information from me.

    STARTED EMCA at May 8, 2013 5:13:01 PM
    EM Configuration Assistant, Version 11.2.0.0.2 Production
    Copyright (c) 2003, 2005, Oracle.  All rights reserved.
     
    Enter the following information:
    Database SID: ldemodb
    Listener port number: 1521
    Password for SYS user:
    Password for SYS user: Exception in thread "main" java.lang.NoClassDefFoundError: HTTPClient/ProtocolNotSuppException
            at oracle.sysman.emd.targetIntg.agent.AgentTargetInstaller.(AgentTargetInstaller.java:235)
            at oracle.sysman.emcp.target.TargetManager.getAgentTargetInstaller(TargetManager.java:1008)
            at oracle.sysman.emcp.target.TargetManager.getLocalHost(TargetManager.java:1033)
            at oracle.sysman.emcp.ParamsManager.getLocalHost(ParamsManager.java:1037)
            at oracle.sysman.emcp.ParamsManager.getHost(ParamsManager.java:3020)
            at oracle.sysman.emcp.DatabaseChecks.validateUserCredentials(DatabaseChecks.java:1066)
            at oracle.sysman.emcp.ParamsManager.validatePassword(ParamsManager.java:3417)
            at oracle.sysman.emcp.EMConfigAssistant.promptForData(EMConfigAssistant.java:701)
            at oracle.sysman.emcp.EMConfigAssistant.promptForParams(EMConfigAssistant.java:2979)
            at oracle.sysman.emcp.EMConfigAssistant.displayWarnsAndPromptParams(EMConfigAssistant.java:3008)
            at oracle.sysman.emcp.EMConfigAssistant.getDisplayAndPromptWarnsParms(EMConfigAssistant.java:3033)
            at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1397)
            at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:574)
            at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:522)

    Charlie

    8 May 13 at 3:46 pm

  13. Are you on Windows Home edition? It appears you can’t create a socket, which would point to missing network components in the OS or a network setup problem.

    maclochlainn

    9 May 13 at 8:19 am

  14. Dear maclochlainn
    Well l managed to figure out why em was failing to configure.The issue in the installation of the database.There are three options (General purpose/tra.., custom and warehouse..) if you choose the default, em will not be installed properly, but if you choose general purpose option it will install em perfectly.

    Good day

    Ngoni

    18 Jul 13 at 12:40 am

  15. I am using Windows Server 2012 with Oracle 11gR2
    each time I tried configuring the EM with orcl db I keep getting Severe: Error loading TransX: Socket read timed out. Every other thing works fine save the enterprise manager configuration.

    Interestly, this problem didn’t occur when my server was just a normal server. I promoted the machine to a primary domain controller and reinstall Oracle, then appeared the problem. my domain take structure “my-local.local”, so the full computer name is like “machine.my-local.local”

    I saw an article on Oracle forum on similar error, and it was resolved by setting the hosts file and turning firewall off. I tried that but no head way.

    I then saw your post, and follow the procedures but yet again, to no avail. Please kindly help

    Damilola

    21 Jul 13 at 1:23 pm

  16. Damilola, How much real memory is available to Windows?

    maclochlainn

    26 Jul 13 at 2:25 pm

  17. i have a issue while login during OEM internal error

    adnan

    3 Aug 13 at 2:45 am

  18. Adnan, An internal error? Do you mean an ORA-00600 or an OEM error?

    maclochlainn

    3 Aug 13 at 3:20 pm

  19. I am running Oracle 11gR2 on Windows 2003. I have followed the steps above multiple times, and am able to drop and create ok, get a fail to start dbconsole at the end. After that, when I try “emctl start dbconsole”, it takes forever (with bunch of dots output) and then fails.

    Looking at the emagent.log and emagent.trc, it looks like it’s trying to connect to https://:5500/em/etc., BUT, nothing is listening on port 5500!

    This is a pretty much out-of-box Oracle installation.

    Is there some bug that is causing it to try to connect to port 5500 vs. 1158, or is there a step to configure it to use 1158 vs. 5500?

    I’ve search support.oracle.com, but didn’t find anything.

    Thanks,
    Jim

    ohaya

    5 Oct 13 at 11:13 am

  20. Ohaya, check whether the service ever starts. If not, verify your network settings and configurations.

    maclochlainn

    12 Oct 13 at 9:22 pm

  21. Thanks so much!!! I lost during one day for solution this problem.

    Dop

    15 Nov 13 at 9:49 pm

  22. it did the thank you very much

    peter

    22 Nov 13 at 7:28 am

  23. it did the work

    peter

    22 Nov 13 at 7:30 am

  24. thanks, very helpful

    arifdeni

    3 Dec 13 at 6:46 pm

  25. Hello sir I am new in DBA career
    so i installed OEL 5.5 on virtual machine and
    have set the setting as you said and droped the sysman and its related components and again tried to install the dbconsole but i got the error as :

    Dec 27, 2013 12:12:59 PM oracle.sysman.emcp.EMReposConfig createRepository
    INFO: Creating the EM repository (this may take a while) ...
    Dec 27, 2013 12:24:16 PM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Repository successfully created
    Dec 27, 2013 12:25:28 PM oracle.sysman.emcp.EMReposConfig invoke
    SEVERE: Failed to unlock all EM-related accounts
    Dec 27, 2013 12:25:28 PM oracle.sysman.emcp.EMConfig perform
    SEVERE: Failed to unlock all EM-related accounts
    Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/ora11g/emca_2013_12_27_12_12_06.log for more details.
    Could not complete the configuration. Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/ora11g/emca_2013_12_27_12_12_06.log for more details.

    So i again tried to use the reconfigure the database with the dbca but it said failed to create the em due to error null so try executing manually emca

    please any one can help what is going on
    i have wasted more then 2 days for this

    dralmost

    26 Dec 13 at 11:59 pm

  26. Dralmost, I assume you’ve fixed it. To help you more, I need to see the relevant and “referred to” log file.

    maclochlainn

    31 Dec 13 at 2:10 pm

  27. I am seeing thr below errors in SYSMAN log even after recreating the DBCONSOLE dropping and creating it again…..

    Not sure if it has something to do with listener…

    2014-02-07 10:38:32,247 [EMUI_10_38_32_/console/rac/racSitemap] ERROR rac.services updateServerPoolsInfo.210 - Server pool information could not be upda
    ted. Existing pool information maybe inaccurate.
    2014-02-07 10:38:32,248 [EMUI_10_38_32_/console/rac/racSitemap] ERROR rac.services updateServerPoolsInfo.210 - Server pool information could not be upda
    ted. Existing pool information maybe inaccurate.
    2014-02-07 10:39:33,698 [EMUI_10_39_33_/console/rac/racSitemap] ERROR db.rac setDatabaseType.2682 - Could not retrieve Database Type information. Settin
    g it to NONE. Exception: ORA-20206:
    ORA-06512: at "SYSMAN.EMD_RAC", line 2617
    ORA-01403: no data found
    ORA-06512: at line 1
     
    2014-02-07 10:39:33,718 [EMUI_10_39_33_/console/rac/racSitemap] ERROR rac.services updateServerPoolsInfo.210 - Server pool information could not be upda
    ted. Existing pool information maybe inaccurate.
    2014-02-07 10:39:33,719 [EMUI_10_39_33_/console/rac/racSitemap] ERROR rac.services updateServerPoolsInfo.210 - Server pool information could not be upda
    ted. Existing pool information maybe inaccurate.

    Ramita Garg

    7 Feb 14 at 9:10 am

  28. Take a look at this discussion. This is typically an agent process not an Oracle listener.

    maclochlainn

    8 Feb 14 at 12:34 pm

  29. Very Nice document. I was facing this issue from a long time.

    Ali

    12 Mar 14 at 6:54 am

  30. Thanks a lot. It worked for me.

    Priyanka Gupta

    26 Oct 14 at 11:40 pm

  31. Thank you. It helped me too.

    Satya

    4 Mar 15 at 2:40 pm

  32. Hi. dbconsole won’t run on my Windows 65 bit machine running 11g. I’ve tried the emca -deconfig, drops, whatever. They ALL fail also saying they can’t access the instance. Instance and db are running fine — I just can’t use EM. They were working yesterday and I’ve spent over 4 hours today trying everything that works for everybody else and all I get is failures.

    I can’t believe that this problem has been around for over 6 years without a hard fix being implemented. Further I can’t believe that the fix requires a complete de-installation of Oracle!!!!!

    If there is a fix out there, it is buried so far in the noise of everybody else having the same problem and failing at the same solutions everywhere.

    I can’t spend the rest of my life trying to get something as simple as EM to run. I give up. A re-install is faster than searching all these forums with guesses that never work.

    BTC

    5 Mar 15 at 9:26 pm

  33. Bill, I can empathize with your pain. I should update this with a newer post. What version are you running?

    maclochlainn

    20 Mar 15 at 12:59 am

  34. Start cmd as administrator and then execute command to create em repo.

    C:\Data> emca -config dbcontrol db -repos create

    ali raza

    15 Oct 15 at 3:51 am

  35. After running the command:

    C:Userspc> emca -config dbcontrol db -repos create

    Getting error below. Please help me

    Do you wish to continue? [yes(Y)/no(N)]: Y
    Apr 11, 2017 9:54:57 AM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at C:apporaclecfgtoollogsemcaprodccrsemca_2017_04_11_09_52_10.log.
    Apr 11, 2017 9:54:58 AM oracle.sysman.emcp.EMReposConfig createRepository
    INFO: Creating the EM repository (this may take a while) ...
    Apr 11, 2017 9:58:30 AM oracle.sysman.emcp.EMReposConfig invoke
    SEVERE: Error creating the repository
    Apr 11, 2017 9:58:30 AM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Refer to the log file at C:apporaclecfgtoollogsemcaprodccrsemca_repos_create_.log for more details.
     
    Apr 11, 2017 9:58:30 AM oracle.sysman.emcp.EMConfig perform
    SEVERE: Error creating the repository
    Refer to the log file at C:apporaclecfgtoollogsemcaprodccrsemca_2017_04_11_09_52_10.log for more details.
    Could not complete the configuration. Refer to the log file at C:apporaclecfgtoollogsemcaprodccrsemca_2017_04_11_09_52_10.log for more details.

    Stanley

    10 Apr 17 at 8:05 pm

Leave a Reply