Oracle 11g 重建EM需要刪除的對象

來源:互聯網
上載者:User

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..

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.