Reconfigure Oracle EM

來源:互聯網
上載者:User
One mistake can lead to a lot of work. When you’ve installed Oracle Database 11g, you can’t change the<br />Windows Hostname without reinstalling Oracle Enterprise Manager.</p><p>These are the steps:</p><p>1. Change the %ORACLE_HOME%\network\admin\listener.ora file from an IP number to machine name.</p><p>2. Change the %ORACLE_HOME%\network\admin\tnsnames.ora file from an IP number to a machine name.</p><p>3. Change the C:\WINDOWS\System32\drivers\etc\hosts file by adding this line beneath the default<br />localhost line (for the new Hostname value):</p><p>127.0.0.1 localhost<br />172.16.113.128 mclaughlin11g mclaughlin11g.techtinker.com</p><p>4. Change the Windows hostname by navigating: Start > Control Panel > System (classic view) from the<br />random assignment of VMWare Fusion.</p><p>5. Reboot the machine, and then drop the em configuration with the following commands:</p><p>C:\Data> set ORACLE_SID=orcl<br />C:\Data> emca -deconfig dbcontrol db -repos drop</p><p>6. You’ll receive the following prompts, enter the Oracle SID and Port number without double quotes but you<br />must enter all passwords with double quotes (at least in Oracle Database 11g):</p><p>STARTED EMCA at Jul 13, 2008 8:26:42 AM<br />EM Configuration Assistant, Version 11.1.0.5.0 Production<br />Copyright (c) 2003, 2005, Oracle. All rights reserved.</p><p>Enter the following information:<br />Database SID: orcl<br />Listener port number: 1521<br />Password for SYS user:<br />Password for SYSMAN user:<br />Password for SYSMAN user:<br />Do you wish to continue? [yes(Y)/no(N)]: y</p><p>7. You should then drop the SYSMAN user manually because it doesn’t happen without your assistance (or, it<br />didn’t happen when I did it). If you don’t drop the SYSMAN schema, you’ll raise an error when you try to<br />recreate it:</p><p>CONFIG: ORA-20001: SYSMAN already EXISTS..<br />ORA-06512: at line 17</p><p>oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-20001: SYSMAN already EXISTS..<br />ORA-06512: at line 17The Java stack trace will look like this, more or less based on version and release:</p><p>at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1530)<br />at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeScript(SQLEngine.java:880)<br />at oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java<br />at oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java<br />at oracle.sysman.emcp.EMReposConfig.createRepository(EMReposConfig.java:492)<br />at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:218)<br />at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:147)<br />at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:222)<br />at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:535)<br />at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1215)<br />at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:519)<br />at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:468)</p><p>Drop the user and dependent on version a few other objects, like:</p><p>DROP USER sysman CASCADE;<br />DROP PUBLIC SYNONYM setemviewusercontext;<br />DROP ROLE mgmt_user;<br />DROP PUBLIC SYNONYM mgmt_target_blackouts;<br />DROP USER mgmt_view;8. You can then create the em environment with the following syntax:</p><p>C:\Data> emca -config dbcontrol db -repos create</p><p>9. Again, you’ll receive the following prompts, enter the Oracle SID and Port number without double quotes but<br />you must enter all passwords with double quotes (at least in Oracle Database 11g):</p><p>STARTED EMCA at Jul 13, 2008 8:28:48 AM<br />EM Configuration Assistant, Version 11.1.0.5.0 Production<br />Copyright (c) 2003, 2005, Oracle. ALL rights reserved.</p><p>Enter the following information:<br />DATABASE SID: orcl<br />Listener port NUMBER: 1521<br />Password FOR SYS USER:<br />Password FOR DBSNMP USER:<br />Password FOR SYSMAN USER:<br />Password FOR SYSMAN USER: Email address FOR notifications (optional):<br />Outgoing Mail (SMTP) server FOR notifications (optional):<br />-----------------------------------------------------------------</p><p>You have specified the following settings</p><p>DATABASE ORACLE_HOME ................ C:\app\Administrator\product\11.1.0\db_1</p><p>LOCAL hostname ................ mclaughlin11g<br />Listener port NUMBER ................ 1521<br />DATABASE SID ................ orcl<br />Email address FOR notifications ...............<br />Outgoing Mail (SMTP) server FOR notifications ...............</p><p>-----------------------------------------------------------------</p><p>Do you wish TO continue? [yes(Y)/no(N)]: y</p><p>A note to me, remember haste makes waste. I’m just glad that rebuilding the MarkLogic server was easy.</p><p>
FROM: http://blog.mclaughlinsoftware.com/oracle-architecture-configuration/changing-windows-hostname-and-oracle-enterprise-manager/
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.