Thursday, July 15, 2010

Configuring EM console and repository on Oracle 11gR2

There are 3 database users that must MUST be configured to successfully deploy EM dbconsole on 11gR2

if by accident you dropped DBSNMP user please use the script below to recreate the user and SNMPAgent role to access the v$ tables
cd $catsnmp.sql

You must drop these 2 users using the cascade option as they are recreated by the emca if you don't rop them the EM dbconsole creation will fail

SQL> drop user sysman cascade;
SQL> drop user MGMT_VIEW cascade;

You can now proceed with the EM configuration all the file are found under $ORACLE_HOME/bin


Create Database Console

To create the configuration files and repository for Database Console, run:
$ emca -config dbcontrol db -repos create

STARTED EMCA at Jul 14, 2010 11:28:03 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: BIDEV
Listener port number: 1521
Password for SYS user: bimaster
Password for DBSNMP user: bimanager
Password for SYSMAN user: bimanager
Email address for notifications ...............gshelton@amuru.com
Email address Outgoing Mail (SMTP) server for notifications ...............vezfe1.uganda.amurugroup.com

You have specified the following settings

Database ORACLE_HOME ................ /u01/BIDEV/apps/oracle/product/11.1.0.7

Database hostname ................ gva2bidevdb.amurugroup.com
Listener port number ................ 1521
Database SID ................ BIDEV
Email address for notifications ...............gshelton@amuru.com
Email address Outgoing Mail (SMTP) server for notifications ...............vezfe1.uganda.amurugroup.com

Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/BIDEV/apps/oracle/product/11.1.0.7/cfgtoollogs/emca/BIDEV/emca_2010-07-15_09-59-39-PM.log.
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://gva2bidevdb.amurugroup.com:1158/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 14, 2010 11:28:03 AM


Drop Database Console

To drop (remove) the configuration files and repository for Database Console, run:
$ emca -deconfig dbcontrol db -repos drop

STARTED EMCA at Jul 14, 2010 11:28:03 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: BIDEV
Listener port number: 1521
Password for SYS user: bimaster
Password for SYSMAN user: bimanager

Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/BIDEV/apps/oracle/product/11.1.0.7/cfgtoollogs/emca/BIDEV/emca_2010-07-15_09-53-55-PM.log.
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 14, 2010 11:28:03 AM


Recreate Database Console

To recreate the configuration files and repository for Database Console, run:
$ emca -config dbcontrol db -repos recreate

STARTED EMCA at Jul 14, 2010 11:28:03 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: BIDEV
Database Control is already configured for the database BIDEV
You have chosen to configure Database Control for managing the database BIDEV
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: bimaster
Password for DBSNMP user: bimanager
Password for SYSMAN user: bimanager
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):

You have specified the following settings

Database ORACLE_HOME ................ /u01/BIDEV/apps/oracle/product/11.1.0.7

Database hostname ................ gva2bidevdb.amurugroup.com
Listener port number ................ 1521
Database SID ................ BIDEV
Email address for notifications ...............gshelton@amuru.com
Email address Outgoing Mail (SMTP) server for notifications ...............vezfe1.uganda.amurugroup.com

Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/BIDEV/apps/oracle/product/11.1.0.7/cfgtoollogs/emca/BIDEV/emca_2010-07-15_10-08-20-PM.log.
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://gva2bidevdb.amurugroup.com:1158/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 14, 2010 11:28:03 AM


Using EMCA with Real Application Clusters

In this section, I will be using two Database Control consoles running; one on gva2bidevdb1 and the other on linux2. From either of these consoles, you can manage and monitor all targets in the cluster.

For information on the current cluster configuration, you can run:
$ emca -displayConfig dbcontrol -cluster

STARTED EMCA at Jul 14, 2010 11:28:03 AM
EM Configuration Assistant, Version 11.1.0.7.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:
Database unique name: biprod

Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/BIDEV/apps/oracle/product/11.1.0.7/cfgtoollogs/emca/orcl/emca_2010-07-15_10-30-51-PM.log.
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO:
**************** Current Configuration ****************
INSTANCE NODE DBCONTROL_UPLOAD_HOST
---------- ---------- ---------------------

biprod1 gva2bidevdb1 gva2bidevdb1
biprod2 gva2bidevdb2 gva2bidevdb1


Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 14, 2010 11:28:03 AM
The above command prompts for the database unique name for the cluster database. This will print the current configuration onto the screen, indicating the nodes that have consoles running on them and the consoles where each agent is uploading.

Create Database Console

$ emca -config dbcontrol db -repos create -cluster

