To view the database components:-

col COMP_ID for a15
col COMP_NAME for a45
col STATUS for a20
set lines 100 pages 100
select COMP_ID,COMP_NAME,STATUS from dba_registry;

1) Remove Oracle Application Express:
******************************************

Connect to database as sysdba

sqlplus “/as sysdba”

?/apex/apxremov.sql

create or replace library SYS.WWV_FLOW_VAL_LIB trusted is static;

alter package SYS.HTMLDB_SYSTEM compile body;

Verify the component is removed after you uninstall:-

col COMP_ID for a15
col COMP_NAME for a45
col STATUS for a20
set lines 100 pages 100
select COMP_ID,COMP_NAME,STATUS from dba_registry where COMP_ID like %APEX% ;

2) Remove Oracle Workspace Manager Components:
**********************************************************

Connect to database as sysdba

sqlplus “/as sysdba”

@?/rdbms/admin/owmuinst.plb

Verify the component is removed after you uninstall:-

col COMP_ID for a15
col COMP_NAME for a45
col STATUS for a20
set lines 100 pages 100
select COMP_ID,COMP_NAME,STATUS from dba_registry where COMP_ID like %OWM% ;

3) Remove Enterprise Manager:
***********************************

Connect to database as sysdba

sqlplus “/as sysdba”

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;

Verify the component is removed after you uninstall:-

col COMP_ID for a15
col COMP_NAME for a45
col STATUS for a20
set lines 100 pages 100
select COMP_ID,COMP_NAME,STATUS from dba_registry where COMP_ID like %EM% ;

Share this post
Recommended Posts

Leave a Comment

Start typing and press Enter to search