If you are planning to move your OMS repository database from the existing host to a new host, then follow below easy steps.

In the below example we will migrate the repository database from host01.dbaclass.com to host02.dbaclass.com

PRE-REQUISITES:

1. Agent need to be deployed on the new host 

2. Same version of ORACLE rdbms binary need to be installed on target( same as that of source)

EXAMPLE:

1. Check the OMS repository configuration:[ on OLD HOST]

 

$ ./emctl config oms -list_repos_details
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
Repository Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host01.dbaclass.com)(PORT=1561)))(CONNECT_DATA=(SID=BSSCCNTL)))
Repository User : SYSMAN

 

2. Stop the OMS [ on OLD HOST ] 

$ ./emctl stop oms
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
Oracle Management Server is Down
JVMD Engine is Down

 

3. Clone the database to new host

We have used rman active cloning for cloning the database.

Refer the link for complete steps – https://dbaclass.com/article/rman-active-cloning-in-oracle-12c/

Else other cloning methods like hot backup or cold backup method can be used.

4. Now update the OMS repository configuration with new connection string

 

$ ./emctl config oms -store_repos_details 
-repos_conndesc "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host02.dbaclass.com)(PORT=1561)))(CONNECT_DATA=(SID=BSSCCNTL)))" 
-repos_user sysman
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
Enter Repository User's Password :

Successfully updated datasources and stored repository details in Credential Store.
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'.
It is also necessary to restart the BI Publisher Managed Server.

 

5. Shutdown the database [ on OLD HOST]

6. Restart the OMS  

$ ./emctl stop oms -all 
Oracle Enterprise Manager Cloud Control 13c Release 2 Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved. 
Stopping Oracle Management Server... 
WebTier Successfully Stopped 
Oracle Management Server Already Stopped 
Oracle Management Server is Down JVMD Engine is Down 
BI Publisher is disabled, to enable BI Publisher on this host, use the 'emctl config oms -enable_bip' command Stopping BI Publisher Server...
AdminServer Successfully Stopped BI Publisher Server is Down 
$ ./emctl start oms
 Oracle Enterprise Manager Cloud Control 13c Release 2 Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved. 
Starting Oracle Management Server... 
WebTier Successfully Started 
Oracle Management Server Successfully Started 
Oracle Management Server is Up 
JVMD Engine is Up 
BI Publisher is disabled, to enable BI Publisher on this host, use the 'emctl config oms -enable_bip' command

useful metalinks

Oracle Bug 23074675 : EM 13c – Unable to start oms after switchover of EM Repos DB

Unable To Start 13c OMS After Repository Database Switchover (Doc ID 2214218.1)