127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.0.xx hostxx.toplogis.com hostxx
2. 移除錯誤的設定檔:
( http://www.stefanocislaghi.eu/2009/12/unable-to-run-dbconsole-oc4j.html )
$cd /oracle/app/oracle/product/11.2.0/dbhome_1/bin
[oracle@tap07 bin]$ ./emca -deconfig dbcontrol db -repos drop STARTED EMCA at Jan 21, 2014 11:22:25 AM EM Configuration Assistant, Version 11.2.0.3.0 Production Copyright (c) 2003, 2011, Oracle. All rights reserved. Enter the following information: Database SID: ivdb Listener port number: 1521 Password for SYS user: Password for SYSMAN user: ---------------------------------------------------------------------- WARNING : While repository is dropped the database will be put in quiesce mode. ---------------------------------------------------------------------- Do you wish to continue? [yes(Y)/no(N)]: yes Jan 21, 2014 11:22:47 AM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /oracle/app/oracle/cfgtoollogs/emca/ivdb/emca_2014_01_21_11_22_25.log. Jan 21, 2014 11:22:48 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly WARNING: ORA-28000: the account is locked Jan 21, 2014 11:22:48 AM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl WARNING: Error initializing SQL connection. SQL operations cannot be performed Jan 21, 2014 11:22:48 AM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration WARNING: EM is not configured for this database. No EM-specific actions can be performed. Some of the possible reasons may be: 1) EM is configured with different hostname then physical host. Set environment variable ORACLE_HOSTNAME=3. 進入該SID的環境and re-run EMCA script 2) ORACLE_HOSTNAME is set. Unset it and re-run EMCA script Jan 21, 2014 11:22:48 AM oracle.sysman.emcp.EMReposConfig invoke INFO: Dropping the EM repository (this may take a while) ... Jan 21, 2014 11:24:56 AM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully dropped Enterprise Manager configuration completed successfully FINISHED EMCA at Jan 21, 2014 11:24:56 AM
[oracle@tap07 bin]$ . setivdb
4. 新增設定檔
[oracle@tap07 bin]$ ./emca -config dbcontrol db -repos create
STARTED EMCA at Jan 21, 2014 11:25:37 AM EM Configuration Assistant, Version 11.2.0.3.0 Production Copyright (c) 2003, 2011, Oracle. All rights reserved. Enter the following information: Database SID: ivdb Listener port number: 1521 Listener ORACLE_HOME [ /oracle/app/oracle/product/11.2.0/dbhome_1 ]: Password for SYS user: Password for DBSNMP 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 ................ /oracle/app/oracle/product/11.2.0/dbhome_1 Local hostname ................ tap07.toplogis.com Listener ORACLE_HOME ................ /oracle/app/oracle/product/11.2.0/dbhome_1 Listener port number ................ 1521 Database SID ................ ivdb Email address for notifications ............... Outgoing Mail (SMTP) server for notifications ............... ----------------------------------------------------------------- Do you wish to continue? [yes(Y)/no(N)]: yes Jan 21, 2014 11:26:04 AM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /oracle/app/oracle/cfgtoollogs/emca/ivdb/emca_2014_01_21_11_25_37.log. Jan 21, 2014 11:26:05 AM oracle.sysman.emcp.EMReposConfig createRepository INFO: Creating the EM repository (this may take a while) ... Jan 21, 2014 11:33:01 AM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully created Jan 21, 2014 11:33:07 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository INFO: Uploading configuration data to EM repository (this may take a while) ... Jan 21, 2014 11:34:25 AM oracle.sysman.emcp.EMReposConfig invoke INFO: Uploaded configuration data successfully Jan 21, 2014 11:34:29 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole INFO: Securing Database Control (this may take a while) ... Jan 21, 2014 11:34:37 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole INFO: Database Control secured successfully. Jan 21, 2014 11:34:37 AM oracle.sysman.emcp.util.DBControlUtil startOMS INFO: Starting Database Control (this may take a while) ... Jan 21, 2014 11:35:35 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: Database Control started successfully Jan 21, 2014 11:35:35 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: >>>>>>>>>>> The Database Control URL is https://tap07.toplogis.com:1158/em <<<<<<<<<<< Jan 21, 2014 11:35:37 AM oracle.sysman.emcp.EMDBPostConfig invoke WARNING: ************************ WARNING ************************ Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted. The encryption key has been placed in the file: /oracle/app/oracle/product/11.2.0/dbhome_1/tap07.toplogis.com_ivdb/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost. *********************************************************** Enterprise Manager configuration completed successfully FINISHED EMCA at Jan 21, 2014 11:35:37 AM5. 啟動與結束
啟動:emctl start dbconsole
結束:emctl stop dbconsole
6. 連線:
https://xx.xx.xx.xx:1158/em