适用版本
12.1.0.1.0 to 12.1.0.5.0 [Release 12.1]
1、删除资料库用户
-
drop user SYSMAN cascade
;
-
drop user SYSMAN_MDS cascade
;
-
drop user MGMT_VIEW cascade
;
-
drop user SYSMAN_RO cascade
;
-
drop user SYSMAN_OPSS cascade
;
-
drop user SYSMAN_APM cascade
;
-
drop user SYSMAN_BIP
;
-
drop user CLOUD_SWLIB_USER cascade
;
-
drop user CLOUD_ENGINE_USER cascade
;
-
drop role MGMT_USER
2、删除同义词
-
SQL
> spool synonyms
.lst
-
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'
)
;
-
SQL
> Spool off
-
SQL
> @synonyms
.lst
3、执行完第二条后,检查, 是否还存在
-
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、删除表空间
-
SQL
> spool tablespaces
.lst
-
SQL
> select
'drop tablespace '
|
|tablespace_name
|
|
' including contents and datafiles;' from dba_tablespaces where tablespace_name like
'MGMT%'
;
-
SQL
> Spool off
-
SQL
> @tablespaces
.lst
5、删除相关对象
-
delete from SCHEMA_VERSION_REGISTRY where COMP_NAME
=
'Metadata Services'
;
-
delete from SCHEMA_VERSION_REGISTRY where COMP_NAME
=
'Authorization Policy Manager'
;
-
delete from SCHEMA_VERSION_REGISTRY where COMP_NAME
=
'Oracle Platform Security Services'
;
-
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/
,如需转载,请注明出处,否则将追究法律责任。