Tags

, ,

You can manually perform a repository cleanup following these steps

SET heading OFF feedback OFF
SET head off lines 120 pages 999

SPOOL remove_sysman_synonyms.lst
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_BIP',
 'SYSMAN_APM',
 'SYSMAN_OPSS',
 'SYSMAN_RO' );
spool off
@remove_sysman_synonyms.lst

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;

SPOOL remove_sysman_tablespaces.lst
SELECT 'drop tablespace '
 || tablespace_name
 || ' including contents and datafiles;'
FROM dba_tablespaces
WHERE tablespace_name LIKE 'MGMT%';
spool off
@remove_sysman_tablespaces.lst

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