ITPub博客

首页 > 数据库 > Oracle > Oracle 10g重建EM

Oracle 10g重建EM

原创 Oracle 作者:bluesshadow 时间:2012-03-21 10:29:52 0 删除 编辑
[oracle@node1 orcl]$ emca -config dbcontrol db -repos create

STARTED EMCA at Mar 21, 2012 6:13:06 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: orcl
Listener port number: 1521
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 ................ /oracle/product/10.2.0/db_1

Database hostname ................ node1
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Mar 21, 2012 6:13:23 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle/product/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_2012-03-21_06-13-06-PM.log.
Mar 21, 2012 6:13:24 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Mar 21, 2012 6:14:54 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Mar 21, 2012 6:14:57 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Mar 21, 2012 6:16:32 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Mar 21, 2012 6:16:32 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://node1:1158/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Mar 21, 2012 6:16:32 PM

如果重建的过程中报错:
[oracle@node1 orcl]$ more /oracle/product/10.2.0/db_1/cfgtoollogs/emca/orclemca_repos_create_2012-03-21_05-45-05-PM.log

Check if repos user already exists.

old   6:    WHERE username=UPPER('&EM_REPOS_USER');
new   6:    WHERE username=UPPER('SYSMAN');
old   8:   IF ( '&EM_CHECK_TYPE' = 'EXISTS') THEN
new   8:   IF ( 'NOT_EXISTS' = 'EXISTS') THEN
old  11:       raise_application_error(-20000, '&EM_REPOS_USER does not exists..');
new  11:       raise_application_error(-20000, 'SYSMAN does not exists..');
old  14:   ELSIF ( '&EM_CHECK_TYPE' = 'NOT_EXISTS' ) THEN
new  14:   ELSIF ( 'NOT_EXISTS' = 'NOT_EXISTS' ) THEN
old  17:       raise_application_error(-20001, '&EM_REPOS_USER already exists..');
new  17:       raise_application_error(-20001, 'SYSMAN already exists..');
old  21:       raise_application_error(-20002, 'Invalid Check type &EM_CHECK_TYPE');
new  21:       raise_application_error(-20002, 'Invalid Check type NOT_EXISTS');
DECLARE
*
ERROR at line 1:
ORA-20001: SYSMAN already exists..
ORA-06512: at line 17

将sysman用户删除后再执行:
drop user sysman cascade;
drop role MGMT_USER;
drop user MGMT_VIEW cascade;
drop public synonym MGMT_TARGET_BLACKOUTS;
drop public synonym SETEMVIEWUSERCONTEXT;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24668589/viewspace-719171/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-09-27

  • 博文量
    34
  • 访问量
    137584