, , ,

Thanks to Sean Connolly at Oracle for sharing this solution

My last post about the Oracle Home GUID emphasized the importance of changing the OH GUID prior to host discovery and EM agent installation.

What if it’s already done?

You can update specific values for individual OEM targets using emctl.

emctl control agent runCollection ${OHOME_NAME}:oracle_home oracle_home_config

In this case we need to update the repository value for oracle_home_config for target $OH_NAME of target type oracle_home.  Use emctl to get the correct name for that target.

> emctl config agent listtargets | grep [o]racle_home 
        | grep -v agent | grep -v sbin

[Ora11g_gridinfrahome1_2_myhost, oracle_home]
[OraDb11g_home1_1_myhost, oracle_home]


1. Run this query on the repository database and filter it for your host_name

SELECT target_name,
FROM  mgmt$oh_home_info
WHERE target_name NOT LIKE 'agent%'
AND    target_name NOT LIKE 'sbin%'
AND    host_name='&host_name'
ORDER BY target_name;

2. Change the Oracle Home GUID using the process outlined in the last post

3. Update the agent with the emctl command

emctl control agent runCollection ${OHOME_NAME}:oracle_home 

4. Run the SQL query again and notice that the OUI_HOME_GUID has changed!