Get the App
SLTechnology News&Howtos  ›  Database  › 

Check the existence of public synonyms Remove the public synonyms

Shulou Source: shulou.com Published: 2022-06-01 06:33:22 10月27日 Update

Check the existence of public synonyms, Remove the public synonyms error encountered when installing 12c Cloud Control. Since it was installed once before, it may not be completely removed.

But I don't know what the name of public synonym is. I looked it up on mos and finally found an article. The solution is as follows:

1. Delete Database User:

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. Remove synonyms:

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') ;

After deletion, query with the following statement:

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') ;

3. Delete tablespaces;

select 'drop tablespace '||tablespace_name||' including contents and datafiles;' from dba_tablespaces where tablespace_name like 'MGMT%';

4. Delete objects:

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;

After performing the above steps, the installation is successfully completed!

Tags: Clean synonyms names objects methods steps users spaces articles statements data databases errors synonyms queries Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Apple NVidia Shulou Tech Info MariaDB