STARTED EMCA at Jul 14, 2010 11:28:03 AM
EM Configuration Assistant, Version 11.1.0.7.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:
Database unique name: orcl
Listener port number: 1521
Cluster name: crs
Password for SYS user: bimaster
Password for DBSNMP user: bimanager
Password for SYSMAN user: bimanager
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
ASM ORACLE_HOME [ /u01/BIDEV/apps/oracle/product/11.1.0.7 ]: /u01/BIDEV/apps/oracle/product/11.1.0.7
ASM port [ 1521 ]: 1521
ASM user role [ SYSDBA ]: SYSDBA
ASM username [ SYS ]: SYS
ASM user password:

You have specified the following settings

Database ORACLE_HOME ................ /u01/BIDEV/apps/oracle/product/11.1.0.7

Database instance hostname ................ gva2bidevdb1
Listener port number ................ 1521
Cluster name ................ crs
Database unique name ................ orcl
Email address for notifications ...............gshelton@amuru.com
Email address Outgoing Mail (SMTP) server for notifications ...............vezfe1.uganda.amurugroup.com
ASM ORACLE_HOME ................ /u01/BIDEV/apps/oracle/product/11.1.0.7
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ SYS

Do you wish to continue? [yes(Y)/no(N)]: y
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/BIDEV/apps/oracle/product/11.1.0.7/cfgtoollogs/emca/orcl/emca_2007-06-12_11-07-56-AM.log.
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /u01/BIDEV/apps/oracle/product/11.1.0.7/oc4j/j2ee/OC4J_DBConsole_gva2bidevdb1_biprod1 to remote nodes ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /u01/BIDEV/apps/oracle/product/11.1.0.7/oc4j/j2ee/OC4J_DBConsole_linux2_biprod2 to remote nodes ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/BIDEV/apps/oracle/product/11.1.0.7/gva2bidevdb1_biprod1 to remote nodes ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/BIDEV/apps/oracle/product/11.1.0.7/linux2_biprod2 to remote nodes ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://gva2bidevdb1:1158/em <<<<<<<<<<<
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO:
**************** Current Configuration ****************
INSTANCE NODE DBCONTROL_UPLOAD_HOST
---------- ---------- ---------------------

biprod1 gva2bidevdb1 gva2bidevdb1
biprod2 linux2 gva2bidevdb1


Enterprise Manager configuration completed successfully

FINISHED EMCA at Jul 14, 2010 11:28:03 AM

Drop Database Console

$ emca -deconfig dbcontrol db -repos drop -cluster

STARTED EMCA at Jul 14, 2010 11:28:03 AM
EM Configuration Assistant, Version 11.1.0.7.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:
Database unique name: orcl
Listener port number: 1521
Password for SYS user: bimaster
Password for SYSMAN user: bimanager
Do you wish to continue? [yes(Y)/no(N)]: y
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/BIDEV/apps/oracle/product/11.1.0.7/cfgtoollogs/emca/orcl/emca_2007-06-12_10-53-57-AM.log.
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Jul 14, 2010 11:28:03 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 14, 2010 11:28:03 AM


Resolving install EM issues

It’s paramount to have create the password file created in $ORACLE_HOME/dbs using orapwd otherwise you will have some errors like
Jul 14, 2010 6:13:39 PM oracle.sysman.emcp.EMReposConfig unlockMGMTAccount
CONFIG: Unlocked mgmt_view account
Jul 14, 2010 6:13:39 PM oracle.sysman.emcp.EMReposConfig invoke
CONFIG: Successfully unlocked mgmt_view account
Jul 14, 2010 6:13:39 PM oracle.sysman.emcp.ParamsManager getParam
CONFIG: No value was set for the parameter ORACLE_HOSTNAME.
Jul 14, 2010 6:13:39 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
CONFIG: SQLEngine connecting with SID: BIDEV, oracleHome: /u01/BIDEV/apps/oracle/product/11.1.0.7, and user: SYS
Jul 14, 2010 6:13:39 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
CONFIG: SQLEngine created successfully and connected
Jul 14, 2010 6:13:40 PM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
CONFIG: ORA-01031: insufficient privileges

oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-01031: insufficient privileges
at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1530)
at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeSql(SQLEngine.java:1771)
at oracle.sysman.emcp.ParamsManager.checkListenerStatusForDBControl(ParamsManager.java:2682)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:368)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:147)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:222)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:535)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1215)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:519)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:468)
Jul 14, 2010 6:13:40 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Listener is not up. Start the Listener and run EM Configuration Assistant again .
Refer to the log file at /u01/BIDEV/apps/oracle/product/cfgtoollogs/emca/BIDEV/emca_2010_07_14_18_08_29.log for more details.
Jul 14, 2010 6:13:40 PM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: Listener is not up. Start the Listener and run EM Configuration Assistant again .at oracle.sysman.emcp.ParamsManager.checkListenerStatusForDBControl(ParamsManager.java:2689)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:368)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:147)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:222)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:535)at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1215)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:519)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:468)

If you have any problems when running emca, check the log file under:
$ORACLE_HOME/cfgtoollogs/emca//

No comments:

Post a Comment