oracle l
TRANSCRIPT
-
7/29/2019 Oracle l
1/6
Basic Enterprise Manager Troubleshooting
The web-based Enterprise Manager tool was introduced in Oracle 10g and has significant
functionality improvements over previous versions. Even so, it seems there is not a day goes by
without someone asking how to solve an Enterprise Manager configuration issue, so this articleexplains the first things you should look at. It's not meant to be an all encompassing guide. Just a
first shot.
Make sure the "/etc/hosts" file contains at least the loopback address and preferably the machine
definition also.
127.0.0.1 localhost.localdomain localhost
192.168.0.181 myserver.localdomain myserver
If you are using 11g, make sure the ORACLE_HOSTNAME and ORACLE_UNQNAME
environment variables are set correctly.
ORACLE_HOSTNAME=myserver.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
Check the listener is running correctly.
lsnrctl status
If you get something like the following, your listener is not running and you need to start it using
the "lsnrctl start" command.
$ lsnrctl status
LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 13-MAR-2009 13:32:49
Copyright (c) 1991, 2008, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oel5-
11g.localdomain)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter errorTNS-00511: No listener
Linux Error: 111: Connection refused
$
Next, check the Enterprise Manager service is running.
$ emctl start dbconsole
-
7/29/2019 Oracle l
2/6
Assuming the console is already running, or fails to start, the next thing to do is to reconfigure
Enterprise Manager. This is done using the Enterprise Manager Configuration Assistant
(EMCA). For a first attempt, run the following command. Remember to add the "-cluster" option
to the end for RAC databases.
$ emca -config dbcontrol db -repos recreate
If it all goes well you would expect to see something like this.
$ emca -config dbcontrol db -repos recreate
STARTED EMCA at Mar 13, 2009 11:32:35 AM
EM Configuration Assistant, Version 11.1.0.7.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: DB11G
Database Control is already configured for the database DB11G
You have chosen to configure Database Control for managing the database DB11GThis 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 port number: 1521
Password for SYS user:
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 ................ /u01/app/oracle/product/11.1.0/db_1
Local hostname ................ oel5-11g.localdomain
Listener port number ................ 1521
Database SID ................ DB11G
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Mar 13, 2009 11:33:19 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at
/u01/app/oracle/cfgtoollogs/emca/DB11G/emca_2009_03_13_11_32_35.log.
Mar 13, 2009 11:33:20 AM oracle.sysman.emcp.util.PortManager isPortInUseWARNING: Specified port 5540 is already in use.
Mar 13, 2009 11:33:20 AM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5520 is already in use.
Mar 13, 2009 11:33:20 AM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 1158 is already in use.
Mar 13, 2009 11:33:20 AM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 3938 is already in use.
Mar 13, 2009 11:33:20 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
-
7/29/2019 Oracle l
3/6
Mar 13, 2009 11:33:22 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Mar 13, 2009 11:35:12 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Mar 13, 2009 11:35:12 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Mar 13, 2009 11:40:06 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Mar 13, 2009 11:40:11 AM oracle.sysman.emcp.EMReposConfig
uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while)
...
Mar 13, 2009 11:41:01 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Mar 13, 2009 11:41:07 AM oracle.sysman.emcp.util.DBControlUtil
configureSoftwareLib
INFO: Software library configured successfully.
Mar 13, 2009 11:41:07 AM oracle.sysman.emcp.EMDBPostConfig
configureSoftwareLibrary
INFO: Deploying Provisioning archives ...
Mar 13, 2009 11:41:16 AM oracle.sysman.emcp.EMDBPostConfigconfigureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Mar 13, 2009 11:41:16 AM oracle.sysman.emcp.util.DBControlUtil
secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Mar 13, 2009 11:41:28 AM oracle.sysman.emcp.util.DBControlUtil
secureDBConsole
INFO: Database Control secured successfully.
Mar 13, 2009 11:41:28 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Mar 13, 2009 11:42:31 AM oracle.sysman.emcp.EMDBPostConfig
performConfiguration
INFO: Database Control started successfully
Mar 13, 2009 11:42:34 AM oracle.sysman.emcp.EMDBPostConfig
performConfiguration
INFO: >>>>>> The Database Control URL is https://oel5-11g.localdomain:1158/em
-
7/29/2019 Oracle l
4/6
emca -deconfig dbcontrol db -repos drop
emca -config dbcontrol db -repos create
The deconfig will look something like this.
$ emca -deconfig dbcontrol db -repos drop
STARTED EMCA at Mar 13, 2009 12:09:48 PM
EM Configuration Assistant, Version 11.1.0.7.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: DB11G
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: Y
Mar 13, 2009 12:10:07 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at
/u01/app/oracle/cfgtoollogs/emca/DB11G/emca_2009_03_13_12_09_47.log.
Mar 13, 2009 12:10:08 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Mar 13, 2009 12:10:31 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Mar 13, 2009 12:11:56 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Mar 13, 2009 12:12:02 PM
$
The config will look something like this.
$ emca -config dbcontrol db -repos create
STARTED EMCA at Mar 13, 2009 12:37:27 PM
EM Configuration Assistant, Version 11.1.0.7.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: DB11G
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN 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 ................ /u01/app/oracle/product/11.1.0/db_1
Local hostname ................ oel5-11g.localdomain
Listener port number ................ 1521
-
7/29/2019 Oracle l
5/6
Database SID ................ DB11G
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Mar 13, 2009 12:37:54 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at
/u01/app/oracle/cfgtoollogs/emca/DB11G/emca_2009_03_13_12_37_27.log.
Mar 13, 2009 12:37:55 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Mar 13, 2009 12:42:03 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Mar 13, 2009 12:42:07 PM oracle.sysman.emcp.EMReposConfig
uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while)
...
Mar 13, 2009 12:42:57 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Mar 13, 2009 12:42:59 PM oracle.sysman.emcp.util.DBControlUtil
configureSoftwareLibINFO: Software library configured successfully.
Mar 13, 2009 12:42:59 PM oracle.sysman.emcp.EMDBPostConfig
configureSoftwareLibrary
INFO: Deploying Provisioning archives ...
Mar 13, 2009 12:43:07 PM oracle.sysman.emcp.EMDBPostConfig
configureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Mar 13, 2009 12:43:07 PM oracle.sysman.emcp.util.DBControlUtil
secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Mar 13, 2009 12:43:20 PM oracle.sysman.emcp.util.DBControlUtil
secureDBConsole
INFO: Database Control secured successfully.
Mar 13, 2009 12:43:20 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Mar 13, 2009 12:44:17 PM oracle.sysman.emcp.EMDBPostConfig
performConfiguration
INFO: Database Control started successfully
Mar 13, 2009 12:44:17 PM oracle.sysman.emcp.EMDBPostConfig
performConfiguration
INFO: >>>>>> The Database Control URL is https://oel5-11g.localdomain:5500/em
-
7/29/2019 Oracle l
6/6
For the vast majority of cases I come across, these steps solve the problem.
For more information see:
EMCA Troubleshooting Tips (10gR2)
Deleting and Creating Database Control Objects (11gR2)