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.
Thank you for your blog on recreating EM repository. This is very helpful for me.
I had a problem the first time trying to recreate the repository. It asked me for DBSNMP password which is only accepted if the password is enclosed with double quote. Another note is the drop repository somehow did not drop PUBLIC SYNONYM MGMT_AVAILABILITY the first time.
David Himawan
23 Jan 11 at 12:40 pm
Hi,
I’m taking Oracle Adm class and I’m unable to get my OEM console to launch. I’ve intalled oracle 11g R2 on Windows 7. I’ve tried followed the suggestions at the beginning of the blog by modifying the ip to hostname. I’m stuck on step 4 and 5. On step 5, do I have to login as sys or sysdba to execute the statements? Which data file are you referring on on step 5? Any feed back will be appreciated.
Thanks,
Kim
Kim
26 Jan 11 at 1:39 am
Hi,
I tried to recreate EM from the beginning of step 8 and finished successfully to step 9. But when I select yest to continue I received this stack trace
I’ve reviewed the logs and this is what it shows:
Which line should I be looking for the listener port in the property file:
Thanks,
Kim
Kim
26 Jan 11 at 2:19 am
There aren’t any ports set in that emons.properties.ecma file. The port and service name that this message is complaining about relate to the standard listener and
tnsnames.ora
file. My hunch is that the driver of this problem lies some place else. Could you review all steps and post the full log files?maclochlainn
27 Jan 11 at 9:36 pm
Dear sir
I have problem when I install Oracle 10.2.0.2.1 Enterprise Management Grid Control on window 2003 and window xp. It appear error “OUI:25031: Some of the configuration assistant failed……….” in OMS Configuration section.
Your help will be appreciated.
sovanndy
4 Feb 11 at 9:50 pm
Did you pass a relative as opposed to absolute path parameter during the installation? Check this forum entry or this Metalink Doc ID 352357.1 document.
maclochlainn
4 Feb 11 at 10:37 pm
Could you explain me how to pass absolute path parameter during installation on window?
And I don’t know to get Metalink Doc ID ID 352357.1.
Thank for your help…..
sovanndy
5 Feb 11 at 6:37 am
Thank you very much. It really worked.
aod
9 Feb 11 at 11:52 pm
Hi I am using Amazon AMI to do some prototyping and whenever I stop the instance, the IP and hostname changes. I still have not getting any success reconfigure it yet….It does not give me any error while I am running the procedure describes above but EM just hangs…
Neric
12 Apr 11 at 6:18 pm
When you say you restart the instance, does that mean the Oracle instance or the Operating System? Generally, the IP and hostname only change when you restart the OS. I’ve a hunch that it’s the latter. It appears that Amazon AMI boots a kernel as available on shared resources. In this type of cloud configuration, the IP and hostname are automatically assigned from a pool of resources and your registry files mapped to a standard kernel set of resources.
maclochlainn
12 Apr 11 at 9:33 pm
[…] changing windows hostname […]
oracle em
16 Apr 11 at 4:16 am
Thanks for this post! It helped me a lot!
MASK
17 Apr 11 at 9:02 am
em once worked, but now the console login says the db is not running. it is running. There was a time it was running fine. The db name was changed. Would that create a need to drop SYS and work through the listed steps?
Is there any other way to correct for a wrong database name? How do you see the emconsole set up in Windows?
johncr
28 Apr 11 at 8:05 am
Yes, the database name change would break it. Yes, you can edit and replace but it’s more work than reconfiguring it.
maclochlainn
28 Apr 11 at 2:17 pm
You can set the properties in VBA, like this.
maclochlainn
28 Apr 11 at 2:25 pm
[…] كل شيء! الرابط هو: How to reconfigure Oracle Enterprise Manager on Windows – MacLochlainns Weblog نجاح خطوات الحل وتشغيل Oracle Enterprise Manager من […]
إعادة تثبيت/تكوين Oracle Enterprise Manager لحل بعض المشاكل « Kuwait10 World
12 May 11 at 5:13 am
awesome post!! thanks
pfeiffer
22 May 11 at 3:51 am
The following is just a sample, a single example of a repeated result. Every time I add the new Object to drop, another is found to exist. Should I manually drop all synonyms owned by SYSMAN?
Several pages of NO ERROR entries are then followed by the one error.. always a different, new object to drop.
(See the end of the listing for all objects now being dropped each attempt)
johncr
24 May 11 at 12:39 pm
As releases change additional synonyms require drops. Add to your list and retry. Having done this so long the incremental approach hs always worked best for me.
maclochlainn
24 May 11 at 5:57 pm
Thank You, The first 6 steps worked like a charm
Vasu
29 May 11 at 9:33 pm
Hi, My name is Mohammed Alam,
From last one month i am facing a Problem while Installing 11g R1 in to my Windows 7 – 32 bit, its giving Error OUI – 25031, i format my Lappy lots of time but every time i am getting the same Error, i am realy tired, now i feel i am not able to learn Oracle, please please any one Help me in this. Pleaseeee
Mohammed Alam
15 Jun 11 at 8:06 am
Do you have a white space in a folder name? You can’t have a white space in any of the folders of the Oracle home path. If that’s not it, let me know when the errors raised?
maclochlainn
18 Jun 11 at 9:47 am
Use this following to delete the dependencies.. and also password requires “” is something weird
Sarath
29 Jun 11 at 5:55 am
Thanks a lot.. It worked for me.
Balakrishna
16 Aug 11 at 8:50 am
Hello,
I am using OEM Grid control 10g for monitoring/reporting purposes and a bit new to OEM.
I am able to generate database alerts sent via email say for DB_abc1 and also generate reports.
I installed Oracle 10g agent on a another box and lets say with DB_abc2 running on it,and did not realise that there was a database control already installed on that box, so I
1.Uninstalled database control on DB_abc2 box.
2.Uninstalled Oracle 10g agent and re-installed it on DB_abc2 box.
2.Was able to configure the DB_abc2 database from OEM Grid control gui ie the dbsnmp user password and was able to connect to it.
But when I put in alert for things like ORA-XXXX errors I am not getting any emails, also when I put in database usage reports(to be sent via emails) the reports are not picking up any data, they are empty.
I checked the agent on the box in question and the heart beat is OK, and I manually uploaded using “emctl upload” and it is sucessful.
The only alerts I am getting for DB_abc1 is the agent up/down thats it.
DB_abc1 is a 9208 database and DB_abc2 is 10201 database.
Just wondering what I am missing ….any insight will be much appreciated as I am stuck here.
Nicholas
19 Aug 11 at 6:02 pm
Unable to determine local host from URL REPOSITORY_URL=http://ud:%EM_UPLOAD_PORT
%/em/upload/
.
pls sir give me solution which type of error is this ………
udit
20 Aug 11 at 3:00 am
thanks bro… My em is working fine now. Thanks for ur great help….
sam
3 Sep 11 at 8:30 am
Good Mr. McLaughlin,
If you have the time. I have been trying to drop and create our 11.2.0 test EM for a bit now. It is on a windows machine which I need to connect to using remote connection. No luck.
My apologies for typing it out, I can’t email from the remote machine.
I have:
1) restarted the EM (shutdown immediate followed by start up)
2) checked the SID with:
Select instance from v$thread;
3) checked the port number of the listener with:
Lsnrctl -> status
4) Verified the instance is up and the listener is on
5) Checked unique name with:
show parameter DB_UNIQUE_NAME;
yields appdevdbtest1
6) set ORACLE_SID=appdevdbtest
7) emca -deconfig dbcontrol db -repos drop
The log file states:
(which we know is appdevdbtest1)
Thanks
Tim
Tim
8 Sep 11 at 8:30 am
Generally, the error from your log file occurs when TNS can’t resolve an address. Did you change your
hostname
? Why don’t you provide yourtnsnames.ora
file.maclochlainn
11 Sep 11 at 11:13 pm
The
%EM_UPLOAD_PORT%
is the environment variable for uploads. If you’re getting an error with it, the port may be in use. Is that what you needed? I’m not sure what you need.maclochlainn
13 Sep 11 at 1:16 am
You probably already surmised this but you’ve got one configuration value from the agent installation that wasn’t replaced by the grid installation. I’ve not troubleshot this one in a while and don’t recall where it is off-hand. I’d suggest you push this to Oracle Support, but I’d like to know what they tell you.
maclochlainn
13 Sep 11 at 1:20 am
Note:
I also added a
that wasn’t in the directions.
I will be rebuilding this week, if I note any other direction changes I will update.
Tim
13 Sep 11 at 9:01 am
Thanks a lot….
Merwin
30 Sep 11 at 12:13 am
This is the most useful explanation I’ve found for this after searching for 2 days. I’ve bookmarked your blog in case I run into more trouble later, so I can look here first. Thank you for including the details like using double quotes for the passwords. Enormously helpful!
Deseray
14 Oct 11 at 2:20 pm
Thanks a lot, it worked for me too under RedHat
nicche
28 Oct 11 at 9:38 am
[…] delighted to find a simple solution … that showed how to get a New EM […]
Reconfiguring Oracle EM | The Addidici OBIEE Experience
1 Nov 11 at 1:44 pm
Hi, i dropped my repository using
and, i re-created it using
now I’m getting an error
I did set my
ORACLE_SID
and am running in window xp with oracle version:desmond
9 Nov 11 at 6:01 am
Have you set the environment variable
%ORACLE_UNQNAME%
and run theemctl
utility?maclochlainn
9 Nov 11 at 10:07 pm
yes i have set ORACLE_UNQNAME=smsdev
set oracle_sid=smsdev
and also my oracle_home=C:\product\11.2.0\dbhome_1
but still getting same error
desmond
18 Nov 11 at 3:38 am
I am running the the emca . but it hangs at the line mentioned.. doesn’t do anything in the background.
not sure why is it asking dbsnmp password twice?
I appreciate your help.
Thanks,
Sravanthi.
D:\>emca -config dbcontrol db -repos create
STARTED EMCA at Nov 27, 2011 9:52:30 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: pnc11
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for DBSNMP user:
srav
27 Nov 11 at 11:01 pm
Hi Sir,
Iam using Oracle11g on my machine and i sucessfully uninstalled the emca and followed your above steps.
I have dropped the sysman user but still i get the Java stack and it stops.
—Done this Sucessfully—-
Your help will be appreciated.
Thanks Sir.
Muhammed
9 Dec 11 at 2:19 pm
It appears that the database instance wasn’t running based on the error message. Was that the case?
maclochlainn
9 Dec 11 at 6:27 pm
Hi Sir,
Thanks for reply
please see below
Muhammed Faraz
10 Dec 11 at 10:20 am
Enterprise manager onfiguration failed due to the following error –
Error uploading configuration data to the repository
SOLUTION:
My problem was, I`ve instaled 3 ethernet cards in the server. I had to turned off 2 of them and then reinstal database.
This solve my problem and EM start to work correctly.
janko
20 Dec 11 at 8:16 am
He! Its working
Thanks
sandesh
5 Jan 12 at 3:20 am
Sir
Host IP address has been changed from 10.x.y.z to 10.m.n.o in database server due to network issue.EM is not working in oracle 11g with solaris 10 Operating System after this change.Is there any change required in any file of EM to start EM.If so ,kindly give details in which file the IP has to be changed.
Thanks
Regards
Raju
Mumbai
raju
13 Jan 12 at 6:29 pm
Rebuilding the Oracle EM is the safest course. Anything else requires knowing all the database values that must change as well as configuration files.
maclochlainn
13 Jan 12 at 6:42 pm
Hello,
This worked perfectly on my other database server.
I encountered problem with starting database control.
I am getting this error even I manually dropped
sysman
and other described above.In the Log file I able to find this,
Appreciate your time and attention,
Anil Koyalkar
18 Jan 12 at 4:12 am
Is this an eBusiness Suite installation?
maclochlainn
18 Jan 12 at 6:29 pm
No, Its a databaser server running GIS applications behind.
Anil Koyalkar
19 Jan 12 at 12:24 am