Migrate your EM Cloud Control Repository into a PDB

This is a question two customers asked me one or two weeks ago. Is it allowed and supported to Migrate your EM Cloud Control Repository into a PDB? And if it is supported, how do you do it?

Is is supported?

At first, the good news, Migration your Enterprise Manager Cloud Control Repository database into a pluggable database (PDB) is fully supported. You find a section in the Cloud Control Basic Installation Guide saying:

The supported database configuration types are: pluggable database (PDB) and non-container database (non-CDB).

And you can have even separate repository databases in separate PDBs. But in this case, you need to do some extra steps and use a non-SYS user. The documentation tells you:

For multitenant architecture, when creating multiple PDBs in a CDB as Enterprise Manager repositories, for example individual PDBs as repositories for multiple Enterprise Manager sites, you must use a non-SYS user to deploy the Enterprise Manager software. The SYS user is not supported. For more details on how to create and use a non-SYS user when installing Enterprise Manager, see Evaluate LCM User Creation in the Enterprise Manager Advanced Installation and Configuration Guide.

 

How you do it?

The easiest approach should be using AutoUpgrade, especially since AutoUpgrade can also just do the plugin without even an upgrade being involved. Ignore the fact that the blog post I linked includes the move to a different server. This is not needed. Basically, these few parameters in the AutoUpgrade config file would do the job:

global.autoupg_log_dir=/home/oracle/logs
upg1.source_home=/u01/app/oracle/product/19
upg1.target_home=/u01/app/oracle/product/19
upg1.sid=EMCCREPO
upg1.target_cdb=CDBREPO
upg1.log_dir=/home/oracle/logs
upg1.restoration=no

And of course, you must create the CDBREPO at first.

Just be aware that this process is undergoing an official certification from the EM team right now while I am writing this blog post mid-January 2024.

 

Any additional steps to do?

Yes, there are a few steps but this is simple to complete – and with the additional config file parameter option upg1.after_action=do_this_after_plugin.sh you can fully script the entire process by having the necessary steps in a simple shell (or powershell) script.

 

1. Update OMS

./emctl config oms -store_repos_details -repos_conndesc "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost.here.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=EMCCREPO)))" -repos_user SYSMAN -repos_pwd ItIsSecret123

2. Relocate the management target in the agent

Please see step 6 in the EM documentation for further information.

./emctl config repos -host <hostB> -oh <OH of repository on hostB>  -conn_desc "<TNS connect descriptor>"

3. Change the management configuration for the OMS and the repository target

./emctl config emrep -conn_desc "<TNS connect descriptor>"

Again, you will find this as step 7 in the EM documentation.

From this point on you should be all set.

 

Further Links and Information

–Mike

Share this: