首页 / 数据库 / MySQL / 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 createHope 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..更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12本文永久更新链接地址