My Signature Article
Tips:
Oracle Certification - Tips
DBA Preparation - Tips
Practical DBA - Tips
First you should check database/instance configure for DATABASE CONTROL
If a hostname_sid directory does not exist in the Oracle Database 10g home directory, then the Oracle Enterprise Manager 10g Database Control Console was not configured for the database instance.
E:\>set oracle_sid=db01
E:\>emctl getemhome
Oracle Enterprise Manager 10g Database Control Release 10.1.0.2.0
Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved.
EMHOME=C:\oracle\product\10.1.0\Db_1/taj.domainname.local_db01
If you get above output mean DATABASE configure FOR DB CONTROL otherwise DATABASE is not configure for DB CONTROL and you will see message like "EM Configuration issue".
We can configure DATABASE/INSTANCE for DB CONTROL through TWO WAY
1.DBCA
2.EMCA
DBCA
E:\>set oracle_sid=sh
E:\>emctl status dbconsole
OC4J Configuration issue. C:\oracle\product\10.1.0\Db_1/oc4j/j2ee/OC4J_DBConsole
_taj.domainname.local_sh not found.
E:\>dbca
Note : dbca ---> Configure Database option ---> Select DB and give PWD ---> Check Mark on Configure database with enterprise manager. ---> Finish
E:\>set oracle_sid=sh
E:\>emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.1.0.2.0
Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved.
http://taj.domainname.local:5503/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory C:\oracle\product\10.1.0\Db_1/taj.domainname.local_sh/sysman/log
--------------------------------------------------------------
You can also Configure Database Control through EMCA command line utility.
E:\>set oracle_sid=db01
E:\>emca
STARTED EMCA at Thu Jan 11 10:39:37 GST 2007
Enter the following information about the database to be configured
Listener port number: 1521
Database SID: db01
Service name: db01
Email address for notification:
Email gateway for notification:
Password for dbsnmp:
Password for sysman:
Password for sys:
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ C:\oracle\product\10.1.0\Db_1
Enterprise Manager ORACLE_HOME ................ C:\oracle\product\10.1.0\Db_1
Database host name ................ taj.domainname.local
Listener port number ................ 1521
Database SID ................ db01
Service name ................ db01
Email address for notification ...............
Email gateway for notification ...............
-----------------------------------------------------------------
Do you wish to continue? [yes/no]: yes
Jan 11, 2007 10:40:22 AM oracle.sysman.emcp.EMConfig checkConfiguration
SEVERE: Repository already exists. Fix the error(s) and run EM Configuration As
sistant again in standalone mode.
Could not complete the configuration. Refer to the log file for details
emca -r :skip creation of repository schema
E:\>emca -r
STARTED EMCA at Thu Jan 11 10:42:33 GST 2007
Enter the following information about the database to be configured
Listener port number: 1521
Database SID: db01
Service name: db01
Email address for notification:
Email gateway for notification:
Password for dbsnmp:
Password for sysman:
Password for sys: :
Password for sys:
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ C:\oracle\product\10.1.0\Db_1
Enterprise Manager ORACLE_HOME ................ C:\oracle\product\10.1.0\Db_1
Database host name ................ taj.domainname.local
Listener port number ................ 1521
Database SID ................ db01
Service name ................ db01
Email address for notification ...............
Email gateway for notification ...............
-----------------------------------------------------------------
Do you wish to continue? [yes/no]: yes
Jan 11, 2007 10:42:59 AM oracle.sysman.emcp.EMConfig updateReposVars
INFO: Updating file C:\oracle\product\10.1.0\Db_1\sysman\emdrep\config\repositor
y.variables ...
Jan 11, 2007 10:43:05 AM oracle.sysman.emcp.util.PortQuery findUsedPorts
INFO: Searching services file for used port
Jan 11, 2007 10:43:08 AM oracle.sysman.emcp.EMConfig addPortEntries
INFO: Updating file C:\oracle\product\10.1.0\Db_1\install\portlist.ini ...
Jan 11, 2007 10:43:09 AM oracle.sysman.emcp.EMConfig updateEmdProps
INFO: Updating file C:\oracle\product\10.1.0\Db_1\sysman\config\emd.properties .
..
Jan 11, 2007 10:43:10 AM oracle.sysman.emcp.EMConfig updateConfigFiles
INFO: targets.xml file is updated successfully
Jan 11, 2007 10:43:10 AM oracle.sysman.emcp.EMConfig updateEmomsProps
INFO: Updating file C:\oracle\product\10.1.0\Db_1\sysman\config\emoms.properties
...
Jan 11, 2007 10:43:10 AM oracle.sysman.emcp.EMConfig updateConfigFiles
INFO: emoms.properties file is updated successfully
Jan 11, 2007 10:43:12 AM oracle.sysman.emcp.EMConfig startOMS
INFO: Starting the DBConsole ...
Jan 11, 2007 10:44:53 AM oracle.sysman.emcp.EMConfig perform
INFO: DBConsole is started successfully
Jan 11, 2007 10:44:53 AM oracle.sysman.emcp.EMConfig perform
INFO: >>>>>>>>>>> The Enterprise Manager URL is http://taj.domainname.lo
cal:5504/em <<<<<<<<<<<>Agent Unreachable
First check agent services is start or not.
e:\>set oracle_sid=db01
e:\>emctl status agent
if stop or not running then start
e:\>emctl start agent
or check log file for more info.
OracleHome\Db_1\localhost_sid\sysman\log
------------------------------------------------------------
Io exception: SO Exception was generated
INFO: Block size for SYSAUX is greater than or equal to 8K
INFO: Job queue size is greater than or equal to 10
or check log file for more info.
Oracle_Home\Db_1\cfgtoollogs\emca_repos_xxxx.log
For above error because of your not drop repository properly.
SQL> DECLARE
2 CURSOR c1 IS
3 SELECT owner, synonym_name name
4 FROM dba_synonyms
5 WHERE table_owner = 'SYSMAN';
6
7 BEGIN
8 FOR r1 IN c1
9 LOOP
10 IF r1.owner = 'PUBLIC' THEN
11 EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM 'r1.name;
12 ELSE
13 EXECUTE IMMEDIATE 'DROP SYNONYM 'r1.owner'.'r1.name;
14 END IF;
15 END LOOP;
16 END;
17 /
PL/SQL procedure successfully completed.
SQL> DROP ROLE mgmt_user;
Role dropped.
SQL> drop user mgmt_view cascade;
User dropped.
SQL> drop user sysman cascade;
User dropped.
------------------------------------------------------------------
After drop complete repository you can create new repository through EMCA.
E:\>emca
STARTED EMCA at Thu Jan 11 18:13:11 GST 2007
Enter the following information about the database to be configured
Listener port number: 1521
Database SID: db01
Service name: db01
Email address for notification:
Email gateway for notification:
Password for dbsnmp:
Password for sysman:
Password for sys: :
Password for sys:
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ C:\oracle\product\10.1.0\Db_1
Enterprise Manager ORACLE_HOME ................ C:\oracle\product\10.1.0\Db_1
Database host name ................ taj.domainname.local
Listener port number ................ 1521
Database SID ................ db01
Service name ................ db01
Email address for notification ...............
Email gateway for notification ...............
-----------------------------------------------------------------
Do you wish to continue? [yes/no]: yes
DBConsole is already configured for the database db01
Would you like to re-configure DBConsole for the specified database? [yes/no]: y
es
Make sure that DBConsole has been shutdown
When you are ready to continue, press
Jan 11, 2007 6:13:27 PM oracle.sysman.emcp.EMConfig updateReposVars
INFO: Updating file C:\oracle\product\10.1.0\Db_1\sysman\emdrep\config\repositor
y.variables ...
Jan 11, 2007 6:19:07 PM oracle.sysman.emcp.EMConfig createRepository
INFO: Creating repository ...
Jan 11, 2007 6:19:07 PM oracle.sysman.emcp.EMConfig perform
INFO: Repository was created successfully
Jan 11, 2007 6:19:15 PM oracle.sysman.emcp.EMConfig stopOMS
INFO: Stopping the DBConsole ...
Jan 11, 2007 6:19:21 PM oracle.sysman.emcp.EMConfig addPortEntries
INFO: Updating file C:\oracle\product\10.1.0\Db_1\install\portlist.ini ...
Jan 11, 2007 6:19:21 PM oracle.sysman.emcp.EMConfig updateEmdProps
INFO: Updating file C:\oracle\product\10.1.0\Db_1\sysman\config\emd.properties .
..
Jan 11, 2007 6:19:23 PM oracle.sysman.emcp.EMConfig updateConfigFiles
INFO: targets.xml file is updated successfully
Jan 11, 2007 6:19:23 PM oracle.sysman.emcp.EMConfig updateEmomsProps
INFO: Updating file C:\oracle\product\10.1.0\Db_1\sysman\config\emoms.properties
...
Jan 11, 2007 6:19:23 PM oracle.sysman.emcp.EMConfig updateConfigFiles
INFO: emoms.properties file is updated successfully
Jan 11, 2007 6:19:34 PM oracle.sysman.emcp.EMConfig startOMS
INFO: Starting the DBConsole ...
Jan 11, 2007 6:21:13 PM oracle.sysman.emcp.EMConfig perform
INFO: DBConsole is started successfully
Jan 11, 2007 6:21:13 PM oracle.sysman.emcp.EMConfig perform
INFO: >>>>>>>>>>> The Enterprise Manager URL is http://taj.domainname.lo
cal:5504/em <<<<<<<<<<<>
Note : In 10.1.0.2.0 RepManager is not working properly so that we are not able to use below command.
emca -config dbcontrol db -repos recreate
If is working in 10.1.0.3.0
for you have to manully drop repository and create again.
Related Links
1. http://dbataj.blogspot.com/2007/07/error-during-dbconsole-shutting-down.html
2. http://dbataj.blogspot.com/2007/07/change-sysman-password.html
3. http://dbataj.blogspot.com/2007/07/e-mail-notification.html
4. http://dbataj.blogspot.com/2007/06/enabling-isqlplus-dba-access.html
5. http://dbataj.blogspot.com/2007/04/export-database-with-sysdba-role.html
15 comments:
Hi, Taj:
do you need to shutdown db to put it into a restricted mode to drop the repositary and user?
thanks
Hi,
Yes You need to shutdown your database.
like
[code]
shutdown immediate;
SQL> STARTUP RESTRICT;
After drop repository. again disable restricted session.
SQL>ALTER SYSTEM DISABLE RESTRICTED SESSION;
Hope this helps
Taj
Hi Taj,
Just like to say thank you for your tips i was able to run the EM for Oracle 10g after changing the hostname.
Thanks again!
tinz
Hi,
You are Welcome !!!
regards
Taj
Hi Taj,
I am not a technical person but I have a virtual machine too on my laptop along with Oracle 10G. As soon as I start the virtual machine with Linux, the EM home changes and points to the linux host name. How do I run both of them simultaneously.
Pankaj
Hi,
Without Virtual Machine are you able to access OEM.
regards
Taj
Dear Taj;
I have installed Oracle 10g on Window XP platform on my standalone machine and everything seemed fine during installation. I am able to run the commands from command prompt and SQL prompt. But after loggin in under EM, I am unable to proceed further.
While logging the EM does not throw any error message as wrong user or password, but it does not proceed to next page too.
From Command prompt following reading shows:-
emctl status agent shows Agent is running and ready.
emctl status dbconsole shows Oracle 10g EM is running.
NOW HOW TO SUCCESSFULLY LOG THROUGH EM... CAN YOU HELP ME PLEASE.
Regards-
rsp.
Hi, What does 2 SIDs: db01 and sh represent?
-Vincent
Hi,
"DB01","SH" is Database Name.
I have Two Database.
"DB01" is configure for DATABASE CONTROL.
"E:\>set oracle_sid=db01
E:\>emctl getemhome
Oracle Enterprise Manager 10g Database Control Release 10.1.0.2.0
Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved.
EMHOME=C:\oracle\product\10.1.0\Db_1/alwarid-taj.fakhruddin.local_db01"
"SH" is not configure for DATABASE CONTROL
E:\>set oracle_sid=sh
E:\>emctl status dbconsole
OC4J Configuration issue. C:\oracle\product\10.1.0\Db_1/oc4j/j2ee/OC4J_DBConsole
_alwarid-taj.fakhruddin.local_sh not found.
For just example i used TWO DATABASE.
Regards
Taj
Taj, I am unable to restart dbconsole on an Oracle Database 10.2.0.1.0 instance. OEM was running successfully prior to performing an RMAN backup. After the backup I was unable to start agent or dbconsole. Below are some logs, trc file outputs. The os is Linux AS Release 4.
tail emagent.trc
2007-09-20 11:09:41 Thread-4136475296 ERROR main: nmehl_startHttpListener failed starting http listener
2007-09-20 11:20:06 Thread-4136475296 ERROR http: snmehl_allocateListenerPort: failed to bind socket: Address already in use (errno=98)
2007-09-20 11:20:06 Thread-4136475296 ERROR http: nmehl_startHttpListener: failed to listen to HTTP port for http://vader.abc.bbb.com:3938/emd/main
tail emagent.log
2007-09-20 10:33:03 Thread-4136475296 EMAgent normal shutdown (00703)
2007-09-20 10:33:29 Thread-4136475296 Starting Agent 10.1.0.4.1 from /u00/oracle/product/10.2/db_1 (00701)
2007-09-20 10:33:34 Thread-4136475296 EMAgent started successfully (00702)
2007-09-20 10:59:59 Thread-4136475296 EMAgent normal shutdown (00703)
2007-09-20 11:01:53 Thread-4136475296 Starting Agent 10.1.0.4.1 from /u00/oracle/product/10.2/db_1 (00701)
tail emdctl.trc
2007-09-20 12:07:23 Thread-4136474848 WARN http: snmehl_connect: connect failed to (vader.abc.bbb.com:3938): Connection refused (error = 111)
2007-09-20 12:07:24 Thread-4136474848 WARN http: snmehl_connect: connect failed to (vader.abc.bbb.com:3938): Connection refused (error = 111)
tail emagent.nohup
----- Thu Sep 20 12:02:34 2007::Exiting watchdog loop -----
----- Thu Sep 20 12:06:59 2007::Agent Only Monitor. -----
----- Thu Sep 20 12:07:00 2007::Agent Launched with PID 24142 at time Thu Sep 20 12:07:00 2007 -----
(pid=24142): starting emagent version 10.1.0.4.1
(pid=24142): emagent now exiting abnormally - initialization failure. Consult '.trc' and '.log' files.
----- Thu Sep 20 12:07:30 2007::EMAgent exited at Thu Sep 20 12:07:30 2007 with return value 55. -----
----- Thu Sep 20 12:07:30 2007::EMAgent has exited due to initialization failure. -----
----- Thu Sep 20 12:07:30 2007::Stopping other components. -----
----- Thu Sep 20 12:07:30 2007::Commiting Process death. -----
----- Thu Sep 20 12:07:30 2007::Exiting watchdog loop -----
Prior to this I was unable to backup DB via OEM I had to use RMAN. The database is up but I am unable to access it via OEM and I and unable to start agents, dbconsole, etc. Additionally this instance houses HTML DB which was installed via the companion disk. Any insight would most appreciated.
Hi taj, I just installed Oracle 10G OIM and during the database creation there was an error regarding the repository and it tells me to run later the emca utility. However when I tried to use the emca and has set all the parameters like port, sid, etc. there was this error that the repository is already existing. My problem is that I cannot start my dbconsole and whenever i tried it it takes too long and will end up to failed.
What should I do in this case? should I drop the repository? and recreate again since reconfiguration is not able to work? please advise thanks!
Restart is not needed.
http://arjudba.blogspot.com/2008/04/how-to-drop-create-and-recreate-db.html
...Restart is not needed....
Which services your talking about?
If you talking about DBCONSOLE services then it is needed to stop before drop otherwise you will get error message.
Greetings! I know this is kinda off topic
nevertheless I'd figured I'd ask. Would you be interested in
exchanging links or maybe guest writing a blog post or
vice-versa? My website goes over a lot of the
same subjects as yours and I think we could greatly benefit
from
each other. If you are interested feel free to
shoot me an email. I look forward to hearing from you! Fantastic blog by the way!
Also visit my web site :: rollators heavy duty
Lovely website! I am loving it!! Will come back again. I am bookmarking your feeds
also.
Feel free to visit my website ... facebook of sex, www.monthelmos.gr,
Post a Comment