重建ORACLE DB CONSOLE 11G

1、modify the sqlnet.ora,add a line as below.
更改sqlnet.ora文件,添加如下字样,打开本地验证模式
sqlnet.authentication_services = (NTS)

2、Delete DB Control Configuration File
删除DB control configuration file
需要运行如下命令
<ORACLE_HOME>bin/emca -deconfig dbcontrol db

3、Use this option to automatically drop the DB Control repository
使用如下命令自动删除相关对象
set oracle_home=d:\oracle\11204
set ORACLE_UNQNAME=OPERA

d:\oracle\11204\sysman\admin\emdrep\bin\RepManager 1521 opera -action drop

if droping failed,please delete as below manually
如果自动删除失败,请使用下面的SQL语句手动删除

(1)Drop the repository schema and object (no quiesce):
Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management objects:

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;
/
DROP USER mgmt_view CASCADE;
DROP ROLE mgmt_user;
DROP USER sysman CASCADE;

(2)run windows regedit
打开windows注册表,移除以下键值

  • navigate to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services
  • locate the OracleDBConsole entry and delete it

Remove the following directories from your filesystem:
<ORACLE_HOME>/<hostname_sid>
<ORACLE_HOME>/oc4j/j2ee/OC4J_DBConsole__

如果删除之后不能创建跑一下这两条授权语句

grant execute on sys.DBMS_OBFUSCATION_TOOLKIT to public;
grant execute on sys.DBMS_SQL to public;

使用命令重新创建配置文件,和对象
4、 Create the DB Control Repository Objects and Configuration Files
<ORACLE_HOME>bin/emca -config dbcontrol db -repos create

grant execute on sys.DBMS_OBFUSCATION_TOOLKIT to sysman;
grant execute on sys.DBMS_SQL to sysman;
20:43:58 SQL> set linesize 800
20:44:06 SQL> set wrap off
20:44:07 SQL> conn dbsnmp/dbsnmp
Connected.
23:30:22 SQL> show user
USER is "DBSNMP"
23:30:25 SQL> conn sysman/opera10g
Connected.
23:30:37 SQL> show user
USER is "SYSMAN
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值