Yesterday I was installing OMS 121.0.4 and got below error while attempting to connect to database:-
OMS 12.1.0.4 installation failed with "The database details which you have provided doesn't contain valid Management Repository. Provide correct database details and retry"
Cause :-
Generally this error comes when the database we are using as OMS database was already used as a database for OMS installation before or A failed OMS installation already happened using this database.
Solution :-
we have to properly clean the database before using it again as a OMS database :-
Below steps I did to clean my database :-
1. Drop sysman related schemas.
DROP USER SYSMAN CASCADE; ( will take time)
DROP USER SYSMAN_OPSS CASCADE;
DROP USER SYSMAN_MDS CASCADE;
DROP USER SYSMAN_APM CASCADE;
DROP USER SYSMAN_RO CASCADE;
2. Remove Synonyms related to sysman accounts :-
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;
/
3. Removing remaining Objects and tablespaces :-
DROP USER mgmt_view CASCADE;
DROP TABLESPACE mgmt_ecm_depot_ts INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
DROP TABLESPACE mgmt_tablespace INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
DROP TABLESPACE mgmt_ad4j_ts INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
4. As proper database cleaning using RepManager dropall didn't happen, so we have to clean up the registry details :-
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;
5. Now the database clean up completed, Please continue with the installation, I tried and it completed successfully.
I hope this article helped you, Please go through the below article also for proper error details :-
https://sites.google.com/site/yetanotherocm/home/system-builds/cronulla/07-complete-oms-12-1-0-3-1-installation
Thanks
Amit Rath
OMS 12.1.0.4 installation failed with "The database details which you have provided doesn't contain valid Management Repository. Provide correct database details and retry"
Cause :-
Generally this error comes when the database we are using as OMS database was already used as a database for OMS installation before or A failed OMS installation already happened using this database.
Solution :-
we have to properly clean the database before using it again as a OMS database :-
Below steps I did to clean my database :-
1. Drop sysman related schemas.
DROP USER SYSMAN CASCADE; ( will take time)
DROP USER SYSMAN_OPSS CASCADE;
DROP USER SYSMAN_MDS CASCADE;
DROP USER SYSMAN_APM CASCADE;
DROP USER SYSMAN_RO CASCADE;
2. Remove Synonyms related to sysman accounts :-
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;
/
3. Removing remaining Objects and tablespaces :-
DROP USER mgmt_view CASCADE;
DROP TABLESPACE mgmt_ecm_depot_ts INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
DROP TABLESPACE mgmt_tablespace INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
DROP TABLESPACE mgmt_ad4j_ts INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
4. As proper database cleaning using RepManager dropall didn't happen, so we have to clean up the registry details :-
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;
5. Now the database clean up completed, Please continue with the installation, I tried and it completed successfully.
I hope this article helped you, Please go through the below article also for proper error details :-
https://sites.google.com/site/yetanotherocm/home/system-builds/cronulla/07-complete-oms-12-1-0-3-1-installation
Thanks
Amit Rath
Thanks Amit, it helped me restart the install by cleaning OMS contents. But, I have a different issue in the OMS configuration step.
ReplyDeletePlease share you issue here, if I will try to help.
DeleteThanks
Amit Rath
The installation process failed at the OMS Configuration step, 61% completed.
DeleteCode of Exception: Error occured while performing nmConnect : Cannot connect to Node Manager. : Access to domain 'GCDomain' for user 'nodemanager' denied
If you have any ideas on causes for the failures, please let me know.
SQL> DROP TABLESPACE sys.mgmt_ecm_depot_ts INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
ReplyDeleteDROP TABLESPACE mgmt_tablespace INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
DROP TABLESPACE sys.mgmt_ecm_depot_ts INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS
ERROR at line 1:
ORA-00959: tablespace 'MGMT_TABLESPACE' does not exist
SQL> SQL> DROP TABLESPACE mgmt_ad4j_ts INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS
*
ERROR at line 1:
ORA-00959: tablespace 'MGMT_AD4J_TS' does not exist
SQL> select name from v$tablespace;
NAME
------------------------------
SYSAUX
SYSTEM
UNDOTBS1
USERS
TEMP
SYSTEM
SYSAUX
TEMP
SYSTEM
SYSAUX
TEMP
USERS
MGMT_ECM_DEPOT_TS
MGMT_TABLESPACE
MGMT_AD4J_TS
15 rows selected.
In fact tablespace is there,, but drop statements says "not exist" !!
I run from sys user ( sys / as sysdba )
Any solution
Hi,
DeleteIt can be a case issue, please use " " for referring the name of the tablespace and don't use sys.tablespace for dropping the tablespace.
Thanks
Amit Rath
Hi Amit, is there any way for reuse the database with before installation of OMS??(OEM 12c)and avoid configurate all components again......because i try to install a clean installation of OEM 13c but in step of database connections i recieve error:"the reference database doesn't contain a valid management repository"....
ReplyDeleteRegards
Pablo
HI ,
DeleteIf your getting the above error that the reference database doesn't contain a valid management repository, means the cleanup is not successful, please clean the database with steps mention in the post and try the installation again.
Thanks
Amit Rath
Thanks for the steps
ReplyDeleteDROP USER SYSMAN CASCADE; gives error
ReplyDeleteORA-01940: cannot drop a user that is currently connected
01940. 00000 - "cannot drop a user that is currently connected"
*Cause: Attempt was made to drop a user that is currently logged in.
*Action: Make sure user is logged off, then repeat command.