[oracle@tydb009 ~]$ emca -config dbcontrol db -repos recreate
STARTED EMCA at Dec 1, 2022 2:08:22 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Database Control is already configured for the database orcl
You have chosen to configure Database Control for managing the database orcl
This will remove the existing configuration and the default settings and perform a fresh configuration
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Listener 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 settings
Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1
Local hostname ................ tydb009
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Dec 1, 2022 2:08:43 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/ty_pri/emca_2022_12_01_14_08_22.log.
Dec 1, 2022 2:08:44 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Dec 1, 2022 2:08:45 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Dec 1, 2022 2:08:47 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Dec 1, 2022 2:08:48 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Dec 1, 2022 2:12:03 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Dec 1, 2022 2:12:07 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Dec 1, 2022 2:13:02 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Dec 1, 2022 2:13:06 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Dec 1, 2022 2:13:11 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl secure dbconsole -host tydb009 -sid ty_pri
Dec 1, 2022 2:13:11 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
WARNING: Error securing Database control.
Dec 1, 2022 2:13:11 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_UNQNAME to Database unique name
2) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl stop dbconsole
3) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user >
4) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user >
5) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl start dbconsole
To secure Em Key, run /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >
Dec 1, 2022 2:13:11 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Dec 1, 2022 2:13:16 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Dec 1, 2022 2:13:16 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://tydb009: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_UNQNAME to Database unique name
2) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl stop dbconsole
3) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user >
4) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user >
5) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl start dbconsole
To secure Em Key, run /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >
########################################################
[oracle@tydb009 ~]$ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
http://tydb009:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control .... started.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/tydb009_ty_pri/sysman/log
[oracle@tydb009 ~]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
http://tydb009:1158/em/console/aboutApplication
EM Daemon is not running.
命令启动的时候是started,但查状态又是 not running
emagent.log 里:
2022-12-01 14:13:14,473 Thread-1280583488 Starting Agent 10.2.0.4.5 from /u01/app/oracle/product/11.2.0/dbhome_1 (00701)
2022-12-01 14:13:14,475 Thread-1280583488 <Agent Startup> : Startup of HTTP LISTENER failure (00716)
2022-12-01 14:15:33,829 Thread-3012335424 Starting Agent 10.2.0.4.5 from /u01/app/oracle/product/11.2.0/dbhome_1 (00701)
2022-12-01 14:15:33,830 Thread-3012335424 <Agent Startup> : Startup of HTTP LISTENER failure (00716)
墨值悬赏

评论

