March 7, 2014

Configure Enterprise Manager For a Database which Copied Manually.




$ emca -config dbcontrol db
.
.
-- if you are manually configuring EM you will end up with following Warning Message.
.
.
Feb 14, 2014 8:25:36 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/dockdb/emca_2014_02_14_08_25_16.log.
.
.

WARNING: Error executing /u01/app/oracle/product/11.2.0/db_1/bin/emctl config emkey -repos
Feb 14, 2014 8:27:24 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
WARNING: Configuring EM-Key failed.
Feb 14, 2014 8:27:24 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
WARNING: Error securing Database control.
Feb 14, 2014 8:27:24 AM oracle.sysman.emcp.EMDBPostConfig setWarnMsg
INFO: Error securing Database Control, Database Control has been brought up in non-secure mode. To secure the Database Control execute the followi            ng command(s):


1) Set the environment variable ORACLE_SID to dockdb
 2) /u01/app/oracle/product/11.2.0/db_1/bin/emctl stop dbconsole
 3) /u01/app/oracle/product/11.2.0/db_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user >
 4) /u01/app/oracle/product/11.2.0/db_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user >
 5) /u01/app/oracle/product/11.2.0/db_1/bin/emctl start dbconsole

-- You should follow the Steps provided by Oracle .



$ emctl stop dbconsole

$ emctl config emkey -repos -sysman_pwd password

-- On the second step you may get following message. 

The Em Key could not be configured. The Em Key was not found in Management Repository.

$ emctl secure dbconsole -sysman_pwd dbdock

Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
http://host161.localdomain:1158/em/console/aboutApplication
DBCONSOLE already stopped...   Done.
Agent is already stopped...   Done.
Securing dbconsole...   Started.
Securing dbconsole...   Failed.
EMKey is misconfigured.             -- Please note this message.


$ emctl start dbconsole

/* So once you identify the Configuration still have issue. Then check status of emkey using following command.

The emkey is an encryption key that is used to encrypt and decrypt sensitive data in Enterprise Manager such as host passwords, database passwords and others. By default, the emkey is stored in the $ORACLE_HOME/sysman/config/emkey.ora file. The location of this file can be changed. */

$ emctl status emkey
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
Please enter repository password:

The Em Key is not configured properly or is corrupted in the file system and does not exist in the Management Repository. To correct the problem:
1) Copy the emkey.ora file from another OMS or backup machine to the OH/sysman/config directory.
2) Configure the emkey.ora file by running "emctl config emkey -emkeyfile <emkey.ora file location>".

-- This time we have to follow these two steps...  


$ emctl config emkey -emkeyfile /u01/emkey.ora
Please enter repository password:

The Em Key is already configured. To override the current configuration, run "emctl config  emkey <options> -force".

$
$ emctl config emkey -emkeyfile /u01/emkey.ora -force
Please enter repository password:

The Em Key has been configured successfully.

-- Now we back to Our Old Four steps. 

$ emctl stop dbconsole
$ emctl config emkey -repos -sysman_pwd dbdock

$ emctl secure dbconsole -sysman_pwd dbdock
.
.
DBCONSOLE already stopped...   Done.
Agent is already stopped...   Done.
Securing dbconsole...   Started.
Securing dbconsole...   Sucessful.

$ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
https://host161.localdomain:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ..... started.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.2.0/db_1/host161.localdomain_dockdb/sysman/log

-- We should Backup this emkey file. 

No comments: