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.
Great, this works fine for me. Thanks a lot
Shahul
13 Jan 09 at 4:15 am
Thanks for this post! It helped me a lot!
Rob Cilissen
16 Jan 09 at 8:18 am
[…] Dank aan: MacLochlainns Weblog […]
ROB CILISSEN » Oracle EM (Enterprise Manager / Database control) opnieuw installeren
16 Jan 09 at 8:38 am
Thank you so much. It worked for me. 🙂
Mohammed Yehia
1 Feb 09 at 1:44 am
[…] Another method from MacLochLainns Weblog: […]
Reconfiguring Oracle EM « Mohib Alvi
27 Feb 09 at 12:48 am
I followed the steps but the EM is still not configured.
Server: error creating the repository
When I see the log i got this error:
Oracle.sysman.emcp.exception.EMConfigException: Error creating the repository
Waqas
6 May 09 at 2:37 am
I’d need to know what OS, what database version, et cetera to try and help you. Can you send that information?
maclochlainn
6 May 09 at 11:32 am
Dear Sir,
I followed your steps as described above, but no succes. I am running Oracle EBS R12 on a Windows XP plattform, I am able to drop the repository succesfully but when I try to create is gives the following error:
Check if repos user already exists.
When i try to launch EM (knowing dat the repository is dropped) the following happens:
But as I said if I try to create the repository is doesn’t work.
Could you point out what’s wrong?
Michael: Check here for what I think you’re looking for as an answer.
Best regard ans thanx in advance,
Yours sincerely Maruti Bhanot
Maruti Bhanot
16 May 09 at 1:06 pm
You’re not working with OEM. When you’ve installed the Oracle EBS R12, it’s the Oracle Applications Enterprise Manager (OAEM). It has different dependencies because it often leverages Java repackaged by the Oracle Applications development group. It appears that you might need some grants between scheme, but I’m not sure which ones. I’ve got this in a test plan for a situation like that but the project’s not scheduled until June.
maclochlainn
16 May 09 at 3:33 pm
Thanx for your relpy!
Yours sincerely Maruti Bhanot
Maruti Bhanot
18 May 09 at 3:01 pm
Hi,
I have oracle 10g installed on my system, but due to some IT policies they, IT, changed the computer host name!! I changed the host name in listener.ora and tnsnames.ora, and thereby SQL*Plus works. Unfortunately, I am not able to run enterprise database manager control when following the steps in the post above.
Milind Pangarkar
5 Jun 09 at 5:16 am
There’s really not a lot of information to go on in your comment. However, based on the fact that the IT department changed the machine hostname, I’ll make some assumptions. Assuming that you have an account that has administrative rights on the local machine but not within the Windows domain, Oracle may have been installed using the Administrator account rather than yours. You can confirm if this or similar problems exist by attempting to log in as the privileged user:
If it says that you lack permissions to run that command, then your account doesn’t have adequate permissions. By the way, the single quotes aren’t necessary on newer releases of Oracle.
Second assumption, the IT department has a license monitoring software installed on your PC. This is frequently the case with IT governance policies. I’d suggest that you disable the software because they interfere with Oracle’s operation on Windows. Hope this helps, but if not could you provide some more detail?
maclochlainn
7 Jun 09 at 4:17 pm
I have 2 network cards in use on my server. The server belongs to a workgroup, but the 2nd network connection connects to a different network. When I run this procedure the local hostname returned to me is the ip address of the 2nd network card, but I desire the ip address of the 1st network card or either the alias I created in the hosts file.
The line in my hosts file is this
150.1.1.50 SPM2_L2_ONLINE APPSERVER
In my listener.ora and my tnsnames.ora my alias APPSERVER is used. There is no entry in the hosts file for the ip address belonging to the 2nd network card. What am I doind wrong?
P Hunt
22 Jun 09 at 3:36 pm
I was able to get the correct ip address to be listed as the local hostname, but now I have a new error. Here is the part of my error log where things appear to start going wrong
Any help would be appreciated.
P Hunt
23 Jun 09 at 7:36 am
The errors in general, and the log throwing an
ORA-00955
error may indicate that you neeed to manually drop theSYSMAN
schema after deconfiguring Oracle EM. Have you tried a manual drop of theSYSMAN
schema (step #7)?The other error that’s interesting is the concurrency control lock. Is it possible that you’ve two domains on the single box? I ask because Oracle lives in a single domain on Windows, and when you’ve two or more domains permissions and access to components differ substantially. Can you let me know if you’ve got two domains on that server?
maclochlainn
23 Jun 09 at 9:43 am
I did do the manual drop of sysman. I looked at the emca_repos_create… file and saw that it was complaining about some MGMT% synonyms already existing so it could not create the synonym. I have been dropping these synonyms one by one to see if I can get somewhere. I saw a solution on another website where all the synonyms had to be dropped manually in addition to the sysman user. I do not know if I have 2 domains on the server. What I do know is the server belongs to a workgroup. The ip address for the 1st network card corresponds to this workgroup. The 2nd network card is used for level 3 access. It’s ip address belongs to the level 3 network which I assume is part of a domain.
P Hunt
23 Jun 09 at 1:38 pm
Which NIC does 150.1.1.50 belong to, the primary or secondary? Which NIC should the EM run on?
You’re installing as the Administrator user account from the logs, but just want to confirm that?
Synonyms creation failure shouldn’t cause a fatal failure because they’re created to mirror the old ones, they just won’t translate in between rebuilding SYSMAN. Did you’re log indicate that the process stopped completed at those synonym creation statements?
What’s in this or a more recent equivalent log file: D:\app\Administrator\cfgtoollogs\emca\orcl\emca_2009_06_22_17_50_34.log?
maclochlainn
23 Jun 09 at 10:49 pm
150.1.1.50 belongs to network connection 1. This is where the EM should run. Yes the install is being done as administrator. Here is the last line of file emca_repos_create_2009_06_23_16_29_17.log
I have a concern that if I do get this working, my dual network cards will cause me a problem. When I try to use the emctl start command, it constructs a folder name with the ip address of network connection 2. Perhaps I’ll address this if I get to this point.
P Hunt
24 Jun 09 at 7:39 am
Worked perfectly for me !!
(was necessary after 10g XE upgraded to full version 10g 10.2.0.4 on another machine)
Reinhold Seifert
29 Jun 09 at 5:50 am
I have recreated OEM configuration. Oracle 11g dbconsole is running. OEM is running but when I am trying to open database control on internet explorer, it is not displaying the page.
Rajiv
9 Jul 09 at 4:37 pm
Have you tried Firefox? What’s your URL that;s failing?
maclochlainn
9 Jul 09 at 6:08 pm
Hello,
I posted a while ago about EM on Windows enviroment which wasn’t working for me, I switched to CentOS 5.3 running my R12 and the following steps worked for me:
Configure OEM Database Control on R12
Source enviroment the of the database tier. Env. file location is in my case /ERP/db/tech_st/11.1.0/
Afterwards, open a browser and enter:
Accept te certificate and there you go….
I got the main info of this site:
http://orafin.blogspot.com/2008/09/enable-database-enterprise-manager.html
So it is working now fine for me, perhaps on a Windows enviroment if you use de Windows commands it should perhaps work, not tried still…
Regards,
Maruti
Maruti Bhanot
14 Aug 09 at 4:02 am
This was a neat and clear help. thanks a lot.
Rakesh Vyas
22 Sep 09 at 1:10 am
Thanks !!!
I didn’t see see the forest for the trees.
ETC/host is the solution for my challenges with the console.
This article is short and to the point
great
Gerd
28 Sep 09 at 1:48 am
thanks for your help!
but i have another error after the reconfiguration of em: Unable to determine local host from URL REPOSITORY_URL=http://ORACLE-LAPTOP:%EM_UPLOAD_PORT%/em/upload/
could you help me again please!!!!!!
Patricia
21 Oct 09 at 8:13 am
The public synonym for
SYSMAN
objects will not be dropped although the user is drooped by using the command:After user is dropped, all the public synonyms that tie to it hv to be dropped manually.
yapkang
7 Jan 10 at 9:53 pm
I have a problem about reconfiguration of ports
When I execute emca -config dbcontrol db, the password of SYS is accepted.
When I execute emca -reconfig ports -…… the password of SYS (the same as before of course) is rejected.
Could you help me with this issue? I’m installing Oracle 11g on Windows 7 (32bit).
Thanks a lot.
Marcela
10 Jan 10 at 5:36 pm
Thanks you too much sir its really help full, long live DBA
saif
16 Jan 10 at 11:56 pm
Thank you, thank you, thank you.
dto
22 Jan 10 at 9:09 am
Marcela, What’s the exact error message that you get?
maclochlainn
22 Jan 10 at 10:35 am
Hi;
Thanks for sharing this information! I was struggling to reconfigure em control and this has helped me make some progress.
I was able to deconfigure using emca.
The sysman user and other ‘residuals’ were also all gone. (maybe this got more thorough in 11.2.0).
I am having no luck when I try to reconfigure however. Despite the Java exception messages you’ll see below, the database is happily up and running. Any ideas would be appreciated.
Thank you, Jack
Jack
6 May 10 at 8:46 pm
thank you very much. It did not require me to drop any users/schemas.
sushant
9 May 10 at 8:43 pm
Hi Maclochlainn,
Because of some replication problem my production server has gone to hanging mode, so, I force to restart my production server. After restarting every thing working fine except my OEM unable to restart. I followed your steps, but at the end I am getting “SEVERE: Error starting Database Control”. Checked the log file, repository created successfully, but unable to start the repository. mailing you end part of the log file. Please help me to start the OEM.
Sfi
28 May 10 at 9:51 pm
Hi,
in step 3 you suggets adding a new line in etc/hosts file.
Is this the new hostname with current IP address, or old hostname with current IP address?
Christos
1 Jun 10 at 4:18 am
Yes, it’s the new
hostname
value.maclochlainn
1 Jun 10 at 9:43 am
It appears that the Windows Service is corrupted. Have you tried dropping it and recreating it?
maclochlainn
2 Jun 10 at 1:29 am
Excellent post, it worked for me. Thank you very much. I highly recommend it.
Hugo Mendoza
4 Jun 10 at 10:22 am
I think that dropping/recreating the Windows Service would help. Would you give me an idea of where that is documented?
I have hunted through the Utilities doc but don’t see it in there. (But I wouldn’t be surprised to find that my interpretation of what Oracle’s trying to tell me is wrong either.)
Thank you, Jack
Jack
13 Jun 10 at 1:10 pm
The
ORADIM
utility creates, maintains, and deletes Windows services for the database.Create an instance by specifying the following options:
Edit an instance by specifying the following options:
Delete instances by specifying the following options:
Startup services and instance by specifying the following options:
Shutdown service and instance by specifying the following options:
Query for help by specifying the following parameters:
maclochlainn
13 Jun 10 at 2:02 pm
This is a very helpfull article.
But I am still not able to configure em
I followed the given steps.
Here is the error that i get.
Contents of log file are as below:
Regards,
prabhjot
prabhjot
16 Jun 10 at 4:40 am
The log is truncated in length. If you open it in an editor, could you re-paste it. It appears that the error occurs trying to
createConnection
, the initial question becomes was your %TNS_ADMIN% set in your session, and is the listener running?maclochlainn
17 Jun 10 at 9:25 pm
maclochlainn;
Thank you! Deleting/re-creating the Windows service through ORADIM allowed me to run EMCA successfully to recreate the DBConsole service.
I appreciate you sharing your expertise.
Jack ‘donnachaich’
Jack
19 Jun 10 at 1:26 pm
Thank you, after a 24 hour struggle to fix EM, I gave up and followed your instructions, EM was back to normal in 5 minutes.
Many thanks.
Semih BATTAL
4 Aug 10 at 4:23 pm
Very useful! Thanks a lot~
Amy
30 Sep 10 at 12:21 am
I’m taking a class and have to install Oracle 11g on my windows 7 Professional x64. Everything installs thru the database config assistant. The text tells me to make note of the url for em on the last screen. The url is always empty. Prior to the last page I get a popup error saying no listener but I would not be able to get past the text’s step 4 withot listener. I make it to the bitter end and then get a popup error about the listener. When I click OK, I get the screen the book references but the url is empty. Any suggestions for someone learning Oracle?
Zero
15 Oct 10 at 2:49 am
Thanks, The steps provided is very helpful and informative. Thanks again
Antony Rajesh
29 Oct 10 at 5:45 am
Did not need to remove the SYSMAN user. (10.2.0)
Modified windows domain name and recreated EM.
Thanks a lot!
Luc
Luc Vinck
16 Nov 10 at 6:37 am
Will following these steps and recreating EM delete my scheduled jobs? Thanks for posting this by the way. Very informative!
Dave
14 Dec 10 at 7:54 pm
I’m a new Oracle DBA. The environment I’m working in has no documentation. After a couple of days, I can’t seem to get EM running. Is there a way to install EM after Oracle has been installed and running? Oracle is installed in a linux environment btw. Any suggestions? Thank you.
Giovanni
28 Dec 10 at 8:34 am
Most likely you need to uninstall and re-install if it’s damaged, as covered in the blog post. However, you may not need to do this, what are the errors when you try to start it?
maclochlainn
28 Dec 10 at 10:16 am