【OEM】怎樣手動清除OEM12的資料庫

xysoul_雲龍發表於2016-10-17


適用版本  12.1.0.1.0 to 12.1.0.5.0 [Release 12.1]

1、刪除資料庫使用者

點選( 此處)摺疊或開啟

  1. drop user SYSMAN cascade ;
  2. drop user SYSMAN_MDS cascade ;
  3. drop user MGMT_VIEW cascade ;
  4. drop user SYSMAN_RO cascade ;
  5. drop user SYSMAN_OPSS cascade ;
  6. drop user SYSMAN_APM cascade ;
  7. drop user SYSMAN_BIP ;
  8. drop user CLOUD_SWLIB_USER cascade ;
  9. drop user CLOUD_ENGINE_USER cascade ;
  10. drop role MGMT_USER

2、刪除同義詞

點選( 此處)摺疊或開啟

  1. SQL > spool synonyms .lst
  2. SQL > select 'drop ' | | decode (owner , 'PUBLIC' ,owner | | ' synonym ' | |synonym_name , ' synonym ' | |owner | | '.' | |synonym_name ) | | ';' from dba_synonyms where table_owner in ( 'SYSMAN' , 'SYSMAN_MDS' , 'MGMT_VIEW' , 'SYSMAN_BIPLATFORM' , 'SYSMAN_APM' , 'SYSMAN_OPSS' , 'SYSMAN_RO' ) ;
  3. SQL > Spool off
  4. SQL > @synonyms .lst

3、執行完第二條後,檢查, 是否還存在

點選( 此處)摺疊或開啟

  1. SQL > select owner ,synonym_name from dba_synonyms where table_owner in ( 'SYSMAN' , 'SYSMAN_MDS' , 'MGMT_VIEW' , 'SYSMAN_BIP' , 'SYSMAN_APM' , 'SYSMAN_OPSS' , 'SYSMAN_RO' )

4、刪除表空間

點選( 此處)摺疊或開啟

  1. SQL > spool tablespaces .lst
  2. SQL > select 'drop tablespace ' | |tablespace_name | | ' including contents and datafiles;' from dba_tablespaces where tablespace_name like 'MGMT%' ;
  3. SQL > Spool off
  4. SQL > @tablespaces .lst



5、刪除相關物件

點選( 此處)摺疊或開啟

  1. delete from SCHEMA_VERSION_REGISTRY where COMP_NAME = 'Metadata Services' ;
  2. delete from SCHEMA_VERSION_REGISTRY where COMP_NAME = 'Authorization Policy Manager' ;
  3. delete from SCHEMA_VERSION_REGISTRY where COMP_NAME = 'Oracle Platform Security Services' ;
  4. commit
If BI Publisher  is associated with Enterprise Manager for running reports, then follow this procedure instead.
1. Run DBCA to create a template (structure only) of the existing repository database.  透過dbca根據原資料庫建立一個模板
2. Run DBCA to drop the instance storing the EM repository.  刪除原資料庫例項
3. Run DBCA to create a new instance, using the template created from the old repository instance, to support a new EM 12c installation. 根據模板建立新的例項


注意:如果OEM 12c 已配置了BI Publisher 報告,沒有其他方法可以刪除這個資料庫。

參考資料:
12c Cloud Control Repository: How to Manually Drop Repository Database Objects in 12c Cloud Control? (Doc ID 1395423.1)

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29487349/viewspace-2126549/,如需轉載,請註明出處,否則將追究法律責任。

相關文章