Google it ....

Wednesday, June 12, 2013

Recreate Oracle Enterprise Manager (OEM) database control 11g for Real Application Cluster (RAC)

If you you want to recrate enterprise manager for rac scenario is next:
[oracle@node1-230-231 ~]$ emca -config dbcontrol db -repos recreate -cluster

STARTED EMCA at Jun 12, 2013 12:15:19 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database unique name: orcl
Service name: orcl
Listener ORACLE_HOME [ /u01/app/11.2.0/grid ]: 
Password for SYS user:  
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
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Password for DBSNMP user:  
Password for SYSMAN user:  
Cluster name: rac-scan

if you don't know cluster name open another terminal
[oracle@node1-230-231 ~]$ su - grid
Password: 
[grid@node1-230-231 ~]$ cemutlo -n
rac-scan

Email address for notifications (optional): 
Outgoing Mail (SMTP) server for notifications (optional): 
ASM ORACLE_HOME [ /u01/app/11.2.0/grid ]: 
ASM port [ 1521 ]: 
ASM username [ ASMSNMP ]: 
ASM user password:  
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1

Database instance hostname ................ Listener ORACLE_HOME ... /u01/app/11.2.0/grid
Listener port number ................ 1521
Cluster name ................ rac-scan
Database unique name ................ orcl
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ............... 
ASM ORACLE_HOME ................ /u01/app/11.2.0/grid
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ ASMSNMP

-----------------------------------------------------------------
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Jun 12, 2013 12:17:27 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at 
/u01/app/oracle/cfgtoollogs/emca/orcl/emca_2013_06_12_12_15_19.log.
Jun 12, 2013 12:17:54 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5540 is already in use.
Jun 12, 2013 12:17:54 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5520 is already in use.
Jun 12, 2013 12:17:54 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 1158 is already in use.
Jun 12, 2013 12:17:54 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jun 12, 2013 12:18:18 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Jun 12, 2013 12:22:02 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Jun 12, 2013 12:22:06 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jun 12, 2013 12:30:28 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jun 12, 2013 12:30:47 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Jun 12, 2013 12:31:50 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Jun 12, 2013 12:31:51 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating 
/u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_node1-230-231_orcl to remote nodes ...
Jun 12, 2013 12:31:52 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating 
/u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_node2-232-233_orcl to remote nodes ...
Jun 12, 2013 12:32:04 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/dbhome_1/node1-230-231_orcl to remote nodes ...
Jun 12, 2013 12:32:06 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/dbhome_1/node2-232-233_orcl to remote nodes ...
Jun 12, 2013 12:32:29 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jun 12, 2013 12:33:17 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jun 12, 2013 12:33:59 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jun 12, 2013 12:33:59 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is 
https://node1-230-231:1158/em <<<<<<<<<<<
Jun 12, 2013 12:34:09 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO: 
****************  Current Configuration  ****************
 INSTANCE            NODE           DBCONTROL_UPLOAD_HOST
----------        ----------        ---------------------

orcl              node1-230-231              node1-230-231
orcl              node2-232-233              node1-230-231


Jun 12, 2013 12:34:09 PM 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: 
/u01/app/oracle/product/11.2.0/dbhome_1/node1-230-231_orcl/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 Jun 12, 2013 12:34:09 PM


check status of enterprise manager
[oracle@node1-230-231 ~]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0 
Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
https://node1-230-231:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running. 
------------------------------------------------------------------
Logs are generated in directory 
/u01/app/oracle/product/11.2.0/dbhome_1/node1-230-231_orcl/sysman/log 


that's all.

2 comments:

  1. Thanks.
    I see, on example of recreate:

    Database unique name: orcl --example
    Service name: orcl --example

    Must I run the same sentence, on two instances of RAC, with the same service name??? (in my case SID= orcl1 and orcl2)

    Thanks again

    ReplyDelete
  2. Thank for your comment,
    You have to run this only one node, but if you want to have more than one console on different nodes then you need to run this

    emca -reconfig dbcontrol -cluster -EM_NODE node2_name -EM_NODE_LIST node2_name

    ReplyDelete