Error occur while configuration of OEM 13c as installation failed with the referenced database doesn’t contain a valid management Repository
Posted by Mir Sayeed Hassan on August 10th, 2023
Error occur while configuration of OEM 13c as installation failed with The referenced database doesn’t contain a valid management Repository.
This error is occur due to the database objects already created earlier which needs proper cleanup of the Repository Database before proceeding for the fresh of OEM installation.
Login to sysdba & properly clean the DB before installing it OMS database Server.
SQL> DROP USER SYSMAN CASCADE; DROP USER SYSMAN_OPSS CASCADE; DROP USER SYSMAN_MDS CASCADE; DROP USER SYSMAN_APM CASCADE; DROP USER SYSMAN_RO CASCADE; DROP USER SYSMAN_BIPLATFORM CASCADE; DROP USER SYSMAN_STB CASCADE; User dropped. SQL> DROP USER SYSMAN_OPSS CASCADE * ERROR at line 1: ORA-01918: user 'SYSMAN_OPSS' does not exist SQL> User dropped. SQL> DROP USER SYSMAN_APM CASCADE * ERROR at line 1: ORA-01918: user 'SYSMAN_APM' does not exist SQL> User dropped. SQL> DROP USER SYSMAN_BIPLATFORM CASCADE * ERROR at line 1: ORA-01918: user 'SYSMAN_BIPLATFORM' does not exist SQL> User dropped.
Remove the Synonyms which is related to the sysman accounts in DB.
DECLARE CURSOR l_syn_csr IS SELECT 'DROP ' || CASE owner WHEN 'PUBLIC' THEN 'PUBLIC SYNONYM ' ELSE 'SYNONYM ' || owner || '.' END || synonym_name AS cmd FROM dba_synonyms WHERE table_owner IN ( 'SYSMAN', 'SYSMAN_MDS', 'MGMT_VIEW', 'SYSMAN_BIP', 'SYSMAN_APM', 'BIP', 'SYSMAN_OPSS', 'SYSMAN_RO' ); BEGIN FOR l_syn_rec IN l_syn_csr LOOP BEGIN EXECUTE IMMEDIATE l_syn_rec.cmd; EXCEPTION WHEN OTHERS THEN dbms_output.put_line( '===> ' || l_syn_rec.cmd ); dbms_output.put_line( sqlerrm ); END; END LOOP; END; /
PL/SQL procedure successfully completed.
Drop the MGMT_VIEW user from DB
SQL> DROP USER mgmt_view CASCADE; User dropped.
Drop the tablespaces which are assign to OEM
SQL> DROP TABLESPACE mgmt_ecm_depot_ts INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS; SQL> DROP TABLESPACE mgmt_tablespace INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS; SQL> DROP TABLESPACE mgmt_ad4j_ts INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
Clean up the registry details from DB
SQL> DELETE FROM schema_version_registry WHERE (comp_name,owner) IN ( ('Authorization Policy Manager','SYSMAN_APM'), ('Metadata Services','SYSMAN_MDS'), ('Oracle Platform Security Services','SYSMAN_OPSS') ); commit; 1 row deleted.
Try to re-try with the installation process, therefore it should proceed further with installation process.
In-case if you still face an issue as below., fallow the below steps
Find the below error during the Key in of Administrator Password
cs_OPSSUserExists
Query to find out the user related to OEM
SQL> select USERNAME,ACCOUNT_STATUS from dba_users;
Verify if any of the following users already exists.
CLOUD_ENGINE_USER CLOUD_SWLIB_USER MGMT_VIEW SYSMAN_TYPES SYSMAN_OPSS SYSMAN_STB SYSMAN_RO
SQL> set linesize 300 SQL> select USERNAME,ACCOUNT_STATUS from dba_users; USERNAME ACCOUNT_STATUS -------------------------------------------------------------------------------------------------------------------------------- -------------------------------- SYS OPEN SYSTEM OPEN XS$NULL EXPIRED & LOCKED OJVMSYS LOCKED LBACSYS LOCKED OUTLN LOCKED SYS$UMF LOCKED DBSNMP LOCKED APPQOSSYS LOCKED DBSFWUSER LOCKED GGSYS LOCKED USERNAME ACCOUNT_STATUS -------------------------------------------------------------------------------------------------------------------------------- -------------------------------- ANONYMOUS EXPIRED & LOCKED CTXSYS EXPIRED & LOCKED DVSYS LOCKED DVF LOCKED GSMADMIN_INTERNAL LOCKED MDSYS LOCKED OLAPSYS LOCKED XDB LOCKED WMSYS LOCKED GSMCATUSER LOCKED MDDATA LOCKED USERNAME ACCOUNT_STATUS -------------------------------------------------------------------------------------------------------------------------------- -------------------------------- SYSBACKUP LOCKED REMOTE_SCHEDULER_AGENT LOCKED GSMUSER LOCKED SYSRAC LOCKED GSMROOTUSER LOCKED SI_INFORMTN_SCHEMA LOCKED AUDSYS LOCKED DIP LOCKED ORDPLUGINS LOCKED SYSKM LOCKED ORDDATA LOCKED USERNAME ACCOUNT_STATUS -------------------------------------------------------------------------------------------------------------------------------- -------------------------------- ORACLE_OCM LOCKED SYSDG LOCKED ORDSYS LOCKED CLOUD_ENGINE_USER EXPIRED & LOCKED CLOUD_SWLIB_USER EXPIRED & LOCKED EUS_ENGINE_USER EXPIRED & LOCKED SYSMAN_TYPES OPEN SYSMAN122140_OPSS OPEN 41 rows selected.
Here we can see the above users exists in database, therefore we need to drop those users from DB & start the installation.
SQL> drop user CLOUD_ENGINE_USER cascade; User dropped. SQL> drop user CLOUD_SWLIB_USER cascade; User dropped. SQL> drop user MGMT_VIEW cascade; drop user MGMT_VIEW cascade * ERROR at line 1: ORA-01918: user 'MGMT_VIEW' does not exist SQL> drop user SYSMAN_TYPES cascade; User dropped. SQL> drop user SYSMAN_OPSS cascade; drop user SYSMAN_OPSS cascade * ERROR at line 1: ORA-01918: user 'SYSMAN_OPSS' does not exist SQL> drop user SYSMAN_STB cascade; drop user SYSMAN_STB cascade * ERROR at line 1: ORA-01918: user 'SYSMAN_STB' does not exist SQL> drop user SYSMAN_RO cascade; drop user SYSMAN_RO cascade * ERROR at line 1: ORA-01918: user 'SYSMAN_RO' does not exist SQL> drop user SYSMAN122140_OPSS cascade; User dropped.