1.删除档案库
$[oracle@centos6 admin]$ emca -repos dropSTARTED EMCA at Mar 17, 2021 11:20:59 AMEM Configuration Assistant, Version 11.2.0.3.0 ProductionCopyright (c) 2003, 2011, Oracle. All rights reserved.Enter the following information:Database SID: orclListener port number: 1521Password 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)]: yMar 17, 2021 11:21:15 AM oracle.sysman.emcp.EMConfig performINFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2021_03_17_11_20_59.log.Mar 17, 2021 11:21:16 AM oracle.sysman.emcp.EMReposConfig invokeINFO: Dropping the EM repository (this may take a while) ...
2.删除em
[oracle@centos6 admin]$ emca -deconfig dbcontrol db -repos dropSTARTED EMCA at Mar 17, 2021 11:24:49 AMEM Configuration Assistant, Version 11.2.0.3.0 ProductionCopyright (c) 2003, 2011, Oracle. All rights reserved.Enter the following information:Database SID: orclListener port number: 1521Password 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)]: yMar 17, 2021 11:25:05 AM oracle.sysman.emcp.EMConfig performINFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2021_03_17_11_24_48.log.Mar 17, 2021 11:25:05 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoaclyWARNING: ORA-01017: invalid username/password; logon deniedMar 17, 2021 11:25:05 AM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControlWARNING: Error initializing SQL connection. SQL operations cannot be performedMar 17, 2021 11:25:05 AM oracle.sysman.emcp.EMDBPreConfig performDeconfigurationWARNING: 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=<hostname> and re-run EMCA script2) ORACLE_HOSTNAME is set. Unset it and re-run EMCA scriptMar 17, 2021 11:25:05 AM oracle.sysman.emcp.EMReposConfig invokeINFO: Dropping the EM repository (this may take a while) ...Mar 17, 2021 11:25:06 AM oracle.sysman.emcp.EMReposConfig invokeINFO: Repository successfully droppedEnterprise Manager configuration completed successfullyFINISHED EMCA at Mar 17, 2021 11:25:06 AM
3.创建em
或者直接执行 emca -config dbcontrol db -repos recreate
[oracle@centos6 admin]$ emca -config dbcontrol db -repos createSTARTED EMCA at Mar 17, 2021 11:25:49 AMEM Configuration Assistant, Version 11.2.0.3.0 ProductionCopyright (c) 2003, 2011, Oracle. All rights reserved.Enter the following information:Database SID: orclListener port number: 1521Listener ORACLE_HOME [ /u01/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 settingsDatabase ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1Local hostname ................ centos6Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1Listener port number ................ 1521Database SID ................ orclEmail address for notifications ...............Outgoing Mail (SMTP) server for notifications ...............-----------------------------------------------------------------Do you wish to continue? [yes(Y)/no(N)]: yMar 17, 2021 11:26:13 AM oracle.sysman.emcp.EMConfig performINFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2021_03_17_11_25_49.log.Mar 17, 2021 11:26:14 AM oracle.sysman.emcp.EMReposConfig createRepositoryINFO: Creating the EM repository (this may take a while) ...
