使用enterprise manager遇到的问题

/*
 * 问题描述
 */
[oracle@testcdr j2ee]$ emctl start dbconsole
TZ set to PRC
OC4J Configuration issue. /opt/oracle/product/10.2.0.4/oc4j/j2ee/OC4J_DBConsole_testcdr.corp.com_testcdr not found.
cd /opt/oracle/product/10.2.0.4/oc4j/j2ee
[oracle@testcdr j2ee]$ ls -alt
总用量 28
drwxr-x---    6 oracle   dba          4096 12月 22 10:49 .
drwxr-x---   15 oracle   dba          4096 11月 26 17:55 home
-rw-rw-r--    1 oracle   dba           498 2008-10-29  deploy_db.ini
drwxr-x---   15 oracle   dba          4096 2008-10-28  ..
drwxr-x---    9 oracle   dba          4096 2008-10-28  isqlplus
drwxr-x---    3 oracle   dba          4096 2008-10-28  oc4j_applications
drwxr-x---    5 oracle   dba          4096 2008-10-28  OC4J_DBConsole
文件OC4J_DBConsole_testcdr.corp.com_testcdr不存在
把OC4J_DBConsole命名为它需要的名字:
[oracle@testcdr j2ee]$ mv OC4J_DBConsole OC4J_DBConsole_testcdr.corp.com_testcdr
[oracle@testcdr j2ee]$ ls -alt
总用量 28
drwxr-x---    6 oracle   dba          4096 12月 22 11:01 .
drwxr-x---   15 oracle   dba          4096 11月 26 17:55 home
-rw-rw-r--    1 oracle   dba           498 2008-10-29  deploy_db.ini
drwxr-x---   15 oracle   dba          4096 2008-10-28  ..
drwxr-x---    9 oracle   dba          4096 2008-10-28  isqlplus
drwxr-x---    3 oracle   dba          4096 2008-10-28  oc4j_applications
drwxr-x---    5 oracle   dba          4096 2008-10-28  OC4J_DBConsole_testcdr.corp.com_testcdr
[oracle@testcdr j2ee]$ emctl start dbconsole
TZ set to PRC
EM Configuration issue. /opt/oracle/product/10.2.0.4/testcdr.corp.com_testcdr not found.
[oracle@testcdr j2ee]$
仍然报错,经检查/opt/oracle/product/10.2.0.4/testcdr.corp.com_testcdr这个文件不存在。 此方法不对。
/*
 * metalink说明了问题的原因
 */
 Fix
 
 Depending on the existing configuration different approaches are done:
 
 If you upgraded the database from a previous version(9i), then you must drop the existing SYSMAN repository and create a new one using emca.
 
 If you manually create a database and no SYSMAN reporistory was created, run the emca
 
 If you used the DBCA and created the scripts with the Database Control option, the repository was created, you will need to run the emca -r
 
testcdr数据库我是从9i升级到10.2.0.4的。
所以需要drop the existing SYSMAN repository and create a new one using emca.
/*
 *问题解决
 */
-- Delete DB Control Repository Objects Manually
Step 1: Drop AQ related objects in the SYSMAN schema
Logon SQLPLUS as user SYS
SQL> exec DBMS_AQADM.DROP_QUEUE_TABLE(queue_table=>'SYSMAN.MGMT_NOTIFY_QTABLE',force=>TRUE);
Step 2: Drop the DB Control Repository Objects
Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management objects:
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP RESTRICT;
SQL> EXEC sysman.emd_maintenance.remove_em_dbms_jobs;
SQL> EXEC sysman.setEMUserContext('',5);
SQL> REVOKE dba FROM sysman;
SQL> DECLARE
CURSOR c1 IS
SELECT owner, synonym_name name
FROM dba_synonyms
WHERE table_owner = 'SYSMAN';
BEGIN
FOR r1 IN c1 LOOP
IF r1.owner = 'PUBLIC' THEN
EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM '||r1.name;
ELSE
EXECUTE IMMEDIATE 'DROP SYNONYM '||r1.owner||'.'||r1.name;
END IF;
END LOOP;
END;
/
SQL> DROP USER mgmt_view CASCADE;
SQL> DROP ROLE mgmt_user;
SQL> DROP USER sysman CASCADE;
SQL> ALTER SYSTEM DISABLE RESTRICTED SESSION;

--Create the DB Control Repository Objects and Configuration Files
For DB Control 10.2.x, run the command: bin/emca -config dbcontrol db -repos create
其中需要输入sys,sysman,DBSNMP用户的口令
DBSNMP用户的口令为DBSNMP
 
[oracle@testcdr bin]$ emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0 
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
https://testcdr.corp.com:1158/em/console/aboutApplication
 - An instance of Oracle Enterprise Manager 10g Database Control is already running.
[oracle@testcdr bin]$

 

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

转载于:http://blog.itpub.net/10173379/viewspace-682401/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值