17 апреля 2008 г.

Удаление репозитария Enterprise Manager Database Control

При удалении Enterprise Manager Database Control repository с помощью команды

emca -deconfig dbcontrol db -repos drop

процесс может зависнуть на неопреленное время:

oracle@myhost$ emca -deconfig dbcontrol db -repos drop

STARTED EMCA at Apr 17, 2008 5:08:41 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:
Database SID: TESTDB
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:

Do you wish to continue? [yes(Y)/no(N)]: Y
Apr 17, 2008 5:08:53 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /zones/u01/app/oracle/product/10.2.0/cfgtoollogs/emca/TESTDB/emca_2008-04-17_05-08-41-PM.log.
Apr 17, 2008 5:08:54 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Apr 17, 2008 5:08:59 PM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...


Одной из причин, может быть то, что у пользователя SYSMAN есть активные сессии в базе данных. Вырезка из документации:

"While installing Enterprise Manager using existing database, Oracle Management Service configuration hangs while dropping the repository. This is due to active SYSMAN sessions connected to the database.

To resolve this issue, shutdown any existing Enterprise Manager sessions (both Grid Control and Database Control) or other SQLPLUS SYSMAN sessions."


Также, следует удалить файлы с расширением *.lck в директориях $ORACLE_HOME/cfgtoollogs/emca и $ORACLE_HOME/cfgtoollogs/emca/$ORACLE_SID.