Сообщение отдельно
09.07.2009 12:23
OlegON
 
Для особо запущенных случаев:
Цитата:
1. Please set the following environment variables
ORACLE_SID
ORACLE_HOSTNAME

2.Delete DB Control Configuration Files Manually:
- Remove the following directories from your filesystem:
<ORACLE_HOME>/<hostname_sid>
<ORACLE_HOME>/oc4j/j2ee/OC4J_DBConsole_<hostname>_<sid>


3. Delete DB Control Repository Objects Manually

Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management
objects:
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP RESTRICT;
SQL> EXEC sysman.emd_maintenance.remove_em_dbms_jobs;
SQL> EXEC sysman.setEMUserContext('',5);
SQL> REVOKE dba FROM sysman;
SQL> 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 mgmt_view CASCADE;
SQL> DROP ROLE mgmt_user;
SQL> DROP USER sysman CASCADE;
SQL> ALTER SYSTEM DISABLE RESTRICTED SESSION;

The above will completely delete the DB Control repository from the database;
under certain circumstances (e.g. you want to recreate the repository later on)
the following statements may be sufficient to remove the repository:

Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and
management objects:
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;


4.Having done the above, it is recommended that you reboot the machine once.
This step is often skiped but many times we have found that in Windows systems,
a reboot becomes essential.

5. Create the DB Control Repository Objects and Configuration Files
<ORACLE_HOME>bin/emca -config dbcontrol db -repos drop
<ORACLE_HOME>bin/emca -config dbcontrol db -repos create

6. Then check the following:
6.1 emctl start dbconsole (any errors?)
6.2 emctl status dnconsole
6.3 emctl status agent
6.4 emctl upload