Tuesday, March 1, 2011

Configuring EM db console 11gR2



While I was configuring my Enterprise Manager DB console for newly installed test database version 11.2.0.2, I found the following error.

E:\> emca -config dbcontrol db -repos recreate


STARTED EMCA at Mar 1, 2011 4:34:13 AM
EM Configuration Assistant, Version 11.2.0.2 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: testdb
Database Control is already configured for the database testdb
You have chosen to configure Database Control for managing the database testdb
This will remove the existing configuration and the default settings and perform
 a fresh configuration
Do you wish to continue? [yes(Y)/no(N)]: Y
Listener ORACLE_HOME [ E:\app\dbadmin\product\11.2.0\dbhome_1 ]:
Password for SYS user:
Password for DBSNMP user:
Invalid username/password.
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ E:\app\dbadmin\product\11.2.0\dbhome_1

Local hostname ................ testdb.velox-tech.com
Listener ORACLE_HOME ................ E:\app\dbadmin\product\11.2.0\dbhome_1
Listener port number ................ 1521
Database SID ................ testdb
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]:


..................
.................


WARNING: Error executing CMD /C E:\app\dbadmin\product\11.2.0\dbhome_1\bin\emctl
.bat deploy dbconsole -d testdb E:\app\dbadmin\product\11.2.0\dbhome_1\testdb.mh
d.co.om_testdb testdb.velox-tech.com:3938 testdb.velox-tech.com testdb
Feb 28, 2011 11:36:51 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Error instantiating EM configuration files
Refer to the log file at E:\app\dbadmin\cfgtoollogs\emca\testdb\emca_2011_02_28_
23_32_15.log for more details.
Could not complete the configuration. Refer to the log file at E:\app\dbadmin\cf
gtoollogs\emca\testdb\emca_2011_02_28_23_32_15.log for more details.



=========EMCA LOG CONTENTS=====================
CONFIG: Starting execution: CMD /C E:\app\dbadmin\product\11.2.0\dbhome_1\bin\emctl.bat deploy dbconsole -d testdb E:\app\dbadmin\product\11.2.0\dbhome_1\testdb.velox-tech.com_testdb testdb.velox-tech.com:3938 testdb.velox-tech.com testdb 
Mar 1, 2011 12:12:56 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: Exit value of 255
Mar 1, 2011 12:12:56 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: Creating shared install...
Source location: E:\app\dbadmin\product\11.2.0\dbhome_1
Destination (shared install) : E:\app\dbadmin\product\11.2.0\dbhome_1\testdb.velox-tech.com_testdb
DeployMode : dbconsole


Creating directories...
Setting console properties ... 
Setting log and trace files locations for Console ... 
Setting log and trace files locations for Agent ... 


Mar 1, 2011 12:12:56 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: OpenSCManager FAILED: Access is denied.




Service creation failed. Aborting...


Mar 1, 2011 12:12:56 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing CMD /C E:\app\dbadmin\product\11.2.0\dbhome_1\bin\emctl.bat deploy dbconsole -d testdb E:\app\dbadmin\product\11.2.0\dbhome_1\testdb.velox-tech.com_testdb testdb.velox-tech.com:3938 testdb.velox-tech.com testdb 
Mar 1, 2011 12:12:56 AM oracle.sysman.emcp.EMAgentConfig instantiateEMConfigFiles
CONFIG: Failed to deploy state dirs
Mar 1, 2011 12:12:56 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Error instantiating EM configuration files
Refer to the log file at E:\app\dbadmin\cfgtoollogs\emca\testdb\emca_2011_03_01_00_08_16.log for more details.
Mar 1, 2011 12:12:56 AM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace: 
oracle.sysman.emcp.exception.EMConfigException: Error instantiating EM configuration files
at oracle.sysman.emcp.EMAgentConfig.updateAgentConfigFiles(EMAgentConfig.java:3386)
at oracle.sysman.emcp.EMAgentConfig.performConfiguration(EMAgentConfig.java:1416)
at oracle.sysman.emcp.EMAgentConfig.invoke(EMAgentConfig.java:293)
at oracle.sysman.emcp.EMAgentConfig.invoke(EMAgentConfig.java:271)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:259)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:590)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1453)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:574)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:522)
Mar 1, 2011 12:12:56 AM oracle.sysman.emcp.EMConfig restoreOuiLoc
CONFIG: Restoring oracle.installer.oui_loc to E:\app\dbadmin\product\11.2.0\dbhome_1\oui
=========EMCA LOG CONTENTS=====================


Solution :
1>remove the directories HOSTNAME_SID  and OC4J_DBConsole_HOSTNAME_SID
from $ORACLE_HOME and $ORACLE_HOME\oc4j\j2ee  respectively

e.g:
 testdb.velox-tech.com_testdb under E:\app\dbadmin\product\11.2.0\dbhome_1\
and 
OC4J_DBConsole_testdb.velox-tech.com_testdb under E:\app\dbadmin\product\11.2.0\dbhome_1\oc4j\j2ee

2>Drop sysman user and it's contents 
drop user sysman cascade;
drop role MGMT_USER;
drop user MGMT_VIEW cascade;
drop public synonym MGMT_TARGET_BLACKOUTS;
drop public synonym SETEMVIEWUSERCONTEXT;

3>Remove OracleDBconsoletestdb service from registry (Windows O/S)
a. Go to Start -> Run -> type regedit.
b. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OracleDBConsole[SID].
c. Delete OracleDBConsole[SID] key ( delete).

4>Add entries in hosts file with fully qualified domain name 

# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

150.1.* .***   testdb.velox-tech.com     testdb

5>check permission for DBA group 


Now you can start the process of configuring DB Console.
E:\> emca -config dbcontrol db -repos recreate

1 comment: