Sei sulla pagina 1di 2

How to reconfigure Oracle Enterprise Manager on Windows | MacLochl...

http://blog.mclaughlinsoftware.com/oracle-architecture-configuration/ch...

MacLochlainns Weblog
Reconfigure Oracle EM
One mistake can lead to a lot of work. When youve installed Oracle Database 11g, you cant change the Windows Hostname without reinstalling Oracle Enterprise Manager. 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 172.16.113.128 localhost 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, and then drop the em configuration with the following commands:
C:\Data> set ORACLE_SID=orcl C:\Data> emca -deconfig dbcontrol db -repos drop

6. Youll 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: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

7. You should then drop the SYSMAN user manually because it doesnt happen without your assistance (or, it didnt happen when I did it). If you dont drop the SYSMAN schema, youll 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 at at at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1530) oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeScript(SQLEngine.java:880) oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java

1 of 2

8/7/2011 11:34 PM

How to reconfigure Oracle Enterprise Manager on Windows | MacLochl...

http://blog.mclaughlinsoftware.com/oracle-architecture-configuration/ch...

at at at at at at at at

oracle.sysman.emcp.EMReposConfig.createRepository(EMReposConfig.java:492) oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:218) oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:147) oracle.sysman.emcp.EMConfig.perform(EMConfig.java:222) oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:535) oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1215) oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:519) oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:468)

Drop the user and dependent on version a few other objects, like:
DROP DROP DROP DROP DROP USER sysman CASCADE; PUBLIC SYNONYM setemviewusercontext; ROLE mgmt_user; PUBLIC SYNONYM mgmt_target_blackouts; 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, youll 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. Im just glad that rebuilding the MarkLogic server was easy.

2 of 2

8/7/2011 11:34 PM

Potrebbero piacerti anche