This post is about how to remove manually components from Oracle Database.
It was done on 11.2.0.4 database and valid for other release
1. Remove Oracle Application Express:
?/apex/apxremov.sql
drop PUBLIC SYNONYM HTMLDB_SYSTEM;
drop PUBLIC SYNONYM HTMLDB_SYSTEM;
select comp_id, comp_name, version, status from dba_registry where comp_id=’APEX';
2. Remove Oracle Workspace Manager Components:
@?/rdbms/admin/owmuinst.plb
select comp_id, comp_name, version, status from dba_registry where comp_id=’OWM';
3. Remove Enterprise Manager:
ALTER SYSTEM ENABLE RESTRICTED SESSION;
EXEC sysman.emd_maintenance.remove_em_dbms_jobs;
EXEC sysman.setEMUserContext(”,5);
DECLARE
CURSOR c1 IS
SELECT owner, synonym_name name
FROM dba_synonyms
WHERE table_owner = ‘SYSMAN';
BEGIN
FOR r1 IN c1
LOOP
IF r1.owner = ‘PUBLIC’ THEN
EXECUTE IMMEDIATE ‘DROP PUBLIC SYNONYM ‘||r1.name;
ELSE
EXECUTE IMMEDIATE ‘DROP SYNONYM ‘||r1.owner||’.’||r1.name;
END IF;
END LOOP;
END;
/
DROP USER mgmt_view CASCADE;
DROP USER sysman CASCADE;
DROP ROLE mgmt_user;
select comp_id, comp_name, version, status from dba_registry where comp_id=’EM';
4. Uninstalling Oracle Spatial:
shutdown immediate
startup
–Script
set pagesize 0
set feed off
spool drop_spatial.sql
select ‘drop public synonym “‘ || synonym_name || ‘”;’ from dba_synonyms where table_owner=’MDSYS';
spool off;
@drop_spatial.sql
commit;
shutdown immediate
startup
drop user MDSYS cascade;
select comp_id, comp_name, version, status from dba_registry where comp_id=’SDO';
SELECT object_name,object_type,owner FROM dba_objects WHERE status = ‘INVALID';
@$ORACLE_HOME/rdbms/admin/utlrp.sql
5. Remove Oracle Multimedia:
drop user ORDSYS cascade;
drop user ORDPLUGINS cascade;
drop user SI_INFORMTN_SCHEMA cascade;
–Script:
set pagesize 0
set feed off
spool drop_ordim.sql
select ‘drop public synonym “‘||b.object_name||'”;’ from dba_synonyms a, dba_objects b where b.status=’INVALID’
and b.object_type=’SYNONYM’
and b.owner=’PUBLIC’
and a.synonym_name=b.object_name
and a.table_owner not in (select username from dba_users);
spool off;
@drop_ordim;
commit;
select comp_id, comp_name, version, status from dba_registry where comp_id=’ORDIM';
SELECT object_name FROM dba_objects WHERE status = ‘INVALID';
@$ORACLE_HOME/rdbms/admin/utlrp.sql
6. Remove Oracle Rules Manager:
@?/rdbms/admin/catnorul.sql
drop FUNCTION EXFSYS.RLM$WLNCHK;
@?/rdbms/admin/utlrp
select comp_id, comp_name, version, status from dba_registry where comp_id=’RUL';
SELECT object_name FROM dba_objects WHERE status = ‘INVALID';
7. Remove Oracle Expression Filter:
@?/rdbms/admin/catnoexf.sql
select comp_id, comp_name, version, status from dba_registry where comp_id=’EXF';
SELECT object_name FROM dba_objects WHERE status = ‘INVALID';
8. Remove Oracle XML Database:
@?/rdbms/admin/catnoqm.sql
@?/rdbms/admin/catmeta.sql
@?/rdbms/admin/catpprvt.sql
@?/rdbms/admin/utlrp
drop FUNCTION AWM_CREATEXDSFOLDER;
drop PROCEDURE VALIDATE_ORDIM;
drop package body HTMLDB_SYSTEM;
drop view ALL_XML_SCHEMAS;
drop view ALL_XML_SCHEMAS2;
SELECT object_name FROM dba_objects WHERE status = ‘INVALID';
9. Remove Oracle Text:
@?/ctx/admin/catnoctx.sql
drop procedure sys.validate_context;
select comp_id, comp_name, version, status from dba_registry where COMP_ID=’CONTEXT';
SELECT object_name FROM dba_objects WHERE status = ‘INVALID';
10. Remove OLAP Analytic Workspace:
shutdown immediate;
startup
@?/olap/admin/catnoaps.sql
@?/rdbms/admin/utlrp.sql
select comp_id, comp_name, version, status from dba_registry where COMP_ID=’APS';
SELECT object_name FROM dba_objects WHERE status = ‘INVALID';
11. Remove Oracle OLAP API:
@?/olap/admin/olapidrp.plb
@?/olap/admin/catnoxoq.sql
@?/rdbms/admin/utlrp.sql
select comp_id, comp_name, version, status from dba_registry where COMP_ID=’XOQ';
SELECT object_name FROM dba_objects WHERE status = ‘INVALID';
12. Remove OLAP Catalog:
shutdown immediate;
startup
@?/olap/admin/catnoamd.sql
SELECT object_name FROM dba_objects WHERE status = ‘INVALID';
select comp_id, comp_name, version, status from dba_registry where COMP_ID=’AMD';
13. Remove Java Support from an Oracle Database:
shutdown immediate;
startup
exit
alter system set “_system_trig_enabled” = false scope=memory;
alter system enable restricted session;
@?/rdbms/admin/catnojav.sql
@?/xdk/admin/rmxml.sql
@?/javavm/install/rmjvm.sql
drop table sys.JAVA$RMJVM$AUX3;
drop table sys.JAVA$RMJVM$AUX2;
drop table sys.JAVA$RMJVM$AUX;
shutdown immediate;
startup
Cleanup:
@?/rdbms/admin/catdph.sql
@?/rdbms/admin/prvtcxml.plb
@?/rdbms/admin/catdpb.sql
@?/rdbms/admin/dbmspump.sql
@?/rdbms/admin/utlrp