Move EM 12c OMS and Repository to a new host (1/2)

Posted by Ronald on May 12, 2014  /   Posted in EM Cloud Control 12c


As we did more Enterprise Manager (re)-installations in the past, this time we opted for a complete move of the repository database and OMS to a new server. In this way we’re able to keep all history and was it not necessary to do any new configuration on all monitored servers. Both repository database ( and OMS are located on 1 dedicated server.

We found the following resources on the internet

How to migrate em12c r3 oms and repository to a new host:


Relocate targets with em 12c:

Both resources we’re helpful but we had to do some more configuration steps to get a 100% result to move our version of Enterprise Manager Cloud Control 12c ( ) to a new server.


Move Repository

Our first step: move repository database from the old to the new server. On the source server, list the oms details:
[oracle@oramon:oracle]$ emctl config oms -list_repos_details
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved.

Repository User : SYSMAN
Next, stop OMS
emctl stop oms -all

and clone the database repository to the new server, after you installed the database software. Copying the database will be easier if you maintain the same database name and directory structure:
scp datafiles in /u02/oracle/CCON1/....
scp redolog and controlfiles in /u02/oracle/fra/CCON1/...
scp $ORACLE_HOME/dbs
scp $ORACLE_HOME/network/admin/[tnsnames | listener].ora

Now configure the old OMS with the new location of the database
emctl config oms -store_repos_details -repos_port <port> -repos_sid <repository SID> \
-repos_host <new server> -repos_user SYSMAN -repos_pwd <sysman_password>

If there are multiple OMSs in this environment, run this store_repos_details command on all of them.

And finally, restart all the OMSs using ’emctl stop oms -all’ and ’emctl start oms’.

Install new OMS software only

On the new server, install OMS Software only.

At the end of the installation this message appears:

Successfully installed the software binaries.
To configure the installation, run the following command from the Oracle home of the OMS:


We did not run this command, because there is nothing to configure yet.

Install Plug-ins and patches

Now we need to know what patches and plug-ins were already installed on the old OMS.


Look for the installed patches on the old OMS server:
$ $OMS_HOME/OPatch/opatch lsinv

We came up with a list of 12 (interim) patches running release 2 of EM12c:


  • Patch 16236221 – Patch Set Update for Oracle Management Service
  • Patch 16417886
  • Patch 15951627: 14322382 14557211 14633352 14647160 14732247 14848419 15836317 15880699 15951627

These patches can be installed according the patch installation notes.



To identify all plug-ins to be installed on the new OMS run this query on the OMS database repository:
, epv.plugin_id
, epv.version
, epv.rev_version
, decode(su.aru_file, null,'Media/External' ,
'' ||
aru_file||'?aru='||aru_id||chr(38)||'patch_file='||aru_file) URL

FROM em_plugin_version epv
, em_current_deployed_plugin ecp
, em_su_entities su
AND ecp.dest_type='2'
AND epv.plugin_version_id = ecp.plugin_version_id
AND su.entity_id = epv.su_entity_id;

DISPLAY_NAME                   PLUGIN_ID          VERSION     URL
—————————— —————— ———– ————————————-

Oracle Virtualization          oracle.sysman.vt

Oracle Exadata                 oracle.sysman.xa

Oracle Fusion Middleware       oracle.sysman.emas

Oracle MOS (My Oracle Support) oracle.sysman.mos

Oracle Database                oracle.sysman.db

Pythian MySQL Plugin

Download ALL these plugins and place them in a new folder on the new server. Rename downloaded plug-in *.zip files to *.par files.


Now Install the plugins

$OMS_HOME/sysman/install/ -pluginLocation \

Prepare the software library

In our case the software library is on a shared location, so no need to copy or configure, everything stays the same.


Recreate the OMS with OMSCA

We are recreating/configuring the new OMS by importing the backup from the old OMS into the new OMS.

On the old OMS server, stop oms and agent and make a backup.

$ $OMS_HOME/bin/emctl stop oms -all
$ sleep 5
$ $AGENT_HOME/bin/emctl stop agent

Backup the OMS configuration

[]$ emctl exportconfig oms -sysman_pwd <sysman_password> -dir /tmp
[]$ scp opf_ADMIN_20140407_092736.bka <new server>:/tmp

Restore the OMS configuration on the new server
[<new server>:]$ cd /tmp
[<new server>:]$ omsca recover -as -ms -backup_file opf_ADMIN_20140407_092736.bka
Oracle Enterprise Manager Cloud Control 12c Release
Copyright (c) 1996, 2012, Oracle. All rights reserved.

OS check passed.
OMS version check passed.
Performing Admin Server Recovery…
Retrieved Admin Server template.
Populated install params from backup…
Enter Admin Server user password: <weblogic_password>
Confirm Password: <weblogic_password>
Enter Node Manager Password:
Confirm Password:
Enter Repository database user password:
Enter Agent Registration password:
Confirm Password:
Doing pre requisite checks ……
Pre requisite checks completed successfully

Checking Plugin software bits
Proceed to recovery
Setting up domain from template…
Setup EM infrastructure succeeded!
Admin Server recovered from backup.
Now performing cleanup of OMS EMGC_OMS1…
Now launching DeleteOMS…
OMS Deleted successfully

Delete finished successfully
Now launching AddOMS…
Infrastructure setup of EM completed successfully.

Doing pre deployment operations ……
Pre deployment of EM completed successfully.

Deploying EM ……
Deployment of EM completed successfully.

Configuring webtier ……
Configuring webTier completed successfully.

Importing OMS configuration from recovery file…

If you have software library configured
please make sure it is functional and accessible
from this OMS by visiting:
Setup->Provisioning and Patching->Software Library

Securing OMS ……
Adapter already exists: emgc_USER
Adapter already exists: emgc_GROUP
Post “Deploy and Repos Setup” operations completed successfully.

Performing Post deploy operations ….
Total 0 errors, 77 warnings. 0 entities imported.
Done with csg import
Done with csg import
OMSCA-WRN:Few post deploy operation failed. Check the file:/u01/app/mware/oms/cfgtoollogs/omsca/logs20140407101414/omsca_err.txt
Post deploy operations completed successfully.

EM configuration completed successfully.
EM URL is:

Add OMS finished successfully
Recovery of server EMGC_OMS1 completed successfully
OMSCA Recover completed successfully

No errors in the omsca_err.txt, all seems fine.

Now start the OMS on the new server:
$OMS_HOME/bin/emctl start oms

Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved.
Starting Oracle Management Server...
Starting WebTier...
WebTier Successfully Started
Oracle Management Server Successfully Started
Oracle Management Server is Up

The last part of the configuration is about relocating agent targets, including the central management agent, which will be explained in part 2.



Post a Comment

Your email address will not be published. Required fields are marked *


^ Back to Top