Sie sind auf Seite 1von 3

OEM - STEPS TO MANUALLY DROP DBCONSOLE REPOSITORY IN 11g

MANUALLY DROP DBCONSOLE REPOSITORY


In 10g when you use EMCA utility to drop/recreate the repository, Oracle puts the database
in a quiesced state. I.e. All user access will be temporarily halted. But starting from
11.2.X, you can safely ignore the Warning; because Oracle never puts the database in quiesce
state. Lets start manually to drop Database Console and its repository in 11g.

# Stop DBConsole Process


$ export ORACLE_SID=devdb
$ emca stop dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
Copyright (c) 1996, 2013 Oracle Corporation.

All rights reserved.

https://ausdev.com:5502/em/console/aboutApplication
Stopping Oracle Enterprise Manager 11g Database Control ...
...

Stopped.

# Crosscheck any of the following Process is running from $ORACLE_HOME


$ ps ef | grep dbconsole
$ ps ef | grep emwd
$ ps ef | grep emagent
$ ps ef | grep java
Logon SQLPLUS as user SYS or SYSTEM, and drop the SYSMAN account and management objects:
Perform the following steps to manually remove database control.
# Remove all Jobs for the SYSMAN user
SYS> EXEC sysman.emd_maintenance.remove_em_dbms_jobs;
PL/SQL procedure successfully completed.
SYS> EXEC sysman.setEMUserContext('',5);
PL/SQL procedure successfully completed.
# Drop user SYSMAN and MGMT_VIEW and associated Objects
SYS> drop user sysman cascade;
User dropped.
SYS> drop role MGMT_USER;
Role dropped.
SYS> drop user MGMT_VIEW cascade;
User dropped.

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

OEM - STEPS TO MANUALLY DROP DBCONSOLE REPOSITORY IN 11g

SYS> drop public synonym MGMT_TARGET_BLACKOUTS;


Synonym dropped.
SYS> drop public synonym SETEMVIEWUSERCONTEXT;
Synonym dropped.
SYS> drop public synonym mgmt_severity_array;
Synonym dropped.
SYS> drop public synonym mgmt_guid_obj;
Synonym dropped.

# Verify any leftover object owned by SYSMAN


SYS> SELECT owner, table_name, synonym_name name FROM dba_synonyms
WHERE table_owner = 'SYSMAN';
.
.
.
[Trimmed]
318 rows selected.
You can see some rows (public Synonyms/any rows) are returned by the above query.
# To drop all associated Objects from SYSMAN
SYS> 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;
/
PL/SQL procedure successfully completed.
SYS> SELECT owner, table_name, synonym_name name FROM dba_synonyms
WHERE table_owner = 'SYSMAN';
no rows selected

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

OEM - STEPS TO MANUALLY DROP DBCONSOLE REPOSITORY IN 11g

DROP DBCONSOLE CONFIGURATION FILES AND DIRECTORIES

$ORACLE_HOME/<HOST_SID>
$ cd $ORACLE_HOME
$ rm rf ausdev.com_devdb/
$ORACLE_HOME/oc4j/j2ee/oc4j_DBConsole_<HOSTNAME>_<SID>
$ cd $ORACLE_HOME/oc4j/j2ee
$ rm rf /oc4j/j2ee/OC4J_DBConsole_ausdev.com_devdb

Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu

Das könnte Ihnen auch gefallen