I'm Top Oracle DBA

Reconfig OEM11g DBConsole Manually for Oracle Database

Recreate the repository to reset the OC4J Application Server(11g)

Prepare yourself

  • You must know the password for users SYS, DBSNMP, SYSMAN
  • You must know ORACLE_SID, port listener, hostname
  • If you have .menuscript after login oracle, You have to check .menuscript to identify the parameter ORACLE_HOSTNAME(if your server make for DR or RAC, You have to identify virtual DNS for ORACLE_HOSTNAME, if not DR or RAC, you have to identify your hostname)
Error :

OC4J Configuration issue. /oracle11/product/11.2.0.3/oc4j/j2ee/OC4J_DBConsole_SCORPIO00B_prim1124 not found.

(prim1124) /oracle11/product/11.2.0.3/bin $cd $ORACLE_HOME/bin
(prim1124) /oracle11/product/11.2.0.3/bin $./emctl start dbconsole
Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.
(prim1124) /oracle11/product/11.2.0.3/bin $env |grep ORA
ORACLE_BASE=/oracle11
ORACLE_HOME=/oracle11/product/11.2.0.3
ORACLE_SID=prim1124
PS1=($ORACLE_SID) $PWD $
(prim1124) /oracle11/product/11.2.0.3/bin $export ORACLE_UNQNAME=prim1124
(prim1124) /oracle11/product/11.2.0.3/bin $
(prim1124) /oracle11/product/11.2.0.3/bin $./emctl start dbconsole
OC4J Configuration issue. /oracle11/product/11.2.0.3/oc4j/j2ee/OC4J_DBConsole_SCORPIO00B_prim1124 not found.
(prim1124) /oracle11/product/11.2.0.3/bin $./emctl status dbconsole
OC4J Configuration issue. /oracle11/product/11.2.0.3/oc4j/j2ee/OC4J_DBConsole_SCORPIO00B_prim1124 not found.
(prim1124) /oracle11/product/11.2.0.3/bin $sqlplus sysman/oracleSQL*Plus: Release 11.2.0.3.0 Production on Tue Feb25 10:16:05 2012Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> conn system/oracle
Connected.

SQL> exit

(prim1124) /oracle11/product/11.2.0.3/bin $emca -repos create

STARTED EMCA at Feb 25, 2012 10:19:00 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.Enter the following information:
Database SID: prim1124
Listener port number: 1523
Password for SYS user: xxxxxxxx
Password for SYSMAN user: xxxxxxxx

Do you wish to continue? [yes(Y)/no(N)]: yes
Feb 25, 2012 10:19:46 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle11/cfgtoollogs/emca/prim1124/emca_2012_02_25_10_19_00.log.
Feb 25, 2012 10:19:46 AM oracle.sysman.emcp.DatabaseChecks performReposChecks
SEVERE: Dbcontrol Repository already exists. Fix the error(s) and run EM Configuration Assistant again in standalone mode.
(prim1124) /oracle11/product/11.2.0.3/bin $emca -config dbcontrol db -repos recreate

STARTED EMCA at Feb 25, 2012 10:21:24 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.

Enter the following information:
Database SID: prim1124
Listener port number: 1523
Listener ORACLE_HOME [ /oracle11/product/11.2.0.3 ]:
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 ……………. /oracle11/product/11.2.0.3

Local hostname ……………. SCORPIO00B
Listener ORACLE_HOME ……………. /oracle11/product/11.2.0.3
Listener port number ……………. 1523
Database SID ……………. prim1124
Email address for notifications ……………
Outgoing Mail (SMTP) server for notifications ……………

—————————————————————–
———————————————————————-
WARNING : While repository is dropped the database will be put in quiesce mode.
———————————————————————-
Do you wish to continue? [yes(Y)/no(N)]: yes
Feb 25, 2012 10:21:46 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle11/cfgtoollogs/emca/prim1124/emca_2012_02_25_10_19_00.log.
Feb 25, 2012 10:21:46 AM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
WARNING: ORA-12541: TNS:no listener

Feb 25, 2012 10:21:46 AM oracle.sysman.emcp.EMConfig perform
SEVERE:

Database connection through listener failed. Fix the error and run EM Configuration Assistant again.

Some of the possible reasons may be:

1) Listener port 1523 provided is incorrect. Provide the correct port.
2) Listener is not up. Start the Listener.
3) Database service prim1124 is not registered with listener. Register the database service.
4) Listener is up on physical host and ORACLE_HOSTNAME environment variable is set to virtual host. Unset ORACLE_HOSTNAME environment variable.
5) Listener is up on virtual host. Set environment variable ORACLE_HOSTNAME=<virtual host>.
6) /etc/hosts does not have correct entry for hostname.

Refer to the log file at /oracle11/cfgtoollogs/emca/prim1124/emca_2012_02_25_10_21_24.log for more details.
Could not complete the configuration. Refer to the log file at /oracle11/cfgtoollogs/emca/prim1124/emca_2012_02_25_10_21_24.log for more details.
(prim1124) /oracle11/product/11.2.0.3/bin $view /oracle11/cfgtoollogs/emca/prim1124/emca_2012_02_25_10_21_24.log
(prim1124) /oracle11/product/11.2.0.3/bin $env |grep ORA
ORACLE_BASE=/oracle11
ORACLE_HOME=/oracle11/product/11.2.0.3
ORACLE_SID=prim1124
ORACLE_UNQNAME=prim1124
PS1=($ORACLE_SID) $PWD $
(prim1124) /oracle11/product/11.2.0.3/bin $env |grep HOST
(prim1124) /oracle11/product/11.2.0.3/bin $hostname
SCORPIO00B
(prim1124) /oracle11/product/11.2.0.3/bin $export ORACLE_HOSTNAME=SCORPIO00B

***If Your Database is DR or RAC then You have 1 virtual IP and 2public IP so You have to use Virtual IPĀ  such as ORACLE_HOSTNAME=SCORPIO00 ***

(prim1124) /oracle11/product/11.2.0.3/bin $emca -config dbcontrol db -repos recreate

STARTED EMCA at Feb 25, 2012 10:23:00 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.

Enter the following information:
Database SID: prim1124
Listener port number: 1523
Listener ORACLE_HOME [ /oracle11/product/11.2.0.3 ]:
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 ……………. /oracle11/product/11.2.0.3

Local hostname ……………. SCORPIO00B
Listener ORACLE_HOME ……………. /oracle11/product/11.2.0.3
Listener port number ……………. 1523
Database SID ……………. prim1124
Email address for notifications ……………
Outgoing Mail (SMTP) server for notifications ……………

—————————————————————–
———————————————————————-
WARNING : While repository is dropped the database will be put in quiesce mode.
———————————————————————-
Do you wish to continue? [yes(Y)/no(N)]: yes
Feb 25, 2012 10:23:19 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle11/cfgtoollogs/emca/prim1124/emca_2012_02_25_10_22_59.log.
Feb 25, 201210:23:19 AM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl

WARNING: ORA-12541: TNS:no listener

Feb 25, 2012 10:23:19 AM oracle.sysman.emcp.EMConfig perform
SEVERE:

Database connection through listener failed. Fix the error and run EM Configuration Assistant again.

Some of the possible reasons may be:

1) Listener port 1523 provided is incorrect. Provide the correct port.
2) Listener is not up. Start the Listener.
3) Database service prim1124 is not registered with listener. Register the database service.
4) Listener is up on physical host and ORACLE_HOSTNAME environment variable is set to virtual host. Unset ORACLE_HOSTNAME environment variable.
5) Listener is up on virtual host. Set environment variable ORACLE_HOSTNAME=<virtual host>.
6) /etc/hosts does not have correct entry for hostname.

