DBA > Articles

ORACLE OEM REPOSITORY RECREATION

By: Ferhat Ozturk
To read more DBA articles, visit http://dba.fyicenter.com/article/

DROP CURRENT REPOSITORY (If available)

In order to successfully create a new repository for OEM, you need to drop existing repository at first stage. There are a few operations you need to perform to have a clean drop operation. Operations are listed below:

EXEC sysman.emd_maintenance.remove_em_dbms_jobs;
DROP USER mgmt_view CASCADE;
DROP ROLE mgmt_user;
drop public synonym MGMT_TARGET_BLACKOUTS;
drop public synonym SETEMVIEWUSERCONTEXT;
DROP USER sysman CASCADE;
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;


After issuing these commands from sqlplus, you are ready to use emca program to drop your current OEM repository as below:

CREATE A NEW REPOSITORY FOR OEM

After entering correct information to EMCA’s questions, repository creation operation will start and under normal condition it would not raise an error and you will be successfully created a new repository for your OEM. When you see the successful completion message, you shall restart new windows service of OEM and try to open OEM page.

Full article...


Other Related Articles

... to read more DBA articles, visit http://dba.fyicenter.com/article/