5、删除之前安装过程中的无效em:
ebdbpro:/eb_db/Oracle/product/10.2/db/OPatch> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Sun May 20 17:34:27 2012
Copyright (c) 1982, 2010, Oracle.All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> DROP public synonym SETEMVIEWUSERCONTEXT;
Synonym dropped.
SQL> SQL> DROP PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;
Synonym dropped.
SQL> SQL> drop role MGMT_USER;
Role dropped.
SQL> SQL>DROP USER MGMT_VIEW CASCADE;
User dropped.
SQL> SQL> DROP USER SYSMAN CASCADE;
User dropped.
SQL> SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ebdbpro:/eb_db/oracle/product/10.2/db/OPatch>emca -deconfig dbcontrol db -repos drop
STARTED EMCA at May 20, 2012 5:35:17 PM
EM Configuration Assistant, Version 10.2.0.5.0 Production
Copyright (c) 2003, 2009, Oracle.All rights reserved.
Enter the following information:
Database SID: ebai
Database SID: 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)]: Y
May 20, 2012 5:35:30 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /eb_db/oracle/product/10.2/db/cfgtoollogs/emca/ebai/emca_2012-05-20_05-35-17-PM.log.
May 20, 2012 5:35:30 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
WARNING: ORA-01017: invalid username/password; logon denied
May 20, 2012 5:35:30 PM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
WARNING: Error initializing SQL connection. SQL operations cannot be performed
May 20, 2012 5:35:30 PM 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= and re-run EMCA script
2) ORACLE_HOSTNAME is set. Unset it and re-run EMCA script
May 20, 2012 5:35:31 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
May 20, 2012 5:35:31 PM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
May 20, 2012 5:35:31 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at May 20, 2012 5:35:31 PM
6、重新创建em:
ebdbpro:/eb_db/oracle/product/10.2/db/OPatch>emca -config dbcontrol db -repos create
STARTED EMCA at May 20, 2012 5:35:42 PM
EM Configuration Assistant, Version 10.2.0.5.0 Production
Copyright (c) 2003, 2009, Oracle.All rights reserved.
Enter the following information:
Database SID: ebai
Database SID: Listener port number: 1521
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 ................ /eb_db/oracle/product/10.2/db
Local hostname ................ ebdbpro
Listener port number ................ 1521
Database SID ................ ebai
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
May 20, 2012 5:36:00 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /eb_db/oracle/product/10.2/db/cfgtoollogs/emca/ebai/emca_2012-05-20_05-35-42-PM.log.
May 20, 2012 5:36:01 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
May 20, 2012 5:36:50 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
May 20, 2012 5:36:53 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
May 20, 2012 5:37:31 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
May 20, 2012 5:37:31 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
May 20, 2012 5:39:09 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
May 20, 2012 5:39:09 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://ebdbpro:1158/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at May 20, 2012 5:39:09 PM
ebdbpro:/eb_db/oracle/product/10.2/db/OPatch>
