Sunday, June 18, 2017

Enabling EM in Oracle 11g if Disabled

The Steps below shows how to enable Enterprise Manager (EM) in Oracle 10g and 11g. This is needed if EM was disabled during database creation.

To do this follow the steps below:

1)    Make sure the "hosts" file contains at least the loopback address.

2)    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

In Windows do the same in the “Environment Variables”

3)    Now Check and verify whether the listener service is running correctly or not by running the command:                                                                                                                                                           
$ lsnrctl status

4)    Next, check the Enterprise Manager service is running.
$ emctl start dbconsole

5)    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:
$ emca -config dbcontrol db -repos recreate

Now we will be asked to enter the database credentials as shown below:

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: ORCL
Database Control is already configured for the database ORCL
You have chosen to configure Database Control for managing the database ORCL
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 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):