Oracle 11g 重建EM需要删除的对象

因为需求需要重建EM,重建时因为某些错误被迫停止,比如对象已存在、用户已经存在等,最终找出了创建必备的条件;

1.环境变量(Oracle和Grid在同一个用户下安装):

ORACLE_HOME 要设为DB路径;

ORACLE_UNQNAME 要设置;

2.删除em相关的同义词:

select 'drop public synonym '||synonym_name||';' from dba_synonyms where regexp_like(synonym_name,'^MGMT_|^SMP_EMD|^EMD_') order by synonym_name;3.删除em相关用户:

drop user MGMT_VIEW;
drop user SYSMAN cascade;4.删除em相关role:

drop role MGMT_USER;5.检查em相关残留的对象,并删除:

select * from dba_objects where status='INVALID' AND OBJECT_TYPE='SYNONYM';6.重建em:

em -config dbcontrol  db  -repos  create

Hope is personal,hope is something that no one can give to you,you have to choose to believe in hope,you have to make it yourself..

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/e92d17ff558e70b68298ad83ba873764.html