经过执行以下命令重建EM,问题解决。
emca -repos drop
emca -repos create
emca -config dbcontrol db
emctl start dbconsole
执行第三部会报错
WARNING: Error executing /data/app/oracle/product/11.2.0/dbhome_1/bin/emctl secure dbconsole -host terwergreen -sid orcl
Jul 13, 2018 1:15:00 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
WARNING: Error securing Database control.
Jul 13, 2018 1:15:00 PM oracle.sysman.emcp.EMDBPostConfig setWarnMsg
INFO: Error securing Database Control, Database Control has been brought up in non-secure mode. To secure the Database Control execute the following command(s):
1) Set the environment variable ORACLE_SID to orcl
2) /data/app/oracle/product/11.2.0/dbhome_1/bin/emctl stop dbconsole
3) /data/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user >
4) /data/app/oracle/product/11.2.0/dbhome_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user >
5) /data/app/oracle/product/11.2.0/dbhome_1/bin/emctl start dbconsole
To secure Em Key, run /data/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >
Jul 13, 2018 1:15:00 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jul 13, 2018 1:15:05 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jul 13, 2018 1:15:05 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://terwergreen:1158/em <<<<<<<<<<<
Error securing Database Control, Database Control has been brought up in non-secure mode. To secure the Database Control execute the following command(s):
1) Set the environment variable ORACLE_SID to orcl
2) /data/app/oracle/product/11.2.0/dbhome_1/bin/emctl stop dbconsole
3) /data/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user >
4) /data/app/oracle/product/11.2.0/dbhome_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user >
5) /data/app/oracle/product/11.2.0/dbhome_1/bin/emctl start dbconsole
To secure Em Key, run /data/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >