Friday, November 2, 2012

How to create Enterprise Manager Configuration Assistant (EMCA) in RAC Database Environment

[oracle@lv-rac-test1 scripts]$ emca -config dbcontrol db -repos create

STARTED EMCA at Nov 2, 2012 4:58:46 PM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: TESTR1
Listener port number: 1521
Listener ORACLE_HOME [ /opt/app/oracle/112/product/11.2.0/dbhome_1 ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional): oracle@firstdata.lv
Outgoing Mail (SMTP) server for notifications (optional): lv-mail
ASM ORACLE_HOME [ /opt/app/oracle/112/product/11.2.0/dbhome_1 ]: /opt/app/11.2.0/grid
ASM SID [ +ASM ]:
ASM port [ 1521 ]:
ASM username [ ASMSNMP ]:
ASM user password:
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /opt/app/oracle/112/product/11.2.0/dbhome_1

Local hostname ................ lv-rac-test1.ne.1dc.com
Listener ORACLE_HOME ................ /opt/app/oracle/112/product/11.2.0/dbhome_1
Listener port number ................ 1521
Database SID ................ TESTR1
Email address for notifications ............... oracle@firstdata.lv
Outgoing Mail (SMTP) server for notifications ............... lv-mail
ASM ORACLE_HOME ................ /opt/app/11.2.0/grid
ASM SID ................ +ASM
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ ASMSNMP

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Nov 2, 2012 4:59:46 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/app/oracle/112/cfgtoollogs/emca/TESTR/emca_2012_11_02_16_58_46.log.
Nov 2, 2012 4:59:47 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Nov 2, 2012 5:05:30 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Nov 2, 2012 5:05:32 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Nov 2, 2012 5:06:17 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Nov 2, 2012 5:06:19 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Nov 2, 2012 5:06:25 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Nov 2, 2012 5:06:25 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Nov 2, 2012 5:06:39 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Nov 2, 2012 5:06:39 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://lv-rac-test1.ne.1dc.com:5501/em <<<<<<<<<<<
Nov 2, 2012 5:06:41 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: /opt/app/oracle/112/product/11.2.0/dbhome_1/lv-rac-test1_TESTR/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 Nov 2, 2012 5:06:41 PM
[oracle@lv-rac-test1 scripts]$
[oracle@lv-rac-test1 scripts]$
[oracle@lv-rac-test1 scripts]$ /opt/app/oracle/112/product/11.2.0/dbhome_1/bin/emca -config dbcontrol db -cluster -ASM_USER_ROLE SYSDBA -ASM_USER_NAME ASMSNMP -CLUSTER_NAME lv-rac -LOG_FILE /opt/app/oracle/112/admin/TESTR/scripts/emConfig.log -SID TESTR -ASM_SID +ASM1 -DB_UNIQUE_NAME TESTR -EM_HOME /opt/app/oracle/112/product/11.2.0/dbhome_1 -SERVICE_NAME TESTR -ASM_PORT 1521 -PORT 1521 -LISTENER_OH /opt/app/11.2.0/grid -LISTENER LISTENER -ORACLE_HOME /opt/app/oracle/112/product/11.2.0/dbhome_1 -HOST lv-rac-test1 -ASM_OH /opt/app/11.2.0/grid;

STARTED EMCA at Nov 2, 2012 5:07:22 PM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Password for SYS user:
Database Control is already configured for the database TESTR
You have chosen to configure Database Control for managing the database TESTR
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
Password for DBSNMP user:
Password for SYSMAN user:
Email address for notifications (optional): oracle@firstdata.lv
Outgoing Mail (SMTP) server for notifications (optional): lv-mail
ASM user password:
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /opt/app/oracle/112/product/11.2.0/dbhome_1

Database instance hostname ................ Listener ORACLE_HOME ................ /opt/app/11.2.0/grid
Listener port number ................ 1521
Cluster name ................ lv-rac
Database unique name ................ TESTR
Email address for notifications ............... oracle@firstdata.lv
Outgoing Mail (SMTP) server for notifications ............... lv-mail
ASM ORACLE_HOME ................ /opt/app/11.2.0/grid
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ ASMSNMP

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Nov 2, 2012 5:08:03 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/app/oracle/112/admin/TESTR/scripts/emConfig.log.
Nov 2, 2012 5:08:05 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Nov 2, 2012 5:08:30 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Nov 2, 2012 5:09:24 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Nov 2, 2012 5:09:24 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /opt/app/oracle/112/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_lv-rac-test1_TESTR to remote nodes ...
Nov 2, 2012 5:09:26 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /opt/app/oracle/112/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_lv-rac-test2_TESTR to remote nodes ...
Nov 2, 2012 5:09:34 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /opt/app/oracle/112/product/11.2.0/dbhome_1/lv-rac-test1_TESTR to remote nodes ...
Nov 2, 2012 5:09:37 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /opt/app/oracle/112/product/11.2.0/dbhome_1/lv-rac-test2_TESTR to remote nodes ...
Nov 2, 2012 5:09:40 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Nov 2, 2012 5:10:06 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Nov 2, 2012 5:10:30 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Nov 2, 2012 5:10:30 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://lv-rac-test1.ne.1dc.com:5501/em <<<<<<<<<<<
Nov 2, 2012 5:10:32 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO:
****************  Current Configuration  ****************
 INSTANCE            NODE           DBCONTROL_UPLOAD_HOST
----------        ----------        ---------------------

TESTR             lv-rac-test1             lv-rac-test1.ne.1dc.com
TESTR             lv-rac-test2             lv-rac-test1.ne.1dc.com


Nov 2, 2012 5:10:32 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: /opt/app/oracle/112/product/11.2.0/dbhome_1/lv-rac-test1_TESTR/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 Nov 2, 2012 5:10:32 PM