Oracle Enterprise Manager与Oracle Database Control
OEM是一个统称,是Oracle提供的图形化企业级管理工具的统称。具体有三种可用的工具:
(1)Database Control
它用于管理一个数据库(可以是RAC集群数据库),具有实时管理和监视的功能,运行调度作业功能,告警功能。
(2)Application Server Control
用于管理一个或者多个应用服务器实例。
(3)Grid Control
Grid Control可以管理多个数据库和应用服务器,还可以管理计算机节点,支持通过第三方插件管理第三方产品。
Database Control 在oracle10g便加入数据库,安装实例时,提示管理选项。
1、首次尝试查看状态,未配置 EMCA。
oracle@sy-sp1:~> emctl status dbconsole
Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.
2、尝试配置数据
oracle@sy-sp1:~> emca -repos create STARTED EMCA at Oct 23, 2017 1:26:56 PM EM Configuration Assistant, Version 11.2.0.0.2 Production Copyright (c) 2003, 2005, Oracle. All rights reserved. Enter the following information: Database SID: ora10 Listener port number: 1521 Password for SYS user: Password for SYSMAN user: Do you wish to continue? [yes(Y)/no(N)]: y Oct 23, 2017 1:27:33 PM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/ora10/emca_2017_10_23_13_26_55.log. Oct 23, 2017 1:27:33 PM oracle.sysman.emcp.EMReposConfig createRepository INFO: Creating the EM repository (this may take a while) ... Oct 23, 2017 1:27:33 PM oracle.sysman.emcp.EMReposConfig invoke SEVERE: Error creating the repository Oct 23, 2017 1:27:33 PM oracle.sysman.emcp.EMReposConfig invoke INFO: Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/ora10/emca_repos_create_<date>.log for more details. Oct 23, 2017 1:27:33 PM oracle.sysman.emcp.EMConfig perform SEVERE: Error creating the repository Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/ora10/emca_2017_10_23_13_26_55.log for more details. Could not complete the configuration. Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/ora10/emca_2017_10_23_13_26_55.log for more details.
3、报错!在安装过程多次报错,简单列举,并给出方法。
ORA-20001: SYSMAN already exists.. CONFIG: ORA-00955: name is already used by an existing object
4、解决方法,删除sysman用户,同时删除公共的相关表。
drop user sysman cascade;
drop role MGMT_USER;
drop public synonym MGMT_TARGET_BLACKOUTS;
drop public synonym MGMT_AVAILABILITY;
drop public synonym MGMT_SEVERITY_ARRAY;
drop public synonym MGMT_CURRENT_AVAILABILITY;
drop public synonym MGMT_SEVERITY_OBJ;
drop public synonym MGMT_GUID_OBJ;
drop public synonym MGMT_GUID_ARRAY;
drop public synonym SMP_EMD_AVAIL_OBJ;
5、重装重配数据
oracle@sy-sp1:/u01/app/oracle/oradata/ora11g/network/admin> emca -repos recreate
STARTED EMCA at Oct 23, 2017 3:22:58 PM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: ora10
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y
Oct 23, 2017 3:23:16 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/ora10/emca_2017_10_23_15_22_57.log.
Oct 23, 2017 3:23:17 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Oct 23, 2017 3:23:22 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Oct 23, 2017 3:23:23 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Oct 23, 2017 3:29:01 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Enterprise Manager configuration completed successfully
FINISHED EMCA at Oct 23, 2017 3:29:01 PM
6、继续安装
oracle@sy-sp1:/u01/app/oracle/oradata/ora11g/network/admin> emca -config dbcontrol db
STARTED EMCA at Oct 23, 2017 3:32:10 PM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: ora10
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/oradata/ora11g ]:
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/oradata/ora11g
Local hostname ................ localhost
Listener ORACLE_HOME ................ /u01/app/oracle/oradata/ora11g
Listener port number ................ 1521
Database SID ................ ora10
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Oct 23, 2017 3:32:48 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/ora10/emca_2017_10_23_15_32_10.log.
Oct 23, 2017 3:32:54 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Oct 23, 2017 3:33:45 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Oct 23, 2017 3:33:49 PM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
INFO: Software library configured successfully.
Oct 23, 2017 3:33:49 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Deploying Provisioning archives ...
Oct 23, 2017 3:34:17 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Oct 23, 2017 3:34:17 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Oct 23, 2017 3:34:25 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Oct 23, 2017 3:34:25 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Oct 23, 2017 3:35:27 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Oct 23, 2017 3:35:27 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://localhost:1158/em <<<<<<<<<<<
Oct 23, 2017 3:35:30 PM 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/oradata/ora11g/localhost_ora10/sysman/config/emkey.ora. Please 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 23, 2017 3:35:30 PM
7、查看启动状态
oracle@sy-sp1:/u01/app/oracle/oradata/ora11g/network/admin> emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
https://localhost:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/oradata/ora11g/localhost_ora10/sysman/log
转载于:https://blog.51cto.com/78799999/1975289