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)
Oracle Bug 23074675 : EM 13c – Unable to start oms after switchover of EM Repos DB
may cause problems during Step 6 Restart the OMS. Command “./emctl stop oms -all” hung for me, never to complete. I rebooted the server and the OMS service failed to start.
Oracle Support document Unable To Start 13c OMS After Repository Database Switchover (Doc ID 2214218.1)
explains that some XML files may not have been updated with the new connection string. That is what happened to me.
The document’s Cause section tells you to check the XML files in directory “../gc_inst/user_projects/domains/GCDomain/config/jdbc”. The Solution section lists a second directory to check, “../gc_inst/user_projects/domains/GCDomain/config/fmwconfig”. File embi-policystoremerge-jpscfg.xml in the second directory still contained the old connection string. I edited it and manually corrected the error. The OMS restart worked after that.
The OEM Console showed target “Management Services and Repository” down. Oracle Support document EM 12c: Enterprise Manager 12c Cloud Control Management Services And Repository Target Status is Down after Switchover of the Repository (Doc ID 1961444.1) tells how to correct that.
I hope this information saves you time if you encounter these issues.
Thanks a lot for this information Bill, We will add your point to this article.
thank you so much , your post made my task easy .
Hello , thanks for all the steps!
You mentioned migrate the OMS and repository but I dont find any steps for OMS?
I have a requirement to move my OMS and repo to new hardware and also the new OS is RHEL 7 and old is SUN
any help here?
Abdul-
Dear Abdul, I will work on this request and let you know .
Hi Abdul
I did 12c repository data migration to 13c by following these steps you mentioned but Step 4 failed with the below errors:
ERROR util.EmctlUtil logp.251 – Failed to get EMKey from CredStore. Trying to get from repository.
oracle.sysman.emSDK.conf.EmKeyException: Failed to get emkey from repository: ORA-20249: EM Key is invalid:
ORA-06512: at “SYSMAN.MGMT_TIME_SYNC”.
Do I need to copy the key from 12c to 13c as the status of the key shows ? Please suggest.
Enter Enterprise Manager Root (SYSMAN) Password :
Error occurred. Check the log
Thank you for your help
Neelu
Are you entering correct sysman password? Btw are you moving the repository database from 12c EM to 13c EM ?
Yes. Do I need to copy key after data is copied over to target 13c repository before step 4 as per your procedure?
Hi, This article is for OMS migration within the same OEM version.
If you are moving from 12c to 13c, then you need to upgrade it.
using the link – https://dbaclass.com/upgrade-oem-cloud-control-from-12c-to-13c/
I want to bi publisher in new environment without shutting the current oem production database…can I use the rman clone hot backup and bring up in new compute instance
Great article! Worked great!!