Build an Oracle DBA on a firm foundation of sound practices and technical knowledge!
Friday, January 18, 2013
Clean up after failure installation of EM 12c cloud control
When fails half way during installation of 12c Cloud Control, of course, we'd better to check logs under /u01/app/oraInventory/logs/emdbprereqs/LATEST to understand what is going wrong. e.g Executing Prereq Action ----------------------------- executing Action: SELECT COUNT(1) FROM ALL_USERS WHERE USERNAME in ('SYSMAN_MDS', 'MGMT_VIEW', 'SYSMAN_BIP','SYSMAN_APM','BIP', 'SYSMAN_OPSS', 'SYSMAN_RO') output: 1
Prerequisite failed
After fix the issue mentioned in log files, in order to re-install it, other than follow "15 Deinstalling Enterprise Manager (Single and Multi-OMS Environments)" in Oracle® Enterprise Manager Cloud Control Advanced Installation and Configuration Guide
12c Release 2 (12.1.0.2).
Next, we also need to drop objects created in repository database.
Below commands may help.
select count(1) from dba_synonyms where table_owner in ('SYSMAN','SYSMAN_MDS','MGMT_VIEW','SYSMAN_BIP','SYSMAN_APM','BIP','SYSMAN_OPSS','SYSMAN_RO') -- Generate drop synonyms scripts select 'drop public synonym '|| synonym_name || ' ;' from dba_synonyms where table_owner in ('SYSMAN','SYSMAN_MDS','MGMT_VIEW','SYSMAN_BIP','SYSMAN_APM','BIP','SYSMAN_OPSS','SYSMAN_RO') and owner='PUBLIC';
select 'drop synonym '|| OWNER||'.'||synonym_name || ' ;' from dba_synonyms where table_owner in ('SYSMAN','SYSMAN_MDS','MGMT_VIEW','SYSMAN_BIP','SYSMAN_APM','BIP','SYSMAN_OPSS','SYSMAN_RO') and owner<>'PUBLIC';
drop user SYSMAN_MDS cascade; drop user MGMT_VIEW cascade; drop user SYSMAN_BIP cascade; drop user SYSMAN_APM cascade; drop user BIP cascade; drop user SYSMAN_OPSS cascade; drop user SYSMAN_RO cascade; drop user SYSMAN cascade;
drop tablespace MGMT_ECM_DEPOT_TS including contents and datafiles;
drop tablespace MGMT_TABLESPACE including contents and datafiles;
drop tablespace MGMT_AD4J_TS including contents and datafiles;