SSTS Blog

Some news and tidbits that we share

Rebuilding EM DBconsole

by SSTS
SSTS
Server Side Technology Solutions is a consulting firm that specializes in databa
User is currently offline
on May 03 in Blog 0 Comments

On occasion I have had to rebuild EM Dbconsole. Using the documented procedures of emca requires that the database be in quiescent mode during the drop of the repository. The process below avoids this constraint:

I got some step missed this evening and took some time check my previous notes

(don't miss any step!)

rm -fr $ORACLE_HOME/<hostname>_<instance_name>
rm -fr $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname>_<instance_name>

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;


sql> drop user sysman cascade;
sql> drop role mgmt_user;
sql> drop user mgmt_view cascade;
sql> drop public synonym MGMT_TARGET_BLACKOUTS;
sql> drop public synonym SETEMVIEWUSERCONTEXT;

$ORACLE_HOME/bin/emca -config dbcontrol db -repos create
Tags: Untagged
Hits: 40140

About the author

SSTS

Server Side Technology Solutions is a consulting firm that specializes in database design, development and support.

Comments

Please login first in order for you to submit comments