Oracle 12c Cloud Control Agent new OMS repository

After working number of hours I found out that 12c does not support pointing existing agent to new OMS repository…really Sad, unfortunately there is no other way other than un-install and re-install agent…

See note from oracle below:

EM 12c : How to Point Existing 12c Agent to New OMS ? => Change Location of OMS and Repository of 12c Agent [ID 1490457.1] To BottomTo Bottom
Modified:Sep 24, 2012Type:HOWTOStatus:PUBLISHEDPriority:3
There are no commentsComments (0) Rate this document Email link to this document Open document in new window Printable Page

In this Document
Goal
Fix
References

Applies to:
Enterprise Manager Base Platform – Version 12.1.0.1.0 and later
Information in this document applies to any platform.
Goal

How to point existing 12c Agent to new 12c OMS ? Is it possible to change the location of the OMS/Repository of a 12c Agent ?
Fix

Reconfiguring a 12c Agent from one 12c OMS to an another 12c OMS, without a re-installation of the Agent, is currently not supported.

This is not possible to change the OMS/Repository location properties on 12c Agent’s side from one OMS/Repository to another new OMS/Repository,

like it was possible in EM 10g and EM 11g.

When a 12c Agent is re-configured to a new 12c OMS, OMS will not accept this Agent or its targets for monitoring.

In previous Enterprise Manager releases (10g and 11g), the targets discovery is initiated by the Agent.

The targets are discovered and first updated in the /sysman/emd/targets.xml file and then pushed to the OMS.

But in EM 12c, OMS is the source of truth. That means that the targets registration happens first at the OMS side and then the targets are pushed to the Agent in targets.xml file.

Hence, it is required to re-install 12c Agent from the new OMS when it is needed that an agent points to a new OMS.

There is an Enhancemenet request logged :

BUG:14532300 POINTING AGENT TO NEW 12C OMS

Note : Refer that document to help you to push/install an Agent from the EM 12c console :

Document:1360183.1 – Cloud Control Agent 12c Installation – How to install Enterprise Manager Cloud Control 12.1 Agent

References
BUG:14532300 – POINTING AGENT TO NEW 12C OMS
NOTE:1360183.1 – Cloud Control Agent 12c Installation – How to install Enterprise Manager Cloud Control 12.1 Agent From the EM 12c Console ?

Dropping and rebuilding dbconsole

Steps to drop DB Console:

  • emca -deconfig dbcontrol db

    STARTED EMCA at May 12, 2009 1:44:07 AM
    EM Configuration Assistant, Version 10.2.0.1.0 Production
    Copyright (c) 2003, 2005, Oracle. All rights reserved.

    Enter the following information:
    Database SID: ora02

    Do you wish to continue? [yes(Y)/no(N)]: Y
    May 12, 2009 1:44:11 AM oracle.sysman.emcp.EMConfig perform
    INFO: This operation is being logged at /opt/local/oracle/product/10.2.0.4/cfgtoollogs/emca/ora02/emca_2009-05-12_01-44-07-AM.log.
    May 12, 2009 1:44:12 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
    INFO: Stopping Database Control (this may take a while) …
    Enterprise Manager configuration completed successfully
    FINISHED EMCA at May 12, 2009 1:44:28 AM
    [oracle@dbrv2 bdump]$ /opt/local/oracle/product/admin/ora02/bdump->:dbrv2::[ora02]

 

Steps to create database dbconsole:

  • emca -config dbcontrol db

 
STARTED EMCA at May 12, 2009 1:46:05 AM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:
Database SID: Database SID: ora02
Listener port number: 1521
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 ……………. /opt/local/oracle/product/10.2.0.4

Database hostname ……………. dbrv2
Listener port number ……………. 1521
Database SID ……………. ora02
Email address for notifications ……………
Outgoing Mail (SMTP) server for notifications ……………

—————————————————————–
Do you wish to continue? [yes(Y)/no(N)]: Y
May 12, 2009 1:46:26 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /opt/local/oracle/product/10.2.0.4/cfgtoollogs/emca/ora02/emca_2009-05-12_01-46-05-AM.log.
May 12, 2009 1:46:28 AM oracle.sysman.emcp.EMReposConfig updateReposVars
SEVERE: File/directory /opt/local/oracle/product/10.2.0.4/sysman/emdrep/config/repository.variables does not exist
May 12, 2009 1:46:36 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) …
May 12, 2009 1:46:43 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /opt/local/oracle/product/10.2.0.4/bin/emctl config emkey -repos
May 12, 2009 1:46:43 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
WARNING: Configuring EM-Key failed.
May 12, 2009 1:46:43 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
WARNING: Error securing Database control.
May 12, 2009 1:46:43 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 following command(s):

1) Set the environment variable ORACLE_SID to ora02
2) /opt/local/oracle/product/10.2.0.4/bin/emctl stop dbconsole
3) /opt/local/oracle/product/10.2.0.4/bin/emctl config emkey -repos -sysman_pwd <>
4) /opt/local/oracle/product/10.2.0.4/bin/emctl secure dbconsole -sysman_pwd <>
5) /opt/local/oracle/product/10.2.0.4/bin/emctl start dbconsole

To secure Em Key, run /opt/local/oracle/product/10.2.0.4/bin/emctl config emkey -remove_from_repos -sysman_pwd <>
May 12, 2009 1:46:43 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) …
May 12, 2009 1:48:28 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
May 12, 2009 1:48:28 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://dbrv2:1158/em <<<<<<<<<<<>
4) /opt/local/oracle/product/10.2.0.4/bin/emctl secure dbconsole -sysman_pwd <>
5) /opt/local/oracle/product/10.2.0.4/bin/emctl start dbconsole

To secure Em Key, run /opt/local/oracle/product/10.2.0.4/bin/emctl config emkey -remove_from_repos -sysman_pwd <>
[oracle@dbrv2 bdump]$ /opt/local/oracle/product/admin/ora02/bdump->:dbrv2::[ora02]
> emctl status dbconsole
TZ set to US/Central
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
http://dbrv2:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
——————————————————————
Logs are generated in directory /opt/local/oracle/product/10.2.0.1/dbrv2_ora02/sysman/log
[oracle@dbrv2 bdump]$ /opt/local/oracle/product/admin/ora02/bdump->:dbrv2::[ora02]

On another note, for Linux servers make sure that Listener is not listening on loop back address.

If you have listener is using loop back (lo0) address, then its possible that dbconsole show status of listener as down.