[oracle@RHEL4 ~]$ sqlplus sys/root as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Apr 30 17:41:00 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> alter user dbsnmp identified by root ;
User altered.
SQL> drop role MGMT_USER;
Role dropped.
SQL> drop user MGMT_VIEW cascade;
User dropped.
SQL> drop user sysman cascade;
User dropped.
SQL> drop PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;
Synonym dropped.
SQL> drop public synonym SETEMVIEWUSERCONTEXT;
Synonym dropped.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[oracle@RHEL4 ~]$ emca -repos create
STARTED EMCA at Apr 30, 2010 5:43:04 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: NEWAY
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y
Apr 30, 2010 5:43:23 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle/oradata/product/10.2.0/db_1/cfgtoollogs/emca/NEWAY/emca_2010-04-30_05-43-03-PM.log.
Apr 30, 2010 5:43:23 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Apr 30, 2010 5:45:40 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Enterprise Manager configuration completed successfully
FINISHED EMCA at Apr 30, 2010 5:45:40 PM
[oracle@RHEL4 ~]$ emctl status dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://RHEL4:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is not running.
[oracle@RHEL4 ~]$ emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://RHEL4:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ......................... started.
------------------------------------------------------------------
Logs are generated in directory /oracle/oradata/product/10.2.0/db_1/RHEL4_NEWAY/sysman/log
附emca常用命令:
创建一个EM资料库
emca -repos create
重建一个EM资料库
emca -repos recreate
删除一个EM资料库
emca -repos drop
配置数据库的 Database Control
emca -config dbcontrol db
删除数据库的 Database Control配置
emca -deconfig dbcontrol db
重新配置db control的端口,默认端口在1158
emca -reconfig ports
emca -reconfig ports -dbcontrol_http_port 1160
emca -reconfig ports -agent_port 3940
先设置ORACLE_SID环境变量后,启动EM console服务
emctl start dbconsole
emctl stop dbconsole
emctl status dbconsole
重新配置dbconsole的步骤
emca -repos drop 删除DBConsole
emca -repos create 重建
emca -config dbcontrol db 配置
emctl start dbconsole 启动
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/21158541/viewspace-661997/ ,如需转载,请注明出处,否则将追究法律责任。