A month ago, I wrote an article about OEM configuration when the database hostname or ip address changed. You can find that in this link https://taliphakanozturken.wordpress.com/2011/12/31/oem-configuration-when-the-database-host-name-or-ip-address-changes/ .
We can get an error while re-creating (emca -config dbcontrol db -repos create) OEM repository as below:
SEVERE: Error creating the repository
Refer to the log file at /oracle/cfgtoollogs/emca/TALIPDB/emca_2012_01_20_12_07_21.log for more details.
Could not complete the configuration. Refer to the log file at /oracle/cfgtoollogs/emca/TALIPDB/emca_2012_01_20_12_07_21.log for more details.
The error is also seen in the log file of errors is analyzed you can see following lines (/oracle/cfgtoollogs/emca/TALIPDB/emca_2012_01_20_12_07_21.log).
CONFIG: ORA-00955: name is already used by an existing object
CONFIG: ORA-01921: role name ‘MGMT_USER’ conflicts with another user or role name
In this case we must do following operations in SQL*Plus.
SQL> DROP USER SYSMAN CASCADE;
SQL> DROP ROLE MGMT_USER;
SQL> DROP USER MGMT_VIEW;
SQL> spool synonym.sql
SQL> select ‘drop public synonym ‘||object_name||’;’ from dba_objects where object_type=’SYNONYM’ and and object_name like ‘MGMT_%’ and status=’INVALID’;
SQL> spool off
Now, please retry to create OEM respository. It will be success.
emca -config dbcontrol db -repos create
Talip Hakan Öztürk