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.
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
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
Thanks. That worked for me too.
Gaurav
2 Apr 13 at 10:28 am
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:
if any more info needed plz let me know….
Mohib
7 Apr 13 at 3:21 am
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
yes i had tried to configure EM before…ok so what should i do next?
Mohib
7 Apr 13 at 11:45 am
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
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
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
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
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.
Kirk from Arkansas
18 Apr 13 at 4:05 pm
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.Charlie
8 May 13 at 3:46 pm
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
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
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
Damilola, How much real memory is available to Windows?
maclochlainn
26 Jul 13 at 2:25 pm
i have a issue while login during OEM internal error
adnan
3 Aug 13 at 2:45 am
Adnan, An internal error? Do you mean an
ORA-00600
or an OEM error?maclochlainn
3 Aug 13 at 3:20 pm
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
Ohaya, check whether the service ever starts. If not, verify your network settings and configurations.
maclochlainn
12 Oct 13 at 9:22 pm
Thanks so much!!! I lost during one day for solution this problem.
Dop
15 Nov 13 at 9:49 pm
it did the thank you very much
peter
22 Nov 13 at 7:28 am
it did the work
peter
22 Nov 13 at 7:30 am
thanks, very helpful
arifdeni
3 Dec 13 at 6:46 pm
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 :
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
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
I am seeing thr below errors in
SYSMAN
log even after recreating theDBCONSOLE
dropping and creating it again…..Not sure if it has something to do with listener…
Ramita Garg
7 Feb 14 at 9:10 am
Take a look at this discussion. This is typically an agent process not an Oracle listener.
maclochlainn
8 Feb 14 at 12:34 pm
Very Nice document. I was facing this issue from a long time.
Ali
12 Mar 14 at 6:54 am
[…] https://blog.mclaughlinsoftware.comoracle-architecture-configuration/changing-windows-hostname-and-o… […]
How to change hostname and oracle enterprise manager ORACLE | An Nhiên
26 Aug 14 at 10:37 pm
Thanks a lot. It worked for me.
Priyanka Gupta
26 Oct 14 at 11:40 pm
Thank you. It helped me too.
Satya
4 Mar 15 at 2:40 pm
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
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
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
After running the command:
C:Userspc> emca -config dbcontrol db -repos create
Getting error below. Please help me
Stanley
10 Apr 17 at 8:05 pm