ITPub博客

首页 > 数据库 > Oracle > 【OEM】怎样手动清除OEM12的资料库

【OEM】怎样手动清除OEM12的资料库

翻译 Oracle 作者:xysoul_云龙 时间:2016-10-17 09:50:22 0 删除 编辑


适用版本  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博客 ” ,链接:https://blog.itpub.net/29487349/viewspace-2126549/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
主要从事Oracle数据库 DBA相关工作,其他操作系统、中间件等也有涉及,热衷分享。岁月老将至,如有幸在江湖中留点踪迹,也是欣慰。 【文盲筱烨】好读书爱运动的IT技术爱好者 微博:文盲筱烨 微信公众号:筱烨视点

注册时间:2014-02-15

  • 博文量
    412
  • 访问量
    1104572