Refer to the log file at /oracle11/cfgtoollogs/emca/prim1124/emca_2012_02_25_10_22_59.log for more details.
Could not complete the configuration. Refer to the log file at /oracle11/cfgtoollogs/emca/prim1124/emca_2012_02_25_10_22_59.log for more details.
(prim1124) /oracle11/product/11.2.0.3/bin $ps -ef |grep tns
oracle 21129 1 0 Feb 05 ? 5:31 /oracle11/product/11.2.0.3/bin/tnslsnr LISTENER_prim1124 -inherit
oracle 26224 26968 0 10:23:37 pts/1 0:00 grep tns
(prim1124) /oracle11/product/11.2.0.3/bin $lsnrctl status LISTENER_prim1124

LSNRCTL for Solaris: Version 11.2.0.3.0 – Production on Feb 25, 2012 10:23:56

Copyright (c) 1991, 2011, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=SCORPIO00)(PORT=1523)))
STATUS of the LISTENER
————————
Alias LISTENER_prim1124
Version TNSLSNR for Solaris: Version 11.2.0.3.0 – Production
Start Date 05-Feb-2012 09:19:49
Uptime 20 days 1 hr. 4 min. 7 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle11/product/11.2.0.3/network/admin/listener.ora
Listener Log File /oracle11/diag/tnslsnr/SCORPIO00B/listener_prim1124/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.xx.0.1xx)(PORT=1523)))
Services Summary…
Service “prim1124” has 1 instance(s).
Instance “prim1124”, status UNKNOWN, has 1 handler(s) for this service…
The command completed successfully
(prim1124) /oracle11/product/11.2.0.3/bin $export ORACLE_HOSTNAME=SCORPIO00
(prim1124) /oracle11/product/11.2.0.3/bin $emca -config dbcontrol db -repos recreate

STARTED EMCA at Feb 25, 2012 10:24:18 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.

Enter the following information:
Database SID: prim1124
Listener port number: 1523
Listener ORACLE_HOME [ /oracle11/product/11.2.0.3 ]:
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 ……………. /oracle11/product/11.2.0.3

Local hostname ……………. SCORPIO00
Listener ORACLE_HOME ……………. /oracle11/product/11.2.0.3
Listener port number ……………. 1523
Database SID ……………. prim1124
Email address for notifications ……………
Outgoing Mail (SMTP) server for notifications ……………

—————————————————————–
———————————————————————-
WARNING : While repository is dropped the database will be put in quiesce mode.
———————————————————————-
Do you wish to continue? [yes(Y)/no(N)]: yes
Feb 25, 2012 10:24:35 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle11/cfgtoollogs/emca/prim1124/emca_2012_02_25_10_24_18.log.
Feb 25, 2012 10:24:36 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) …
Feb 25, 2012 10:25:45 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Feb 25, 2012 10:25:45 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) …
Feb 25, 2012 10:30:08 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Feb 25, 2012 10:30:10 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) …
Feb 25, 2012 10:31:18 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Feb 25, 2012 10:31:19 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) …
Feb 25, 2012 10:31:27 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Feb 25, 2012 10:31:27 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) …
Feb 25, 2012 10:31:50 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Feb 25, 2012 10:31:50 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://SCORPIO00:5501/em <<<<<<<<<<<
Feb 25, 2012 10:31:52 AM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************ WARNING ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted. The encryption key has been placed in the file: /oracle11/product/11.2.0.3/SCORPIO00_prim1124/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost.

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Feb 25, 2012 10:31:52 AM

(prim1124) /oracle11/product/11.2.0.3/bin $cp /oracle11/product/11.2.0.3/SCORPIO00_prim1124/sysman/config/emkey.ora /oracle11/product/11.2.0.3/SCORPIO00_prim1124/sysman/config/emkey.ora_bak
(prim1124) /oracle11/product/11.2.0.3/bin $

then try to connect with the browser.

error: Content is protected !!