Reconfigure Oracle EM
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.
Is it connecting to a single instance, or multiple instances? It appears from the log that the second database may have been off line.
maclochlainn
19 Jan 12 at 2:15 am
wanted to install dbconsole on Oracle 11g but running into problems.First emca is saying incorect usage and is listing options and parameters. When l start dbconsole service through services.mcs it fails and will be running a lot of(3 or 4) perl.exe java.exe and cmd which are consuming all memory.Please help.
Ngoni
24 Jan 12 at 4:52 am
Hey, I was stuck on this for like 2 days! This concise procedure worked like a charm!! thank you!! 🙂
dude from canada
26 Jan 12 at 1:14 pm
Thanks..this post really helped me!
Sujan
31 Jan 12 at 7:45 pm
Thanks for this – I was iteratively going through and deleting public synonyms and then re-running the script. Fixing and problems then re-running.
This has saved me hours!
Thanks 🙂
DavrosFromSkaro
3 Feb 12 at 12:55 am
Having same problem as KIM. (FileNotFOUND exception)
Following is my log file. Please help!
KS
5 Feb 12 at 12:11 pm
It appears the it can’t find the OUIInventory file.
maclochlainn
5 Feb 12 at 1:50 pm
Thanks a lot. This is exactly what I wanted.
Yousuf
7 Feb 12 at 10:05 pm
You have no replied this post please help
wanted to install dbconsole on Oracle 11g but running into problems.First emca is saying incorect usage and is listing options and parameters. When l start dbconsole service through services.mcs it fails and will be running a lot of(3 or 4) perl.exe java.exe and cmd which are consuming all memory.Please help.
Ngoni
13 Feb 12 at 11:00 pm
Ngoni,
Sometimes my schedule doesn’t allow for assisting with individual debugging. After all, that’s the role of Oracle Worldwide Support. 😉
If you’d post the following I’ll try to take a look tomorrow:
What’s in the log file from your reconfiguration?
What error logs do you have from your starting attempts?
What is the version of the database?
Is the database a standalone instance or running Oracle Applications?
maclochlainn
13 Feb 12 at 11:19 pm
Hie
Sorry to sound bit demanding.l am learning.
Here is the copy of the emdctl.trc
if l run this command
it respond as follows
Incorrect usage:
Database Version OraDB11g.
Its running Oracle Forms Application that l am currently developing{learning}.
Hope the information is helpful
Ngoni
14 Feb 12 at 7:54 am
Helo sir,
I am vinay, i have installed Oracle 10g so i created some tables in the database also but its not opening Database home page but i am able to get through using the sql command plz help me how to get the data with out reinstall……send to
vnkmr355@gmail.com
vinay
4 Mar 12 at 1:15 am
[…] reconfiguring OEM with Windows hostname change […]
Link to recreate EM
6 Mar 12 at 8:03 am
Hi Michael
Thanks from me too for the post. Running 11.2.0.1.
While I managed to recreate EM, i get an error “Failed to unlock all EM-related accounts”. Any help appreciated. Many thanks.
Alexis
6 Mar 12 at 10:03 am
Speaking at UTOUG, I’ll redo a 11.2 this weekend.
maclochlainn
6 Mar 12 at 10:25 am
Hi Michael!
Thanks a lot for your article. Please, help me to understand what my mistake. I take all steps which you described, but I can’t create the em environment.
Maria
26 Mar 12 at 6:54 am
I’ve a hunch from the path statements that you’re working in an eBusiness Suite environment. Which version is it?
maclochlainn
26 Mar 12 at 11:07 am
As far as I can know, we don’t work in an eBusiness Suite environment. But I am not a professional and I can be mistaken, if you prompt as it to find out, I will execute all steps which you tell. Thank you very much.
Maria
27 Mar 12 at 2:44 am
Where are at you any ideas how to solve my problem? I will be very grateful.
Maria
29 Mar 12 at 6:57 am
It’s a busy time for me. I won’t be able to create the test case until the next weekend. I’m pretty sure, it’ll be done then. I’ll update you when I get it done.
maclochlainn
2 Apr 12 at 1:09 am
Great job , this work for me also , thanks fot tip
Catalin
19 Apr 12 at 10:52 am
good I have a problem with the installation of oracle 10g enterprise something the installation in a notebook in the house of a friend of mine works perfect but when I’m in mine does not connect Unable to connect win7 is installed on the hard b
http://casa-pc:1158/em/console/database/home
Firefox can not Establish connection to the server to at home-pc: 1158.
Could the site be temporarily unavailable or too busy. Try again in a FEW
moments.
If you are unable to load Any pages, check your computer’s network
connection.
If your computer or network is protected by a firewall or proxy, make sure
That Firefox is permitted to access the Web.
carrpet
26 Apr 12 at 10:31 pm
Hi,
I installed 11g Standard Edition with Enterprise Manager. I imported data from 10g. I am now getting a problem when trying to access em from the browser (502 Service Unavailable). The em_application log is below:
How do I fix this (I am new to database installs)?
Any info would be much appreciated.
Regards,
Carl
carl
15 May 12 at 4:01 am
The core error message is that “10.2.0.4.2 IS NOT compatible WITH repository version 10.1.0.2.0”. This appears to mean that your imported repository isn’t compatible with the Oracle 11g executables. You’ll need to rebuild the repository in Oracle 11g.
maclochlainn
15 May 12 at 9:08 am
When trying to recreate the EM repository get this error in the log:
Check if repos user already exists.
Eddy
18 Jun 12 at 10:41 am
[…] https://blog.mclaughlinsoftware.comoracle-architecture-configuration/changing-windows-hostname-and-o… […]
Windows Hostname without reinstalling OEM
22 Jun 12 at 6:17 am
Hello,
very nice article.
I am having trouble with Oracle Enterprise Manager.
I would like to apply you for help.
When I am starting service DBConsoleName, I get the error message with error code 2.
I tried find out information, how to solve it, but I was unsuccesful.
I tried to check some logfiles and some settings but I am newbie in this topic.
Please, could somebody help me with this problem?
Thank you for any help…
Zdenek
My email is zidz(at)email.cz.
zdenek
9 Jul 12 at 11:20 pm
Can you provide some more information about the error(s) you’re encountering?
maclochlainn
10 Jul 12 at 2:04 am
Thank you very much. this solved my problem
Jasem Tell
10 Jul 12 at 2:17 pm
Thanks for the article, really helpful. I just wanna share what I experienced and for you to let me know if it is a good practice or not. I was just been curious though!!!.
I omitted step 1-4, 7 and went straight to the goal.
The installation was successful with minor errors noticed (probably because I let the system went into sleep mode).
Everything worked really fine. I am using Windows 7. Do I need to check on those errors..or just let it be?
These are the errors:
Ak lami
22 Jul 12 at 9:24 am
It appears that theses are all warnings, and it’s likely that your fine.
maclochlainn
22 Jul 12 at 1:26 pm
Thanks…..
Ak lami
22 Jul 12 at 10:10 pm
[…] sort out how to run the DB Console […]
Fixing and running DB Console (OEM)
24 Aug 12 at 10:22 am
Finally, after so much effort with so many methods, this one fixed the EM!
THANK YOU!
David Zhon
27 Sep 12 at 5:59 pm
I changed the IP address for an Oracle Windows server.
I didn’t need to reinstall OEM (admittedly under older version of Oracle). In listener.ora I added an ADDRESS_LIST instead of the single old ADDRESS which had host=hostname. In the ADDRESS_LIST I added multiple addresses, these had HOST= to the following 127.0.0.1 and original IP address and new IP address. Also I added the host name to this. Additionally in the etc/hosts file for the platform I made the original host name an alias for the new IP address.
Toby Chaloner
28 Sep 12 at 4:06 am
Hi Michael and every guru:
I have run the same problem but with different error message:
1)I issued:
Enterprise Manager configuration completed successfully
2) I checked the SYSMAN user no longer existed and related role also dropped.
3) Then issued:
Error message are :
Please help to provide any hint.
Greatly appreciate any helps!
Ming
Ming Liu
6 Nov 12 at 1:52 pm
Ming,
Does the operating system user have access to the
SYS
account? You can check that by running the following from the command line:sqlplus '/ as sysdba'
The quotes should no longer be required but they provide comfort to some folks (memories of a bygone point in time).
maclochlainn
10 Nov 12 at 1:58 pm
I ended up having to use a slightly modified script to the one you provided in step 7 above.
Finto
12 Dec 12 at 6:36 am
I was not able to configure the EM; I am unable to detect the error. Could you please help me locate it?
thank you:
Daffodil
14 Dec 12 at 3:26 am
Sure, when in a position to do so. Only you can see what’s posted at present.
maclochlainn
14 Dec 12 at 4:08 pm
Hallo,I have run a problem with error message:
a. I issued:
b. then i have this error:
"SEVERE: Cannot start Database Control. The following ports are already in use: [ EM agent port:3938]."
Logs:
You have specified the following settings
Jo
1 Feb 13 at 12:27 am
The error message is telling you that the ports are already in use that Oracle Enterprise Manager is trying to use. Check the log file (emca_2013-01-31_01-21-24-PM.log) that’s referenced, and you can use the Perl socket code provided in this older blog to check whether the ports are open or not.
maclochlainn
3 Feb 13 at 10:46 am
thanks! the ports 1158,3938,5540 are open, i’ve verified with the “Perl socket” server and cliente. and again execute:
and again a Warning and error:
The user
SYSMAN
and RoleMGMT_USER
,MGMT_VIEW
and synonymMGMT_TARGET_BLACKOUTS
,SETEMVIEWUSERCONTEXT
are dropped and the variable (Oracle_SID, Oracle_home, Oracle_hostname, Oracle_unqname) set.Any ideas how to solve my problem? I will be very grateful:)
Jo
8 Feb 13 at 5:04 am
the socket (perl) is running ok, but telnet no:
and in the logs
emagent.trc
isti don’t understand, what happened?
Jo
8 Feb 13 at 6:48 am
🙁 the firewall is Off, maybe it is a problem with VM? … but how could i know…
pls i need help..
Jo
12 Feb 13 at 2:31 am
They’re working with
localhost
or ahostname
?maclochlainn
16 Feb 13 at 12:33 am
They (the Perl sockets) are working with
localhost
or ahostname
?maclochlainn
16 Feb 13 at 12:33 am
This post on setting up a static IP address may help some, but I’ve a hunch that you’re blocking ICMP communication. Check Step #9 in this older post for opening ICMP layer communication on Windows.
maclochlainn
16 Feb 13 at 12:39 am
I installed Oracle 11g on a Windows 2008 R2 Standard Edition Server.
After installation, I am not able to open the Enterprise Manager Console.
When I do “emctl start dbconsole”, it says that the console has started successfully.
But when I go to https://localhost:1158/em/, it just keeps saying that “there is a problem with website’s certificate”, even when I click on “Continue to this website (not recommended” link.
I have done similar installation on another server and it worked just great, but on this server it is giving me a hard time.
MJ
20 Feb 13 at 12:15 am
Have you verified that the listener is running on port 1158?
maclochlainn
20 Feb 13 at 8:05 pm