Oracle 11g Logo

How to configure Enterprise Manager with Database Configuration Assistant

This article is about step by step approach to configure EM database control with DBCA.

Where as in earlier article we Configure Enterprise Manager Database Control Manually with Enterprise Manager Configuration Assistant.

Before start configuration:

  1. Ensure your listener properly configured and started.
  2. Ensure environment variable properly set.
  3. Ensure password file is created. (Optional)
  4. Ensure your /etc/hosts file mentioned below two lines.
[oracle@prod ~]$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.17.146 prod.localdomain prod

Set Environment Variable and instantiate DBCA utility as below:

[oracle@prod ~]$ export ORACLE_SID=orcl
[oracle@prod ~]$ export ORACLE_UNQNAME=orcl
[oracle@prod ~]$ export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1/
[oracle@prod ~]$ export PATH=$PATH:/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/
Instantiate Database Configuration Assistant

Instantiate Database Configuration Assistant

Database Configuration Assistant - Welcome

Select Configure Database Option and continue.

DBCA - Configure Database Option

DBCA – Configure Database Option

Select Database Instance and continue, In my case I have only ORCL database installed.

DBCA - Select Database Instance

DBCA – Select Database Instance

Select Configure Enterprise Manager check box and continue.

DBCA - Configure Enterprise Manager

DBCA – Configure Enterprise Manager

DBCA - Database content

DBCA – Database content

Provide SYS user credential and continue.

DBCA - Database Credentials

DBCA – Database Credentials

DBCA - Connection Mode

DBCA – Connection Mode

DBCA - Confirmation

DBCA – Confirmation

DBCA - Progress

DBCA – Progress

Configuration has completed successfully. Ensure your Database Control URL mentioned in snap shot, In my case its: https://prod.localdomain:5500/em.

Database Configuration Assistant - Enterprise Manager

Database Configuration Assistant – Enterprise Manager

To access your Enterprise Manager, Browse URL: https://localhost.localdomain:5500/em, like below and Confirm security Exception.

Enterprise Manager URL - Add Exception to browser

Enterprise Manager URL – Add Exception to browser

Enterprise Manager URL - Confirm Security Exception

Enterprise Manager URL – Confirm Security Exception

Provide Login credentials of SYS users to access EM for ORCL instance.

Enterprise Manager Login

Enterprise Manager Login

Enterprise Manager Instance Dashbord for ORCL.

Enterprise Manager Instance Dashbord

Enterprise Manager Instance Dashbord

Cheers!! Enterprise Manager configured Successfully.

Stay Tune. 🙂

Oracle 11g Logo

How to De-configure Enterprise Manager Database Control Manually with Enterprise Manager Configuration Assistant

Following is the only step by step approach to drop EM repos.

Before that:

  1. Ensure environment variable properly set.
  2. Ensure your listener properly configured and started.
  3. Ensure password file is created. (Optional)
  4. You need SYS,SYSMAN & DBSNMP password.
  5. Ensure your /etc/hosts file mentioned below two lines.
[oracle@prod ~]$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.17.146 prod.localdomain prod

Environment Variable:

export ORACLE_SID=orcl
export ORACLE_UNQNAME=orcl
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1/
export PATH=$PATH:/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/

Instantiate following command to deconfig Database Control with the help of EMCA.

[oracle@prod bin]$ ./emca -deconfig dbcontrol db -repos drop
STARTED EMCA at Apr 4, 2015 3:48:11 AM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Listener port number: 1521
Password for SYS user: 
Password for SYSMAN user: 
Password for SYSMAN user: 
Do you wish to continue? [yes(Y)/no(N)]: Y
Apr 4, 2015 3:48:25 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /home/oracle/app/oracle/cfgtoollogs/emca/orcl/emca_2015_04_04_03_48_10.log.
Apr 4, 2015 3:48:25 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Apr 4, 2015 3:48:31 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Apr 4, 2015 3:50:13 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Apr 4, 2015 3:50:17 AM

Cheers!! Database Control de-configure successfully.

Stay Tune. 🙂

Oracle 11g Logo

Oracle Enterprise Manager failed to start, OC4J Configuration issue. Configure Enterprise Manager Database Control Manually with Enterprise Manager Configuration Assistant

OC4J Configuration issue… OC4J_DBConsole_ not found.

I am trying to start EM on my newly created database, while starting EM, getting failed with OC4J Configuration issue… while diagnosed there is no OC4J_DBConsole_prod directory exist in ORACLE_HOME. Means this may be the case where Database Control not configured while database created OR misconfigured.

Error log

[oracle@prod ~]$ emctl start dbconsole
OC4J Configuration issue. /home/oracle/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_prod.localdomain_orcl not found.

Solution is to Configure EM with the help of following “Enterprise Manager Configuration Assistant” (i.e. emca) utility from Oracle user: Before that:

  1. Ensure environment variable properly set like below.
  2. Ensure your listener properly configured and started.
  3. Ensure password file is created. (Optional)
  4. You need SYS,SYSMAN & DBSNMP password.
  5. Ensure your /etc/hosts file mentioned below two lines.
[oracle@prod ~]$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.17.146 prod.localdomain prod

Environment Variable:

[oracle@prod ~]$ export ORACLE_SID=orcl
[oracle@prod ~]$ export ORACLE_UNQNAME=orcl
[oracle@prod ~]$ export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1/
[oracle@prod ~]$ export PATH=$PATH:/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/

Config database control repos:

[oracle@prod ~]$ emca -config dbcontrol db -repos create
STARTED EMCA at Apr 4, 2015 4:02:34 AM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:

Provide relevant information like below, orcl is my instance and 1521 is default listener port:

Database SID: orcl
Listener port number: 1521
Listener ORACLE_HOME [ /home/oracle/app/oracle/product/11.2.0/dbhome_1 ]: 
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 ................ /home/oracle/app/oracle/product/11.2.0/dbhome_1
Local hostname ................ prod.localdomain
Listener ORACLE_HOME ................ /home/oracle/app/oracle/product/11.2.0/dbhome_1
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
....
Enterprise Manager configuration completed successfully
FINISHED EMCA at Apr 4, 2015 4:10:55 AM

To access your Enterprise Manager, Browse URL: https://localhost.localdomain:5500/em, like below and Confirm security Exception.

Enterprise Manager URL - Add Exception to browser

Enterprise Manager URL – Add Exception to browser

 

Enterprise Manager URL - Confirm Security Exception

Enterprise Manager URL – Confirm Security Exception

 

Provide Login credentials of SYS users:

Enterprise Manager Login

Enterprise Manager Login

 

Enterprise Manager Instance Dashbord for ORCL, Now you are free to continue your work.

Enterprise Manager Instance Dashbord

Enterprise Manager Instance Dashbord

Cheers!! EM configured successfully.

Stay Tune. 🙂