1、登录ORACLE数据库
sqlplus / as sysdba;
2、查询实例名
SQL> select instance_name from v$instance;
INSTANCE_NAME
------------------------------------------------
insight
3、配置EM
[oracle@Oracle ~]$emca -config dbcontrol db -repos recreate
STARTED EMCA at Oct 20, 2016 5:31:23 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: insight
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/dbhome_1 ]:
Password for SYS user: (密码)
Password for DBSNMP user: (密码)
Oct 20, 2016 5:32:02 AM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
WARNING: ORA-28000: the account is locked
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 ................ Oracle
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1
Listener port number ................ 1521
Database SID ................ insight
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
Oct 20, 2016 5:34:52 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/insight/emca_2016_10_20_05_31_22.log.
Oct 20, 2016 5:34:53 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Oct 20, 2016 5:37:19 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Oct 20, 2016 5:37:20 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Oct 20, 2016 5:42:21 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Oct 20, 2016 5:42:33 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Oct 20, 2016 5:43:41 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Oct 20, 2016 5:43:44 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Oct 20, 2016 5:43:55 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Oct 20, 2016 5:43:55 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Oct 20, 2016 5:45:34 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Oct 20, 2016 5:45:34 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://Oracle:1158/em <<<<<<<<<<<
Oct 20, 2016 5:45:44 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: /u01/app/oracle/product/11.2.0/dbhome_1/Oracle_insight/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 Oct 20, 2016 5:45:44 AM
4、查看database control是否启动
[oracle@Oracle ~]$emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
https://Oracle:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/Oracle_insight/sysman/log
注意:如果没有启动执行:emctl start dbconsole
5、进入EM管理页面
https://192.168.76.200:1158/
5、登录
6、操作