Sometimes it’s hard to find what you’re looking for in the Oracle documentation or on MOS if you don’t already know what exactly to search for. This happened to me while trying to find out how the method of changing the DB connection for the EM repository changed in 13c. So I thought my findings are worth sharing.
In earlier releases of Enterprise Manager (Grid Control or Cloud Control), connection settings were stored in a file named “emoms.properties”. While this file still existed on the EM 13.2 environment I was working on, there wasn’t any connection string in it.
After searching for quite a while (sifting a wealth of outdated documents), I found out there’s a specific emctl command to set the DB connection. This command already exists since 11g where it had to be used when the repository DB was put in a RAC. Now it seems to be the only way to change the connect string, be it RAC or single instance.
Here’s an example of configuring a connect string to a RAC DB using a SCAN listener:
emctl stop oms emctl config oms -store_repos_details -repos_user sysman -repos_conndesc \ "'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oracls-scan.example.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=emrep)))'" emctl start oms
Mind the double quotes around the connect string.
To ensure that the connect descriptor has been updated, check
- all XML files under “../gc_inst/user_projects/domains/GCDomain/config/jdbc
- jps-config.xml, jps-config-jse.xml and embi-policystoremerge-jpscfg.xml under “../gc_inst/user_projects/domains/GCDomain/config/fmwconfig”
Update the “OMS And Repository” target (“Setup” – “Management Services and Repository” – “Monitoring Configuration”) to point to the relocated DB.
If you moved your repository DB to a new server, make sure to discover the server in EM.
Thank you so much for your post. It really help me to find way to fix my EM 13c OMS startup error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor. I will use your command to update repository DB string. My question is: can you please provide more details on double check and post Config actions? So I can update everything at one time shut. Thanks in advance.
Thanks for the detailed steps!
Do you have a valid oracle document id for these steps?
This article is a mixture of what I could find on MOS and Oracle blogs. Reference #3 should come closest to what you asked for.